* signalr-release-track2

* update
This commit is contained in:
colawwj 2022-04-01 16:12:47 +08:00 коммит произвёл GitHub
Родитель e2d0131c3f
Коммит 33874f50ff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
116 изменённых файлов: 5461 добавлений и 205 удалений

Просмотреть файл

@ -642,21 +642,6 @@ packages:
- supports-color
dev: false
/@azure/arm-storage/17.1.0:
resolution: {integrity: sha512-MZtO0DRQp05GwY3vgeyLYkPgVSo2IddyeAEHX2JzyJQGc0CfAMswJo3C1NHcRNiBeNCc6AnLtySUpk0saVLAxg==}
engines: {node: '>=12.0.0'}
dependencies:
'@azure/abort-controller': 1.0.4
'@azure/core-auth': 1.3.2
'@azure/core-client': 1.5.0
'@azure/core-lro': 2.2.4
'@azure/core-paging': 1.2.1
'@azure/core-rest-pipeline': 1.7.0
tslib: 2.3.1
transitivePeerDependencies:
- supports-color
dev: false
/@azure/communication-common/1.1.0:
resolution: {integrity: sha512-vqTtzDtb4NG3LWoWoqlOOJApZRRIIImNUKlGyTa6c1YC+v5A7UEOL9TX8NRDxvFVUF2wDHsSnkhLBVBgkcAhIQ==}
engines: {node: '>=12.0.0'}
@ -9407,7 +9392,6 @@ packages:
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/arm-storage': 17.1.0
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.19.5
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
@ -10502,7 +10486,6 @@ packages:
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/arm-storage': 17.1.0
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.19.5
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
@ -11565,7 +11548,6 @@ packages:
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/arm-storage': 17.1.0
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.19.5
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
@ -12785,27 +12767,28 @@ packages:
dev: false
file:projects/arm-signalr.tgz:
resolution: {integrity: sha512-/lQuydBuVbd72Bb69zdj9L7NQJtenFgik7dhgphDvl0HqeYS1CsOeiKVuECnzB3mFHVhLPnrgHjYcd/T5OuPtw==, tarball: file:projects/arm-signalr.tgz}
resolution: {integrity: sha512-hMOnRTilrU0GnG79+EKJTLZSS0XVTkhcERWJb6/NjS2irqFP577cnvnnMQNkxtyhNFqA3mMr6EdduUAKBNMbqg==, tarball: file:projects/arm-signalr.tgz}
name: '@rush-temp/arm-signalr'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.19.5
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.70.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.3
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color

Просмотреть файл

@ -1,5 +1,41 @@
# Release History
## 5.1.0 (2022-03-30)
**Features**
- Added operation group SignalRCustomCertificates
- Added operation group SignalRCustomDomains
- Added Interface CustomCertificateList
- Added Interface CustomDomainList
- Added Interface LiveTraceCategory
- Added Interface LiveTraceConfiguration
- Added Interface ResourceReference
- Added Interface SignalRCustomCertificatesCreateOrUpdateOptionalParams
- Added Interface SignalRCustomCertificatesDeleteOptionalParams
- Added Interface SignalRCustomCertificatesGetOptionalParams
- Added Interface SignalRCustomCertificatesListNextOptionalParams
- Added Interface SignalRCustomCertificatesListOptionalParams
- Added Interface SignalRCustomDomainsCreateOrUpdateOptionalParams
- Added Interface SignalRCustomDomainsDeleteOptionalParams
- Added Interface SignalRCustomDomainsGetOptionalParams
- Added Interface SignalRCustomDomainsListNextOptionalParams
- Added Interface SignalRCustomDomainsListOptionalParams
- Added Type Alias CustomCertificate
- Added Type Alias CustomDomain
- Added Type Alias SignalRCustomCertificatesCreateOrUpdateResponse
- Added Type Alias SignalRCustomCertificatesGetResponse
- Added Type Alias SignalRCustomCertificatesListNextResponse
- Added Type Alias SignalRCustomCertificatesListResponse
- Added Type Alias SignalRCustomDomainsCreateOrUpdateResponse
- Added Type Alias SignalRCustomDomainsGetResponse
- Added Type Alias SignalRCustomDomainsListNextResponse
- Added Type Alias SignalRCustomDomainsListResponse
- Class SignalRManagementClient has a new parameter signalRCustomCertificates
- Class SignalRManagementClient has a new parameter signalRCustomDomains
- Type Alias SignalRResource has a new parameter liveTraceConfiguration
## 5.0.0 (2022-01-21)
The package of @azure/arm-signalr is using our next generation design principles since version 5.0.0, which contains breaking changes.

Просмотреть файл

@ -16,6 +16,8 @@ REST API for Azure SignalR Service
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites
- An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SignalRManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new SignalRManagementClient(credential, subscriptionId);
```

Просмотреть файл

@ -1,7 +1,8 @@
{
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
"commit": "3c1da29166fe1306071c939ac1344b092bafd0ce",
"readme": "specification/signalr/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/signalr/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\signalr\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.1",
"use": "@autorest/typescript@6.0.0-alpha.18.20220329.1"
}

Просмотреть файл

@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-signalr.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}

Просмотреть файл

@ -3,8 +3,10 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for SignalRManagementClient.",
"version": "5.0.0",
"engines": { "node": ">=12.0.0" },
"version": "5.1.0",
"engines": {
"node": ">=12.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
@ -14,20 +16,26 @@
"@azure/core-rest-pipeline": "^1.1.0",
"tslib": "^2.2.0"
},
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-signalr.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "11.0.2",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
@ -41,7 +49,9 @@
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
@ -90,14 +100,19 @@
"sideEffects": false,
"//metadata": {
"constantPaths": [
{ "path": "src/SignalRManagementClient.ts", "prefix": "packageDetails" }
{
"path": "src/signalRManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": ["azure"],
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-signalr?view=azure-node-preview"
}
}
}

Просмотреть файл

@ -16,6 +16,35 @@ export type ACLAction = string;
// @public
export type CreatedByType = string;
// @public
export type CustomCertificate = ProxyResource & {
readonly systemData?: SystemData;
readonly provisioningState?: ProvisioningState;
keyVaultBaseUri: string;
keyVaultSecretName: string;
keyVaultSecretVersion?: string;
};
// @public
export interface CustomCertificateList {
nextLink?: string;
value?: CustomCertificate[];
}
// @public
export type CustomDomain = ProxyResource & {
readonly systemData?: SystemData;
readonly provisioningState?: ProvisioningState;
domainName: string;
customCertificate: ResourceReference;
};
// @public
export interface CustomDomainList {
nextLink?: string;
value?: CustomDomain[];
}
// @public
export interface Dimension {
displayName?: string;
@ -201,6 +230,18 @@ export enum KnownUpstreamAuthType {
None = "None"
}
// @public
export interface LiveTraceCategory {
enabled?: string;
name?: string;
}
// @public
export interface LiveTraceConfiguration {
categories?: LiveTraceCategory[];
enabled?: string;
}
// @public
export interface LogSpecification {
displayName?: string;
@ -381,6 +422,11 @@ export interface ResourceLogConfiguration {
categories?: ResourceLogCategory[];
}
// @public
export interface ResourceReference {
id?: string;
}
// @public
export interface ResourceSku {
capacity?: number;
@ -480,6 +526,95 @@ export interface SignalRCreateOrUpdateOptionalParams extends coreClient.Operatio
// @public
export type SignalRCreateOrUpdateResponse = SignalRResource;
// @public
export interface SignalRCustomCertificates {
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, certificateName: string, parameters: CustomCertificate, options?: SignalRCustomCertificatesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<SignalRCustomCertificatesCreateOrUpdateResponse>, SignalRCustomCertificatesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, certificateName: string, parameters: CustomCertificate, options?: SignalRCustomCertificatesCreateOrUpdateOptionalParams): Promise<SignalRCustomCertificatesCreateOrUpdateResponse>;
delete(resourceGroupName: string, resourceName: string, certificateName: string, options?: SignalRCustomCertificatesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, resourceName: string, certificateName: string, options?: SignalRCustomCertificatesGetOptionalParams): Promise<SignalRCustomCertificatesGetResponse>;
list(resourceGroupName: string, resourceName: string, options?: SignalRCustomCertificatesListOptionalParams): PagedAsyncIterableIterator<CustomCertificate>;
}
// @public
export interface SignalRCustomCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type SignalRCustomCertificatesCreateOrUpdateResponse = CustomCertificate;
// @public
export interface SignalRCustomCertificatesDeleteOptionalParams extends coreClient.OperationOptions {
}
// @public
export interface SignalRCustomCertificatesGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomCertificatesGetResponse = CustomCertificate;
// @public
export interface SignalRCustomCertificatesListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomCertificatesListNextResponse = CustomCertificateList;
// @public
export interface SignalRCustomCertificatesListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomCertificatesListResponse = CustomCertificateList;
// @public
export interface SignalRCustomDomains {
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, name: string, parameters: CustomDomain, options?: SignalRCustomDomainsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<SignalRCustomDomainsCreateOrUpdateResponse>, SignalRCustomDomainsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, name: string, parameters: CustomDomain, options?: SignalRCustomDomainsCreateOrUpdateOptionalParams): Promise<SignalRCustomDomainsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, resourceName: string, name: string, options?: SignalRCustomDomainsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, resourceName: string, name: string, options?: SignalRCustomDomainsDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, resourceName: string, name: string, options?: SignalRCustomDomainsGetOptionalParams): Promise<SignalRCustomDomainsGetResponse>;
list(resourceGroupName: string, resourceName: string, options?: SignalRCustomDomainsListOptionalParams): PagedAsyncIterableIterator<CustomDomain>;
}
// @public
export interface SignalRCustomDomainsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type SignalRCustomDomainsCreateOrUpdateResponse = CustomDomain;
// @public
export interface SignalRCustomDomainsDeleteOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export interface SignalRCustomDomainsGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomDomainsGetResponse = CustomDomain;
// @public
export interface SignalRCustomDomainsListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomDomainsListNextResponse = CustomDomainList;
// @public
export interface SignalRCustomDomainsListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SignalRCustomDomainsListResponse = CustomDomainList;
// @public
export interface SignalRDeleteOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
@ -564,6 +699,10 @@ export class SignalRManagementClient extends coreClient.ServiceClient {
// (undocumented)
signalR: SignalR;
// (undocumented)
signalRCustomCertificates: SignalRCustomCertificates;
// (undocumented)
signalRCustomDomains: SignalRCustomDomains;
// (undocumented)
signalRPrivateEndpointConnections: SignalRPrivateEndpointConnections;
// (undocumented)
signalRPrivateLinkResources: SignalRPrivateLinkResources;
@ -680,6 +819,7 @@ export type SignalRResource = TrackedResource & {
tls?: SignalRTlsSettings;
readonly hostNamePrefix?: string;
features?: SignalRFeature[];
liveTraceConfiguration?: LiveTraceConfiguration;
resourceLogConfiguration?: ResourceLogConfiguration;
cors?: SignalRCorsSettings;
upstream?: ServerlessUpstreamSettings;

Просмотреть файл

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
import nodeBuiltins from "builtin-modules";
/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler
/**
* A function that can determine whether a rollupwarning should be ignored. If
* A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed.
*/
function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (
warning.code === "EVAL" &&
warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
);
}
function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true
);
}
const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
/**
* Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),
sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
],
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};
const config = [baseConfig];

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @summary Lists all of the available REST API operations of the Microsoft.SignalRService provider.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
NameAvailabilityParameters,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Checks that the resource name is valid and is not already in use.
*
* @summary Checks that the resource name is valid and is not already in use.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CheckNameAvailability.json
*/
async function signalRCheckNameAvailability() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const parameters: NameAvailabilityParameters = {
name: "mySignalRService",
type: "Microsoft.SignalRService/SignalR"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.checkNameAvailability(
location,
parameters
);
console.log(result);
}
signalRCheckNameAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRResource, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a resource.
*
* @summary Create or update a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CreateOrUpdate.json
*/
async function signalRCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SignalRResource = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" }
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false"
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"]
}
],
publicNetwork: { allow: ["ClientConnection"] }
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" }
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect"
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { CustomCertificate, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a custom certificate.
*
* @summary Create or update a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.json
*/
async function signalRCustomCertificatesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const parameters: CustomCertificate = {
keyVaultBaseUri: "https://myvault.keyvault.azure.net/",
keyVaultSecretName: "mycert",
keyVaultSecretVersion: "bb6a44b2743f47f68dad0d6cc9756432"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
certificateName,
parameters
);
console.log(result);
}
signalRCustomCertificatesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a custom certificate.
*
* @summary Delete a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Delete.json
*/
async function signalRCustomCertificatesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.delete(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a custom certificate.
*
* @summary Get a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Get.json
*/
async function signalRCustomCertificatesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.get(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all custom certificates.
*
* @summary List all custom certificates.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_List.json
*/
async function signalRCustomCertificatesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomCertificates.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomCertificatesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { CustomDomain, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a custom domain.
*
* @summary Create or update a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_CreateOrUpdate.json
*/
async function signalRCustomDomainsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "myDomain";
const parameters: CustomDomain = {
customCertificate: {
id:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"
},
domainName: "example.com"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
name,
parameters
);
console.log(result);
}
signalRCustomDomainsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a custom domain.
*
* @summary Delete a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Delete.json
*/
async function signalRCustomDomainsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginDeleteAndWait(
resourceGroupName,
resourceName,
name
);
console.log(result);
}
signalRCustomDomainsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a custom domain.
*
* @summary Get a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Get.json
*/
async function signalRCustomDomainsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.get(
resourceGroupName,
resourceName,
name
);
console.log(result);
}
signalRCustomDomainsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all custom domains.
*
* @summary List all custom domains.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_List.json
*/
async function signalRCustomDomainsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomDomains.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomDomainsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to delete a resource.
*
* @summary Operation to delete a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Delete.json
*/
async function signalRDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginDeleteAndWait(
resourceGroupName,
resourceName
);
console.log(result);
}
signalRDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the resource and its properties.
*
* @summary Get the resource and its properties.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Get.json
*/
async function signalRGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.get(resourceGroupName, resourceName);
console.log(result);
}
signalRGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Handles requests to list all resources in a resource group.
*
* @summary Handles requests to list all resources in a resource group.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListByResourceGroup.json
*/
async function signalRListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listByResourceGroup(
resourceGroupName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Handles requests to list all resources in a subscription.
*
* @summary Handles requests to list all resources in a subscription.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListBySubscription.json
*/
async function signalRListBySubscription() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
signalRListBySubscription().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the access keys of the resource.
*
* @summary Get the access keys of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListKeys.json
*/
async function signalRListKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listKeys(resourceGroupName, resourceName);
console.log(result);
}
signalRListKeys().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all available skus of the resource.
*
* @summary List all available skus of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListSkus.json
*/
async function signalRListSkus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listSkus(resourceGroupName, resourceName);
console.log(result);
}
signalRListSkus().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified private endpoint connection
*
* @summary Delete the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Delete.json
*/
async function signalRPrivateEndpointConnectionsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.beginDeleteAndWait(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the specified private endpoint connection
*
* @summary Get the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Get.json
*/
async function signalRPrivateEndpointConnectionsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.get(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List private endpoint connections
*
* @summary List private endpoint connections
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_List.json
*/
async function signalRPrivateEndpointConnectionsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateEndpointConnections.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateEndpointConnectionsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,50 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
PrivateEndpointConnection,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Update the state of specified private endpoint connection
*
* @summary Update the state of specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Update.json
*/
async function signalRPrivateEndpointConnectionsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: PrivateEndpointConnection = {
privateEndpoint: {
id:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"
},
privateLinkServiceConnectionState: {
actionsRequired: "None",
status: "Approved"
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.update(
privateEndpointConnectionName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRPrivateEndpointConnectionsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the private link resources that need to be created for a resource.
*
* @summary Get the private link resources that need to be created for a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateLinkResources_List.json
*/
async function signalRPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateLinkResources.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
RegenerateKeyParameters,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
*
* @summary Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_RegenerateKey.json
*/
async function signalRRegenerateKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: RegenerateKeyParameters = { keyType: "Primary" };
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRegenerateKeyAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRRegenerateKey().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to restart a resource.
*
* @summary Operation to restart a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Restart.json
*/
async function signalRRestart() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRestartAndWait(
resourceGroupName,
resourceName
);
console.log(result);
}
signalRRestart().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
SharedPrivateLinkResource,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a shared private link resource
*
* @summary Create or update a shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json
*/
async function signalRSharedPrivateLinkResourcesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SharedPrivateLinkResource = {
groupId: "sites",
privateLinkResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp",
requestMessage: "Please approve"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginCreateOrUpdateAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRSharedPrivateLinkResourcesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified shared private link resource
*
* @summary Delete the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json
*/
async function signalRSharedPrivateLinkResourcesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginDeleteAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the specified shared private link resource
*
* @summary Get the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Get.json
*/
async function signalRSharedPrivateLinkResourcesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.get(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List shared private link resources
*
* @summary List shared private link resources
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_List.json
*/
async function signalRSharedPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRSharedPrivateLinkResources.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRSharedPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRResource, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to update an exiting resource.
*
* @summary Operation to update an exiting resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Update.json
*/
async function signalRUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SignalRResource = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" }
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false"
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"]
}
],
publicNetwork: { allow: ["ClientConnection"] }
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" }
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect"
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List resource usage quotas by location.
*
* @summary List resource usage quotas by location.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Usages_List.json
*/
async function usagesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.usages.list(location)) {
resArray.push(item);
}
console.log(resArray);
}
usagesList().catch(console.error);

Просмотреть файл

@ -2,30 +2,60 @@
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [operationsList.js][operationslist] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json |
| [signalRCheckNameAvailability.js][signalrchecknameavailability] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCreateOrUpdate.js][signalrcreateorupdate] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json |
| [signalRDelete.js][signalrdelete] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json |
| [signalRGet.js][signalrget] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json |
| [signalRListByResourceGroup.js][signalrlistbyresourcegroup] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListBySubscription.js][signalrlistbysubscription] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json |
| [signalRListKeys.js][signalrlistkeys] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json |
| [signalRListSkus.js][signalrlistskus] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json |
| [signalRPrivateEndpointConnectionsDelete.js][signalrprivateendpointconnectionsdelete] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsGet.js][signalrprivateendpointconnectionsget] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsList.js][signalrprivateendpointconnectionslist] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsUpdate.js][signalrprivateendpointconnectionsupdate] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateLinkResourcesList.js][signalrprivatelinkresourceslist] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRRegenerateKey.js][signalrregeneratekey] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json |
| [signalRRestart.js][signalrrestart] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdate.js][signalrsharedprivatelinkresourcescreateorupdate] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesDelete.js][signalrsharedprivatelinkresourcesdelete] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesGet.js][signalrsharedprivatelinkresourcesget] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesList.js][signalrsharedprivatelinkresourceslist] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRUpdate.js][signalrupdate] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json |
| [usagesList.js][usageslist] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json |
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [operationsList.js][operationslist] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json |
| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Operations_List.json |
| [signalRCheckNameAvailability.js][signalrchecknameavailability] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCheckNameAvailabilitySample.js][signalrchecknameavailabilitysample] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCreateOrUpdate.js][signalrcreateorupdate] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json |
| [signalRCreateOrUpdateSample.js][signalrcreateorupdatesample] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CreateOrUpdate.json |
| [signalRCustomCertificatesCreateOrUpdateSample.js][signalrcustomcertificatescreateorupdatesample] | Create or update a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.json |
| [signalRCustomCertificatesDeleteSample.js][signalrcustomcertificatesdeletesample] | Delete a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Delete.json |
| [signalRCustomCertificatesGetSample.js][signalrcustomcertificatesgetsample] | Get a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Get.json |
| [signalRCustomCertificatesListSample.js][signalrcustomcertificateslistsample] | List all custom certificates. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_List.json |
| [signalRCustomDomainsCreateOrUpdateSample.js][signalrcustomdomainscreateorupdatesample] | Create or update a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_CreateOrUpdate.json |
| [signalRCustomDomainsDeleteSample.js][signalrcustomdomainsdeletesample] | Delete a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Delete.json |
| [signalRCustomDomainsGetSample.js][signalrcustomdomainsgetsample] | Get a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Get.json |
| [signalRCustomDomainsListSample.js][signalrcustomdomainslistsample] | List all custom domains. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_List.json |
| [signalRDelete.js][signalrdelete] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json |
| [signalRDeleteSample.js][signalrdeletesample] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Delete.json |
| [signalRGet.js][signalrget] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json |
| [signalRGetSample.js][signalrgetsample] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Get.json |
| [signalRListByResourceGroup.js][signalrlistbyresourcegroup] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListByResourceGroupSample.js][signalrlistbyresourcegroupsample] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListBySubscription.js][signalrlistbysubscription] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json |
| [signalRListBySubscriptionSample.js][signalrlistbysubscriptionsample] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListBySubscription.json |
| [signalRListKeys.js][signalrlistkeys] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json |
| [signalRListKeysSample.js][signalrlistkeyssample] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListKeys.json |
| [signalRListSkus.js][signalrlistskus] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json |
| [signalRListSkusSample.js][signalrlistskussample] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListSkus.json |
| [signalRPrivateEndpointConnectionsDelete.js][signalrprivateendpointconnectionsdelete] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsDeleteSample.js][signalrprivateendpointconnectionsdeletesample] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsGet.js][signalrprivateendpointconnectionsget] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsGetSample.js][signalrprivateendpointconnectionsgetsample] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsList.js][signalrprivateendpointconnectionslist] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsListSample.js][signalrprivateendpointconnectionslistsample] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsUpdate.js][signalrprivateendpointconnectionsupdate] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateEndpointConnectionsUpdateSample.js][signalrprivateendpointconnectionsupdatesample] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateLinkResourcesList.js][signalrprivatelinkresourceslist] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRPrivateLinkResourcesListSample.js][signalrprivatelinkresourceslistsample] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRRegenerateKey.js][signalrregeneratekey] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json |
| [signalRRegenerateKeySample.js][signalrregeneratekeysample] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_RegenerateKey.json |
| [signalRRestart.js][signalrrestart] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json |
| [signalRRestartSample.js][signalrrestartsample] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Restart.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdate.js][signalrsharedprivatelinkresourcescreateorupdate] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdateSample.js][signalrsharedprivatelinkresourcescreateorupdatesample] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesDelete.js][signalrsharedprivatelinkresourcesdelete] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesDeleteSample.js][signalrsharedprivatelinkresourcesdeletesample] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesGet.js][signalrsharedprivatelinkresourcesget] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesGetSample.js][signalrsharedprivatelinkresourcesgetsample] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesList.js][signalrsharedprivatelinkresourceslist] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRSharedPrivateLinkResourcesListSample.js][signalrsharedprivatelinkresourceslistsample] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRUpdate.js][signalrupdate] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json |
| [signalRUpdateSample.js][signalrupdatesample] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Update.json |
| [usagesList.js][usageslist] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json |
| [usagesListSample.js][usageslistsample] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Usages_List.json |
## Prerequisites
@ -66,27 +96,57 @@ npx cross-env node operationsList.js
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/operationsList.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/operationsListSample.js
[signalrchecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCheckNameAvailability.js
[signalrchecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCheckNameAvailabilitySample.js
[signalrcreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCreateOrUpdate.js
[signalrcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCreateOrUpdateSample.js
[signalrcustomcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomCertificatesCreateOrUpdateSample.js
[signalrcustomcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomCertificatesDeleteSample.js
[signalrcustomcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomCertificatesGetSample.js
[signalrcustomcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomCertificatesListSample.js
[signalrcustomdomainscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomDomainsCreateOrUpdateSample.js
[signalrcustomdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomDomainsDeleteSample.js
[signalrcustomdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomDomainsGetSample.js
[signalrcustomdomainslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRCustomDomainsListSample.js
[signalrdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRDelete.js
[signalrdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRDeleteSample.js
[signalrget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRGet.js
[signalrgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRGetSample.js
[signalrlistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListByResourceGroup.js
[signalrlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListByResourceGroupSample.js
[signalrlistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListBySubscription.js
[signalrlistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListBySubscriptionSample.js
[signalrlistkeys]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListKeys.js
[signalrlistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListKeysSample.js
[signalrlistskus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListSkus.js
[signalrlistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRListSkusSample.js
[signalrprivateendpointconnectionsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsDelete.js
[signalrprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsDeleteSample.js
[signalrprivateendpointconnectionsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsGet.js
[signalrprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsGetSample.js
[signalrprivateendpointconnectionslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsList.js
[signalrprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsListSample.js
[signalrprivateendpointconnectionsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsUpdate.js
[signalrprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateEndpointConnectionsUpdateSample.js
[signalrprivatelinkresourceslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateLinkResourcesList.js
[signalrprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRPrivateLinkResourcesListSample.js
[signalrregeneratekey]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRRegenerateKey.js
[signalrregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRRegenerateKeySample.js
[signalrrestart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRRestart.js
[signalrrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRRestartSample.js
[signalrsharedprivatelinkresourcescreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesCreateOrUpdate.js
[signalrsharedprivatelinkresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesCreateOrUpdateSample.js
[signalrsharedprivatelinkresourcesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesDelete.js
[signalrsharedprivatelinkresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesDeleteSample.js
[signalrsharedprivatelinkresourcesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesGet.js
[signalrsharedprivatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesGetSample.js
[signalrsharedprivatelinkresourceslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesList.js
[signalrsharedprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRSharedPrivateLinkResourcesListSample.js
[signalrupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRUpdate.js
[signalrupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/signalRUpdateSample.js
[usageslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/usagesList.js
[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/javascript/usagesListSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-signalr?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/signalr/arm-signalr/README.md

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @summary Lists all of the available REST API operations of the Microsoft.SignalRService provider.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Checks that the resource name is valid and is not already in use.
*
* @summary Checks that the resource name is valid and is not already in use.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CheckNameAvailability.json
*/
async function signalRCheckNameAvailability() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const parameters = {
name: "mySignalRService",
type: "Microsoft.SignalRService/SignalR",
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.checkNameAvailability(location, parameters);
console.log(result);
}
signalRCheckNameAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update a resource.
*
* @summary Create or update a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CreateOrUpdate.json
*/
async function signalRCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" },
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false",
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"],
},
],
publicNetwork: { allow: ["ClientConnection"] },
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" },
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect",
},
],
},
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update a custom certificate.
*
* @summary Create or update a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.json
*/
async function signalRCustomCertificatesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const parameters = {
keyVaultBaseUri: "https://myvault.keyvault.azure.net/",
keyVaultSecretName: "mycert",
keyVaultSecretVersion: "bb6a44b2743f47f68dad0d6cc9756432",
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
certificateName,
parameters
);
console.log(result);
}
signalRCustomCertificatesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete a custom certificate.
*
* @summary Delete a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Delete.json
*/
async function signalRCustomCertificatesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.delete(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a custom certificate.
*
* @summary Get a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Get.json
*/
async function signalRCustomCertificatesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.get(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all custom certificates.
*
* @summary List all custom certificates.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_List.json
*/
async function signalRCustomCertificatesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomCertificates.list(resourceGroupName, resourceName)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomCertificatesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update a custom domain.
*
* @summary Create or update a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_CreateOrUpdate.json
*/
async function signalRCustomDomainsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "myDomain";
const parameters = {
customCertificate: {
id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert",
},
domainName: "example.com",
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
name,
parameters
);
console.log(result);
}
signalRCustomDomainsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete a custom domain.
*
* @summary Delete a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Delete.json
*/
async function signalRCustomDomainsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginDeleteAndWait(
resourceGroupName,
resourceName,
name
);
console.log(result);
}
signalRCustomDomainsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a custom domain.
*
* @summary Get a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Get.json
*/
async function signalRCustomDomainsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.get(resourceGroupName, resourceName, name);
console.log(result);
}
signalRCustomDomainsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all custom domains.
*
* @summary List all custom domains.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_List.json
*/
async function signalRCustomDomainsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomDomains.list(resourceGroupName, resourceName)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomDomainsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to delete a resource.
*
* @summary Operation to delete a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Delete.json
*/
async function signalRDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginDeleteAndWait(resourceGroupName, resourceName);
console.log(result);
}
signalRDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the resource and its properties.
*
* @summary Get the resource and its properties.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Get.json
*/
async function signalRGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.get(resourceGroupName, resourceName);
console.log(result);
}
signalRGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Handles requests to list all resources in a resource group.
*
* @summary Handles requests to list all resources in a resource group.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListByResourceGroup.json
*/
async function signalRListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
signalRListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Handles requests to list all resources in a subscription.
*
* @summary Handles requests to list all resources in a subscription.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListBySubscription.json
*/
async function signalRListBySubscription() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
signalRListBySubscription().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the access keys of the resource.
*
* @summary Get the access keys of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListKeys.json
*/
async function signalRListKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listKeys(resourceGroupName, resourceName);
console.log(result);
}
signalRListKeys().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all available skus of the resource.
*
* @summary List all available skus of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListSkus.json
*/
async function signalRListSkus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listSkus(resourceGroupName, resourceName);
console.log(result);
}
signalRListSkus().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete the specified private endpoint connection
*
* @summary Delete the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Delete.json
*/
async function signalRPrivateEndpointConnectionsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName = "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.beginDeleteAndWait(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the specified private endpoint connection
*
* @summary Get the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Get.json
*/
async function signalRPrivateEndpointConnectionsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName = "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.get(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List private endpoint connections
*
* @summary List private endpoint connections
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_List.json
*/
async function signalRPrivateEndpointConnectionsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateEndpointConnections.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateEndpointConnectionsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Update the state of specified private endpoint connection
*
* @summary Update the state of specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Update.json
*/
async function signalRPrivateEndpointConnectionsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName = "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters = {
privateEndpoint: {
id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint",
},
privateLinkServiceConnectionState: {
actionsRequired: "None",
status: "Approved",
},
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.update(
privateEndpointConnectionName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRPrivateEndpointConnectionsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the private link resources that need to be created for a resource.
*
* @summary Get the private link resources that need to be created for a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateLinkResources_List.json
*/
async function signalRPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateLinkResources.list(resourceGroupName, resourceName)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
*
* @summary Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_RegenerateKey.json
*/
async function signalRRegenerateKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters = { keyType: "Primary" };
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRegenerateKeyAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRRegenerateKey().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to restart a resource.
*
* @summary Operation to restart a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Restart.json
*/
async function signalRRestart() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRestartAndWait(resourceGroupName, resourceName);
console.log(result);
}
signalRRestart().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update a shared private link resource
*
* @summary Create or update a shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json
*/
async function signalRSharedPrivateLinkResourcesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters = {
groupId: "sites",
privateLinkResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp",
requestMessage: "Please approve",
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginCreateOrUpdateAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRSharedPrivateLinkResourcesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete the specified shared private link resource
*
* @summary Delete the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json
*/
async function signalRSharedPrivateLinkResourcesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginDeleteAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the specified shared private link resource
*
* @summary Get the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Get.json
*/
async function signalRSharedPrivateLinkResourcesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.get(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List shared private link resources
*
* @summary List shared private link resources
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_List.json
*/
async function signalRSharedPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRSharedPrivateLinkResources.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRSharedPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to update an exiting resource.
*
* @summary Operation to update an exiting resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Update.json
*/
async function signalRUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" },
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false",
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"],
},
],
publicNetwork: { allow: ["ClientConnection"] },
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" },
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect",
},
],
},
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List resource usage quotas by location.
*
* @summary List resource usage quotas by location.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Usages_List.json
*/
async function usagesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.usages.list(location)) {
resArray.push(item);
}
console.log(resArray);
}
usagesList().catch(console.error);

Просмотреть файл

@ -2,30 +2,60 @@
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [operationsList.ts][operationslist] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json |
| [signalRCheckNameAvailability.ts][signalrchecknameavailability] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCreateOrUpdate.ts][signalrcreateorupdate] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json |
| [signalRDelete.ts][signalrdelete] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json |
| [signalRGet.ts][signalrget] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json |
| [signalRListByResourceGroup.ts][signalrlistbyresourcegroup] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListBySubscription.ts][signalrlistbysubscription] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json |
| [signalRListKeys.ts][signalrlistkeys] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json |
| [signalRListSkus.ts][signalrlistskus] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json |
| [signalRPrivateEndpointConnectionsDelete.ts][signalrprivateendpointconnectionsdelete] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsGet.ts][signalrprivateendpointconnectionsget] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsList.ts][signalrprivateendpointconnectionslist] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsUpdate.ts][signalrprivateendpointconnectionsupdate] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateLinkResourcesList.ts][signalrprivatelinkresourceslist] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRRegenerateKey.ts][signalrregeneratekey] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json |
| [signalRRestart.ts][signalrrestart] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdate.ts][signalrsharedprivatelinkresourcescreateorupdate] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesDelete.ts][signalrsharedprivatelinkresourcesdelete] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesGet.ts][signalrsharedprivatelinkresourcesget] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesList.ts][signalrsharedprivatelinkresourceslist] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRUpdate.ts][signalrupdate] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json |
| [usagesList.ts][usageslist] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json |
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [operationsList.ts][operationslist] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json |
| [operationsListSample.ts][operationslistsample] | Lists all of the available REST API operations of the Microsoft.SignalRService provider. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Operations_List.json |
| [signalRCheckNameAvailability.ts][signalrchecknameavailability] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCheckNameAvailabilitySample.ts][signalrchecknameavailabilitysample] | Checks that the resource name is valid and is not already in use. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CheckNameAvailability.json |
| [signalRCreateOrUpdate.ts][signalrcreateorupdate] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json |
| [signalRCreateOrUpdateSample.ts][signalrcreateorupdatesample] | Create or update a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CreateOrUpdate.json |
| [signalRCustomCertificatesCreateOrUpdateSample.ts][signalrcustomcertificatescreateorupdatesample] | Create or update a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.json |
| [signalRCustomCertificatesDeleteSample.ts][signalrcustomcertificatesdeletesample] | Delete a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Delete.json |
| [signalRCustomCertificatesGetSample.ts][signalrcustomcertificatesgetsample] | Get a custom certificate. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Get.json |
| [signalRCustomCertificatesListSample.ts][signalrcustomcertificateslistsample] | List all custom certificates. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_List.json |
| [signalRCustomDomainsCreateOrUpdateSample.ts][signalrcustomdomainscreateorupdatesample] | Create or update a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_CreateOrUpdate.json |
| [signalRCustomDomainsDeleteSample.ts][signalrcustomdomainsdeletesample] | Delete a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Delete.json |
| [signalRCustomDomainsGetSample.ts][signalrcustomdomainsgetsample] | Get a custom domain. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Get.json |
| [signalRCustomDomainsListSample.ts][signalrcustomdomainslistsample] | List all custom domains. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_List.json |
| [signalRDelete.ts][signalrdelete] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json |
| [signalRDeleteSample.ts][signalrdeletesample] | Operation to delete a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Delete.json |
| [signalRGet.ts][signalrget] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json |
| [signalRGetSample.ts][signalrgetsample] | Get the resource and its properties. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Get.json |
| [signalRListByResourceGroup.ts][signalrlistbyresourcegroup] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListByResourceGroupSample.ts][signalrlistbyresourcegroupsample] | Handles requests to list all resources in a resource group. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListByResourceGroup.json |
| [signalRListBySubscription.ts][signalrlistbysubscription] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json |
| [signalRListBySubscriptionSample.ts][signalrlistbysubscriptionsample] | Handles requests to list all resources in a subscription. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListBySubscription.json |
| [signalRListKeys.ts][signalrlistkeys] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json |
| [signalRListKeysSample.ts][signalrlistkeyssample] | Get the access keys of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListKeys.json |
| [signalRListSkus.ts][signalrlistskus] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json |
| [signalRListSkusSample.ts][signalrlistskussample] | List all available skus of the resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListSkus.json |
| [signalRPrivateEndpointConnectionsDelete.ts][signalrprivateendpointconnectionsdelete] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsDeleteSample.ts][signalrprivateendpointconnectionsdeletesample] | Delete the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Delete.json |
| [signalRPrivateEndpointConnectionsGet.ts][signalrprivateendpointconnectionsget] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsGetSample.ts][signalrprivateendpointconnectionsgetsample] | Get the specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Get.json |
| [signalRPrivateEndpointConnectionsList.ts][signalrprivateendpointconnectionslist] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsListSample.ts][signalrprivateendpointconnectionslistsample] | List private endpoint connections x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_List.json |
| [signalRPrivateEndpointConnectionsUpdate.ts][signalrprivateendpointconnectionsupdate] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateEndpointConnectionsUpdateSample.ts][signalrprivateendpointconnectionsupdatesample] | Update the state of specified private endpoint connection x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Update.json |
| [signalRPrivateLinkResourcesList.ts][signalrprivatelinkresourceslist] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRPrivateLinkResourcesListSample.ts][signalrprivatelinkresourceslistsample] | Get the private link resources that need to be created for a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateLinkResources_List.json |
| [signalRRegenerateKey.ts][signalrregeneratekey] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json |
| [signalRRegenerateKeySample.ts][signalrregeneratekeysample] | Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_RegenerateKey.json |
| [signalRRestart.ts][signalrrestart] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json |
| [signalRRestartSample.ts][signalrrestartsample] | Operation to restart a resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Restart.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdate.ts][signalrsharedprivatelinkresourcescreateorupdate] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesCreateOrUpdateSample.ts][signalrsharedprivatelinkresourcescreateorupdatesample] | Create or update a shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json |
| [signalRSharedPrivateLinkResourcesDelete.ts][signalrsharedprivatelinkresourcesdelete] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesDeleteSample.ts][signalrsharedprivatelinkresourcesdeletesample] | Delete the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json |
| [signalRSharedPrivateLinkResourcesGet.ts][signalrsharedprivatelinkresourcesget] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesGetSample.ts][signalrsharedprivatelinkresourcesgetsample] | Get the specified shared private link resource x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Get.json |
| [signalRSharedPrivateLinkResourcesList.ts][signalrsharedprivatelinkresourceslist] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRSharedPrivateLinkResourcesListSample.ts][signalrsharedprivatelinkresourceslistsample] | List shared private link resources x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_List.json |
| [signalRUpdate.ts][signalrupdate] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json |
| [signalRUpdateSample.ts][signalrupdatesample] | Operation to update an exiting resource. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Update.json |
| [usagesList.ts][usageslist] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json |
| [usagesListSample.ts][usageslistsample] | List resource usage quotas by location. x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Usages_List.json |
## Prerequisites
@ -78,27 +108,57 @@ npx cross-env node dist/operationsList.js
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/operationsList.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/operationsListSample.ts
[signalrchecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCheckNameAvailability.ts
[signalrchecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCheckNameAvailabilitySample.ts
[signalrcreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCreateOrUpdate.ts
[signalrcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCreateOrUpdateSample.ts
[signalrcustomcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomCertificatesCreateOrUpdateSample.ts
[signalrcustomcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomCertificatesDeleteSample.ts
[signalrcustomcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomCertificatesGetSample.ts
[signalrcustomcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomCertificatesListSample.ts
[signalrcustomdomainscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomDomainsCreateOrUpdateSample.ts
[signalrcustomdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomDomainsDeleteSample.ts
[signalrcustomdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomDomainsGetSample.ts
[signalrcustomdomainslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRCustomDomainsListSample.ts
[signalrdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRDelete.ts
[signalrdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRDeleteSample.ts
[signalrget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRGet.ts
[signalrgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRGetSample.ts
[signalrlistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListByResourceGroup.ts
[signalrlistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListByResourceGroupSample.ts
[signalrlistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListBySubscription.ts
[signalrlistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListBySubscriptionSample.ts
[signalrlistkeys]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListKeys.ts
[signalrlistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListKeysSample.ts
[signalrlistskus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListSkus.ts
[signalrlistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRListSkusSample.ts
[signalrprivateendpointconnectionsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsDelete.ts
[signalrprivateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsDeleteSample.ts
[signalrprivateendpointconnectionsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsGet.ts
[signalrprivateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsGetSample.ts
[signalrprivateendpointconnectionslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsList.ts
[signalrprivateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsListSample.ts
[signalrprivateendpointconnectionsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsUpdate.ts
[signalrprivateendpointconnectionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateEndpointConnectionsUpdateSample.ts
[signalrprivatelinkresourceslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateLinkResourcesList.ts
[signalrprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRPrivateLinkResourcesListSample.ts
[signalrregeneratekey]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRRegenerateKey.ts
[signalrregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRRegenerateKeySample.ts
[signalrrestart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRRestart.ts
[signalrrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRRestartSample.ts
[signalrsharedprivatelinkresourcescreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesCreateOrUpdate.ts
[signalrsharedprivatelinkresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesCreateOrUpdateSample.ts
[signalrsharedprivatelinkresourcesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesDelete.ts
[signalrsharedprivatelinkresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesDeleteSample.ts
[signalrsharedprivatelinkresourcesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesGet.ts
[signalrsharedprivatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesGetSample.ts
[signalrsharedprivatelinkresourceslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesList.ts
[signalrsharedprivatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRSharedPrivateLinkResourcesListSample.ts
[signalrupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRUpdate.ts
[signalrupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/signalRUpdateSample.ts
[usageslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/usagesList.ts
[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/signalr/arm-signalr/samples/v5/typescript/src/usagesListSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-signalr?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/signalr/arm-signalr/README.md

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @summary Lists all of the available REST API operations of the Microsoft.SignalRService provider.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
NameAvailabilityParameters,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Checks that the resource name is valid and is not already in use.
*
* @summary Checks that the resource name is valid and is not already in use.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CheckNameAvailability.json
*/
async function signalRCheckNameAvailability() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const parameters: NameAvailabilityParameters = {
name: "mySignalRService",
type: "Microsoft.SignalRService/SignalR"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.checkNameAvailability(
location,
parameters
);
console.log(result);
}
signalRCheckNameAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRResource, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a resource.
*
* @summary Create or update a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_CreateOrUpdate.json
*/
async function signalRCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SignalRResource = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" }
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false"
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"]
}
],
publicNetwork: { allow: ["ClientConnection"] }
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" }
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect"
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { CustomCertificate, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a custom certificate.
*
* @summary Create or update a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.json
*/
async function signalRCustomCertificatesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const parameters: CustomCertificate = {
keyVaultBaseUri: "https://myvault.keyvault.azure.net/",
keyVaultSecretName: "mycert",
keyVaultSecretVersion: "bb6a44b2743f47f68dad0d6cc9756432"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
certificateName,
parameters
);
console.log(result);
}
signalRCustomCertificatesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a custom certificate.
*
* @summary Delete a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Delete.json
*/
async function signalRCustomCertificatesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.delete(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a custom certificate.
*
* @summary Get a custom certificate.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_Get.json
*/
async function signalRCustomCertificatesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const certificateName = "myCert";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomCertificates.get(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}
signalRCustomCertificatesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all custom certificates.
*
* @summary List all custom certificates.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomCertificates_List.json
*/
async function signalRCustomCertificatesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomCertificates.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomCertificatesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { CustomDomain, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a custom domain.
*
* @summary Create or update a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_CreateOrUpdate.json
*/
async function signalRCustomDomainsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "myDomain";
const parameters: CustomDomain = {
customCertificate: {
id:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"
},
domainName: "example.com"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
name,
parameters
);
console.log(result);
}
signalRCustomDomainsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a custom domain.
*
* @summary Delete a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Delete.json
*/
async function signalRCustomDomainsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.beginDeleteAndWait(
resourceGroupName,
resourceName,
name
);
console.log(result);
}
signalRCustomDomainsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a custom domain.
*
* @summary Get a custom domain.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_Get.json
*/
async function signalRCustomDomainsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const name = "example";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRCustomDomains.get(
resourceGroupName,
resourceName,
name
);
console.log(result);
}
signalRCustomDomainsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all custom domains.
*
* @summary List all custom domains.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRCustomDomains_List.json
*/
async function signalRCustomDomainsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRCustomDomains.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRCustomDomainsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to delete a resource.
*
* @summary Operation to delete a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Delete.json
*/
async function signalRDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginDeleteAndWait(
resourceGroupName,
resourceName
);
console.log(result);
}
signalRDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the resource and its properties.
*
* @summary Get the resource and its properties.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Get.json
*/
async function signalRGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.get(resourceGroupName, resourceName);
console.log(result);
}
signalRGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Handles requests to list all resources in a resource group.
*
* @summary Handles requests to list all resources in a resource group.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListByResourceGroup.json
*/
async function signalRListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listByResourceGroup(
resourceGroupName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Handles requests to list all resources in a subscription.
*
* @summary Handles requests to list all resources in a subscription.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListBySubscription.json
*/
async function signalRListBySubscription() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalR.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
signalRListBySubscription().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the access keys of the resource.
*
* @summary Get the access keys of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListKeys.json
*/
async function signalRListKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listKeys(resourceGroupName, resourceName);
console.log(result);
}
signalRListKeys().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all available skus of the resource.
*
* @summary List all available skus of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_ListSkus.json
*/
async function signalRListSkus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listSkus(resourceGroupName, resourceName);
console.log(result);
}
signalRListSkus().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified private endpoint connection
*
* @summary Delete the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Delete.json
*/
async function signalRPrivateEndpointConnectionsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.beginDeleteAndWait(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the specified private endpoint connection
*
* @summary Get the specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Get.json
*/
async function signalRPrivateEndpointConnectionsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.get(
privateEndpointConnectionName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRPrivateEndpointConnectionsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List private endpoint connections
*
* @summary List private endpoint connections
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_List.json
*/
async function signalRPrivateEndpointConnectionsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateEndpointConnections.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateEndpointConnectionsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,50 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
PrivateEndpointConnection,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Update the state of specified private endpoint connection
*
* @summary Update the state of specified private endpoint connection
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateEndpointConnections_Update.json
*/
async function signalRPrivateEndpointConnectionsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const privateEndpointConnectionName =
"mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: PrivateEndpointConnection = {
privateEndpoint: {
id:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"
},
privateLinkServiceConnectionState: {
actionsRequired: "None",
status: "Approved"
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRPrivateEndpointConnections.update(
privateEndpointConnectionName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRPrivateEndpointConnectionsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the private link resources that need to be created for a resource.
*
* @summary Get the private link resources that need to be created for a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRPrivateLinkResources_List.json
*/
async function signalRPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRPrivateLinkResources.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
RegenerateKeyParameters,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
*
* @summary Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_RegenerateKey.json
*/
async function signalRRegenerateKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: RegenerateKeyParameters = { keyType: "Primary" };
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRegenerateKeyAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRRegenerateKey().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to restart a resource.
*
* @summary Operation to restart a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Restart.json
*/
async function signalRRestart() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginRestartAndWait(
resourceGroupName,
resourceName
);
console.log(result);
}
signalRRestart().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
SharedPrivateLinkResource,
SignalRManagementClient
} from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a shared private link resource
*
* @summary Create or update a shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json
*/
async function signalRSharedPrivateLinkResourcesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SharedPrivateLinkResource = {
groupId: "sites",
privateLinkResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp",
requestMessage: "Please approve"
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginCreateOrUpdateAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRSharedPrivateLinkResourcesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified shared private link resource
*
* @summary Delete the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json
*/
async function signalRSharedPrivateLinkResourcesDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.beginDeleteAndWait(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the specified shared private link resource
*
* @summary Get the specified shared private link resource
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_Get.json
*/
async function signalRSharedPrivateLinkResourcesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const sharedPrivateLinkResourceName = "upstream";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalRSharedPrivateLinkResources.get(
sharedPrivateLinkResourceName,
resourceGroupName,
resourceName
);
console.log(result);
}
signalRSharedPrivateLinkResourcesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List shared private link resources
*
* @summary List shared private link resources
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalRSharedPrivateLinkResources_List.json
*/
async function signalRSharedPrivateLinkResourcesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.signalRSharedPrivateLinkResources.list(
resourceGroupName,
resourceName
)) {
resArray.push(item);
}
console.log(resArray);
}
signalRSharedPrivateLinkResourcesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRResource, SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Operation to update an exiting resource.
*
* @summary Operation to update an exiting resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/SignalR_Update.json
*/
async function signalRUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const resourceName = "mySignalRService";
const parameters: SignalRResource = {
cors: { allowedOrigins: ["https://foo.com", "https://bar.com"] },
disableAadAuth: false,
disableLocalAuth: false,
features: [
{ flag: "ServiceMode", properties: {}, value: "Serverless" },
{ flag: "EnableConnectivityLogs", properties: {}, value: "True" },
{ flag: "EnableMessagingLogs", properties: {}, value: "False" },
{ flag: "EnableLiveTrace", properties: {}, value: "False" }
],
identity: { type: "SystemAssigned" },
kind: "SignalR",
liveTraceConfiguration: {
categories: [{ name: "ConnectivityLogs", enabled: "true" }],
enabled: "false"
},
location: "eastus",
networkACLs: {
defaultAction: "Deny",
privateEndpoints: [
{
name: "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
allow: ["ServerConnection"]
}
],
publicNetwork: { allow: ["ClientConnection"] }
},
publicNetworkAccess: "Enabled",
sku: { name: "Standard_S1", capacity: 1, tier: "Standard" },
tags: { key1: "value1" },
tls: { clientCertEnabled: false },
upstream: {
templates: [
{
auth: {
type: "ManagedIdentity",
managedIdentity: { resource: "api://example" }
},
categoryPattern: "*",
eventPattern: "connect,disconnect",
hubPattern: "*",
urlTemplate: "https://example.com/chat/api/connect"
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginUpdateAndWait(
resourceGroupName,
resourceName,
parameters
);
console.log(result);
}
signalRUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SignalRManagementClient } from "@azure/arm-signalr";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List resource usage quotas by location.
*
* @summary List resource usage quotas by location.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2022-02-01/examples/Usages_List.json
*/
async function usagesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.usages.list(location)) {
resArray.push(item);
}
console.log(resArray);
}
usagesList().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше