From d2cd1f257714ab92a679582850f0a27a735a77dd Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 28 Jun 2023 06:55:55 +0000 Subject: [PATCH] CodeGen from PR 24268 in Azure/azure-rest-api-specs Merge 69df78fe51252adb2dc6135d0dc3ef95cf94f638 into 4aa4e842c6821ff7ca76e80fd8229cd3c7873681 --- sdk/web-pubsub/arm-webpubsub/CHANGELOG.md | 51 +- sdk/web-pubsub/arm-webpubsub/README.md | 2 +- sdk/web-pubsub/arm-webpubsub/_meta.json | 8 +- sdk/web-pubsub/arm-webpubsub/package.json | 16 +- .../arm-webpubsub/review/arm-webpubsub.api.md | 143 +++- .../arm-webpubsub/src/models/index.ts | 284 ++++--- .../arm-webpubsub/src/models/mappers.ts | 292 +++++--- .../arm-webpubsub/src/models/parameters.ts | 37 +- .../arm-webpubsub/src/operations/index.ts | 1 + .../arm-webpubsub/src/operations/webPubSub.ts | 135 ++-- .../operations/webPubSubCustomCertificates.ts | 24 +- .../src/operations/webPubSubCustomDomains.ts | 27 +- .../src/operations/webPubSubHubs.ts | 27 +- .../webPubSubPrivateEndpointConnections.ts | 33 +- .../webPubSubPrivateLinkResources.ts | 9 +- .../src/operations/webPubSubReplicas.ts | 702 ++++++++++++++++++ .../webPubSubSharedPrivateLinkResources.ts | 29 +- .../src/operationsInterfaces/index.ts | 1 + .../src/operationsInterfaces/webPubSub.ts | 67 +- .../webPubSubCustomCertificates.ts | 15 +- .../webPubSubCustomDomains.ts | 18 +- .../src/operationsInterfaces/webPubSubHubs.ts | 18 +- .../webPubSubPrivateEndpointConnections.ts | 27 +- .../webPubSubPrivateLinkResources.ts | 3 +- .../operationsInterfaces/webPubSubReplicas.ts | 166 +++++ .../webPubSubSharedPrivateLinkResources.ts | 18 +- .../src/webPubSubManagementClient.ts | 11 +- .../arm-webpubsub/test/sampleTest.ts | 43 ++ sdk/web-pubsub/arm-webpubsub/tsconfig.json | 10 +- 29 files changed, 1758 insertions(+), 459 deletions(-) create mode 100644 sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts create mode 100644 sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts create mode 100644 sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts diff --git a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md index 8985807b1497..2278cbee8b3e 100644 --- a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md +++ b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md @@ -1,15 +1,50 @@ # Release History + +## 2.0.0-beta.1 (2023-06-28) + +**Features** -## 1.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group WebPubSubReplicas + - Added operation WebPubSub.listReplicaSkus + - Added Interface Replica + - Added Interface ReplicaList + - Added Interface WebPubSubListReplicaSkusOptionalParams + - Added Interface WebPubSubRegenerateKeyHeaders + - Added Interface WebPubSubReplicasCreateOrUpdateOptionalParams + - Added Interface WebPubSubReplicasDeleteOptionalParams + - Added Interface WebPubSubReplicasGetOptionalParams + - Added Interface WebPubSubReplicasListNextOptionalParams + - Added Interface WebPubSubReplicasListOptionalParams + - Added Interface WebPubSubReplicasRestartHeaders + - Added Interface WebPubSubReplicasRestartOptionalParams + - Added Interface WebPubSubReplicasUpdateHeaders + - Added Interface WebPubSubReplicasUpdateOptionalParams + - Added Interface WebPubSubRestartHeaders + - Added Interface WebPubSubUpdateHeaders + - Added Type Alias ServiceKind + - Added Type Alias WebPubSubListReplicaSkusResponse + - Added Type Alias WebPubSubReplicasCreateOrUpdateResponse + - Added Type Alias WebPubSubReplicasGetResponse + - Added Type Alias WebPubSubReplicasListNextResponse + - Added Type Alias WebPubSubReplicasListResponse + - Added Type Alias WebPubSubReplicasRestartResponse + - Added Type Alias WebPubSubReplicasUpdateResponse + - Added Type Alias WebPubSubRestartResponse + - Interface Resource has a new optional parameter systemData + - Interface WebPubSubResource has a new optional parameter kind + - Added Enum KnownServiceKind -### Other Changes +**Breaking Changes** + - Interface CustomCertificate no longer has parameter systemData + - Interface CustomDomain no longer has parameter systemData + - Interface PrivateEndpointConnection no longer has parameter systemData + - Interface SharedPrivateLinkResource no longer has parameter systemData + - Interface WebPubSubHub no longer has parameter systemData + - Interface WebPubSubResource no longer has parameter systemData + - Parameter location of interface TrackedResource is now required + + ## 1.1.0 (2023-03-09) **Features** diff --git a/sdk/web-pubsub/arm-webpubsub/README.md b/sdk/web-pubsub/arm-webpubsub/README.md index 1be3dc2e4569..3b32767350c2 100644 --- a/sdk/web-pubsub/arm-webpubsub/README.md +++ b/sdk/web-pubsub/arm-webpubsub/README.md @@ -6,7 +6,7 @@ REST API for Azure WebPubSub Service [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-webpubsub) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/web-pubsub/arm-webpubsub/_meta.json b/sdk/web-pubsub/arm-webpubsub/_meta.json index efedd0ba9d93..4570cab4a899 100644 --- a/sdk/web-pubsub/arm-webpubsub/_meta.json +++ b/sdk/web-pubsub/arm-webpubsub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "4f4044394791773e6e7e82a9bd90d3935caaca1b", + "commit": "ca5279e5bd89efefc4e531d1ba56e6f153e39f72", "readme": "specification/webpubsub/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\webpubsub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.9 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/webpubsub/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/package.json b/sdk/web-pubsub/arm-webpubsub/package.json index b4ea6b016e2e..e4f3f64eb260 100644 --- a/sdk/web-pubsub/arm-webpubsub/package.json +++ b/sdk/web-pubsub/arm-webpubsub/package.json @@ -3,12 +3,12 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for WebPubSubManagementClient.", - "version": "1.1.1", + "version": "2.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub" +} \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md index 2d005c71b982..cc87fc72417f 100644 --- a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md +++ b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md @@ -22,7 +22,6 @@ export interface CustomCertificate extends ProxyResource { keyVaultSecretName: string; keyVaultSecretVersion?: string; readonly provisioningState?: ProvisioningState; - readonly systemData?: SystemData; } // @public @@ -36,7 +35,6 @@ export interface CustomDomain extends ProxyResource { customCertificate: ResourceReference; domainName: string; readonly provisioningState?: ProvisioningState; - readonly systemData?: SystemData; } // @public @@ -197,6 +195,12 @@ export enum KnownScaleType { None = "None" } +// @public +export enum KnownServiceKind { + SocketIO = "SocketIO", + WebPubSub = "WebPubSub" +} + // @public export enum KnownSharedPrivateLinkResourceStatus { Approved = "Approved", @@ -358,7 +362,6 @@ export interface PrivateEndpointConnection extends ProxyResource { privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: ProvisioningState; - readonly systemData?: SystemData; } // @public @@ -403,10 +406,23 @@ export interface RegenerateKeyParameters { keyType?: KeyType_2; } +// @public +export interface Replica extends TrackedResource { + readonly provisioningState?: ProvisioningState; + sku?: ResourceSku; +} + +// @public (undocumented) +export interface ReplicaList { + nextLink?: string; + value?: Replica[]; +} + // @public export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -438,6 +454,9 @@ export interface ResourceSku { // @public export type ScaleType = string; +// @public +export type ServiceKind = string; + // @public export interface ServiceSpecification { logSpecifications?: LogSpecification[]; @@ -464,7 +483,6 @@ export interface SharedPrivateLinkResource extends ProxyResource { readonly provisioningState?: ProvisioningState; requestMessage?: string; readonly status?: SharedPrivateLinkResourceStatus; - readonly systemData?: SystemData; } // @public @@ -531,7 +549,7 @@ export interface SystemData { // @public export interface TrackedResource extends Resource { - location?: string; + location: string; tags?: { [propertyName: string]: string; }; @@ -579,8 +597,8 @@ export interface WebPubSub { beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: WebPubSubDeleteOptionalParams): Promise; beginRegenerateKey(resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, options?: WebPubSubRegenerateKeyOptionalParams): Promise, WebPubSubRegenerateKeyResponse>>; beginRegenerateKeyAndWait(resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, options?: WebPubSubRegenerateKeyOptionalParams): Promise; - beginRestart(resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams): Promise, void>>; - beginRestartAndWait(resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams): Promise; + beginRestart(resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams): Promise, WebPubSubRestartResponse>>; + beginRestartAndWait(resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams): Promise; beginUpdate(resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, options?: WebPubSubUpdateOptionalParams): Promise, WebPubSubUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, options?: WebPubSubUpdateOptionalParams): Promise; checkNameAvailability(location: string, parameters: NameAvailabilityParameters, options?: WebPubSubCheckNameAvailabilityOptionalParams): Promise; @@ -588,6 +606,7 @@ export interface WebPubSub { listByResourceGroup(resourceGroupName: string, options?: WebPubSubListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: WebPubSubListBySubscriptionOptionalParams): PagedAsyncIterableIterator; listKeys(resourceGroupName: string, resourceName: string, options?: WebPubSubListKeysOptionalParams): Promise; + listReplicaSkus(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubListReplicaSkusOptionalParams): Promise; listSkus(resourceGroupName: string, resourceName: string, options?: WebPubSubListSkusOptionalParams): Promise; } @@ -712,7 +731,6 @@ export type WebPubSubGetResponse = WebPubSubResource; // @public export interface WebPubSubHub extends ProxyResource { properties: WebPubSubHubProperties; - readonly systemData?: SystemData; } // @public @@ -817,6 +835,13 @@ export interface WebPubSubListKeysOptionalParams extends coreClient.OperationOpt // @public export type WebPubSubListKeysResponse = WebPubSubKeys; +// @public +export interface WebPubSubListReplicaSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubListReplicaSkusResponse = SkuList; + // @public export interface WebPubSubListSkusOptionalParams extends coreClient.OperationOptions { } @@ -850,6 +875,8 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { // (undocumented) webPubSubPrivateLinkResources: WebPubSubPrivateLinkResources; // (undocumented) + webPubSubReplicas: WebPubSubReplicas; + // (undocumented) webPubSubSharedPrivateLinkResources: WebPubSubSharedPrivateLinkResources; } @@ -929,6 +956,12 @@ export interface WebPubSubPrivateLinkResourcesListOptionalParams extends coreCli // @public export type WebPubSubPrivateLinkResourcesListResponse = PrivateLinkResourceList; +// @public +export interface WebPubSubRegenerateKeyHeaders { + // (undocumented) + location?: string; +} + // @public export interface WebPubSubRegenerateKeyOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -938,6 +971,83 @@ export interface WebPubSubRegenerateKeyOptionalParams extends coreClient.Operati // @public export type WebPubSubRegenerateKeyResponse = WebPubSubKeys; +// @public +export interface WebPubSubReplicas { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, replicaName: string, parameters: Replica, options?: WebPubSubReplicasCreateOrUpdateOptionalParams): Promise, WebPubSubReplicasCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, replicaName: string, parameters: Replica, options?: WebPubSubReplicasCreateOrUpdateOptionalParams): Promise; + beginRestart(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubReplicasRestartOptionalParams): Promise, WebPubSubReplicasRestartResponse>>; + beginRestartAndWait(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubReplicasRestartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, replicaName: string, parameters: Replica, options?: WebPubSubReplicasUpdateOptionalParams): Promise, WebPubSubReplicasUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, replicaName: string, parameters: Replica, options?: WebPubSubReplicasUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubReplicasDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubReplicasGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: WebPubSubReplicasListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WebPubSubReplicasCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type WebPubSubReplicasCreateOrUpdateResponse = Replica; + +// @public +export interface WebPubSubReplicasDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WebPubSubReplicasGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicasGetResponse = Replica; + +// @public +export interface WebPubSubReplicasListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicasListNextResponse = ReplicaList; + +// @public +export interface WebPubSubReplicasListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicasListResponse = ReplicaList; + +// @public +export interface WebPubSubReplicasRestartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface WebPubSubReplicasRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type WebPubSubReplicasRestartResponse = WebPubSubReplicasRestartHeaders; + +// @public +export interface WebPubSubReplicasUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface WebPubSubReplicasUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type WebPubSubReplicasUpdateResponse = Replica; + // @public export type WebPubSubRequestType = string; @@ -949,6 +1059,7 @@ export interface WebPubSubResource extends TrackedResource { readonly hostName?: string; readonly hostNamePrefix?: string; identity?: ManagedIdentity; + kind?: ServiceKind; liveTraceConfiguration?: LiveTraceConfiguration; networkACLs?: WebPubSubNetworkACLs; readonly privateEndpointConnections?: PrivateEndpointConnection[]; @@ -959,7 +1070,6 @@ export interface WebPubSubResource extends TrackedResource { readonly serverPort?: number; readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; sku?: ResourceSku; - readonly systemData?: SystemData; tls?: WebPubSubTlsSettings; readonly version?: string; } @@ -970,12 +1080,21 @@ export interface WebPubSubResourceList { value?: WebPubSubResource[]; } +// @public +export interface WebPubSubRestartHeaders { + // (undocumented) + location?: string; +} + // @public export interface WebPubSubRestartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type WebPubSubRestartResponse = WebPubSubRestartHeaders; + // @public export interface WebPubSubSharedPrivateLinkResources { beginCreateOrUpdate(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, parameters: SharedPrivateLinkResource, options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise, WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse>>; @@ -1030,6 +1149,12 @@ export interface WebPubSubTlsSettings { clientCertEnabled?: boolean; } +// @public +export interface WebPubSubUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface WebPubSubUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts index b881cb555499..85aca7121da1 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts @@ -159,7 +159,7 @@ export interface ErrorAdditionalInfo { /** Data POST-ed to the nameAvailability action */ export interface NameAvailabilityParameters { - /** The resource type. Can be "Microsoft.SignalRService/SignalR" or "Microsoft.SignalRService/webPubSub" */ + /** The resource type. Can be "Microsoft.SignalRService/SignalR", "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas" or "Microsoft.SignalRService/WebPubSub/replicas" */ type: string; /** The resource name to validate. e.g."my-resource-name" */ name: string; @@ -254,22 +254,6 @@ export interface ResourceSku { capacity?: number; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - /** Private endpoint */ export interface PrivateEndpoint { /** Full qualified Id of the private endpoint */ @@ -286,28 +270,49 @@ export interface PrivateLinkServiceConnectionState { actionsRequired?: string; } -/** The core properties of ARM resources. */ +/** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource Id for the resource. + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The name of the resource. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The type of the resource - e.g. "Microsoft.SignalRService/SignalR" + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** TLS settings for the resource */ export interface WebPubSubTlsSettings { - /** Request client certificate during TLS handshake if enabled */ + /** Request client certificate during TLS handshake if enabled. Not supported for free tier. Any input will be ignored for free tier. */ clientCertEnabled?: boolean; } @@ -585,11 +590,13 @@ export interface RegenerateKeyParameters { keyType?: KeyType; } -/** A list of shared private link resources */ -export interface SharedPrivateLinkResourceList { - /** The list of the shared private link resources */ - value?: SharedPrivateLinkResource[]; - /** Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ +export interface ReplicaList { + /** List of the replica */ + value?: Replica[]; + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ nextLink?: string; } @@ -656,15 +663,23 @@ export interface SkuCapacity { readonly scaleType?: ScaleType; } -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +/** A list of shared private link resources */ +export interface SharedPrivateLinkResourceList { + /** The list of the shared private link resources */ + value?: SharedPrivateLinkResource[]; + /** Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ + nextLink?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} -/** The resource model definition for a ARM tracked top level resource. */ +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export interface TrackedResource extends Resource { - /** The GEO location of the resource. e.g. West US | East US | North Central US | South Central US. */ - location?: string; - /** Tags of the service which is a list of key value pairs that describe the resource. */ + /** Resource tags. */ tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; } /** ACL for a private endpoint */ @@ -704,11 +719,6 @@ export interface EventHubEndpoint extends EventListenerEndpoint { /** A private endpoint connection to an azure resource */ export interface PrivateEndpointConnection extends ProxyResource { - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -727,11 +737,6 @@ export interface PrivateEndpointConnection extends ProxyResource { /** Describes a Shared Private Link Resource */ export interface SharedPrivateLinkResource extends ProxyResource { - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** The group id from the provider of resource the shared private link resource is for */ groupId?: string; /** The resource id of the resource the shared private link resource is for */ @@ -752,11 +757,6 @@ export interface SharedPrivateLinkResource extends ProxyResource { /** A custom certificate. */ export interface CustomCertificate extends ProxyResource { - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -772,11 +772,6 @@ export interface CustomCertificate extends ProxyResource { /** A custom domain */ export interface CustomDomain extends ProxyResource { - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -790,11 +785,6 @@ export interface CustomDomain extends ProxyResource { /** A hub setting */ export interface WebPubSubHub extends ProxyResource { - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** Properties of a hub. */ properties: WebPubSubHubProperties; } @@ -815,13 +805,10 @@ export interface PrivateLinkResource extends ProxyResource { export interface WebPubSubResource extends TrackedResource { /** The billing information of the resource. */ sku?: ResourceSku; + /** The kind of the service */ + kind?: ServiceKind; /** A class represent managed identities used for request and response */ identity?: ManagedIdentity; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -895,6 +882,42 @@ export interface WebPubSubResource extends TrackedResource { disableAadAuth?: boolean; } +/** A class represent a replica resource. */ +export interface Replica extends TrackedResource { + /** The billing information of the resource. */ + sku?: ResourceSku; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines headers for WebPubSub_update operation. */ +export interface WebPubSubUpdateHeaders { + location?: string; +} + +/** Defines headers for WebPubSub_regenerateKey operation. */ +export interface WebPubSubRegenerateKeyHeaders { + location?: string; +} + +/** Defines headers for WebPubSub_restart operation. */ +export interface WebPubSubRestartHeaders { + location?: string; +} + +/** Defines headers for WebPubSubReplicas_update operation. */ +export interface WebPubSubReplicasUpdateHeaders { + location?: string; +} + +/** Defines headers for WebPubSubReplicas_restart operation. */ +export interface WebPubSubReplicasRestartHeaders { + location?: string; +} + /** Known values of {@link WebPubSubSkuTier} that the service accepts. */ export enum KnownWebPubSubSkuTier { /** Free */ @@ -958,30 +981,6 @@ export enum KnownProvisioningState { */ export type ProvisioningState = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - /** Known values of {@link PrivateLinkServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateLinkServiceConnectionStatus { /** Pending */ @@ -1006,6 +1005,30 @@ export enum KnownPrivateLinkServiceConnectionStatus { */ export type PrivateLinkServiceConnectionStatus = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link SharedPrivateLinkResourceStatus} that the service accepts. */ export enum KnownSharedPrivateLinkResourceStatus { /** Pending */ @@ -1075,6 +1098,24 @@ export enum KnownWebPubSubRequestType { */ export type WebPubSubRequestType = string; +/** Known values of {@link ServiceKind} that the service accepts. */ +export enum KnownServiceKind { + /** WebPubSub */ + WebPubSub = "WebPubSub", + /** SocketIO */ + SocketIO = "SocketIO" +} + +/** + * Defines values for ServiceKind. \ + * {@link KnownServiceKind} can be used interchangeably with ServiceKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **WebPubSub** \ + * **SocketIO** + */ +export type ServiceKind = string; + /** Known values of {@link ManagedIdentityType} that the service accepts. */ export enum KnownManagedIdentityType { /** None */ @@ -1280,6 +1321,13 @@ export interface WebPubSubRegenerateKeyOptionalParams /** Contains response data for the regenerateKey operation. */ export type WebPubSubRegenerateKeyResponse = WebPubSubKeys; +/** Optional parameters. */ +export interface WebPubSubListReplicaSkusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listReplicaSkus operation. */ +export type WebPubSubListReplicaSkusResponse = SkuList; + /** Optional parameters. */ export interface WebPubSubRestartOptionalParams extends coreClient.OperationOptions { @@ -1289,6 +1337,9 @@ export interface WebPubSubRestartOptionalParams resumeFrom?: string; } +/** Contains response data for the restart operation. */ +export type WebPubSubRestartResponse = WebPubSubRestartHeaders; + /** Optional parameters. */ export interface WebPubSubListSkusOptionalParams extends coreClient.OperationOptions {} @@ -1495,6 +1546,67 @@ export interface WebPubSubPrivateLinkResourcesListNextOptionalParams /** Contains response data for the listNext operation. */ export type WebPubSubPrivateLinkResourcesListNextResponse = PrivateLinkResourceList; +/** Optional parameters. */ +export interface WebPubSubReplicasListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type WebPubSubReplicasListResponse = ReplicaList; + +/** Optional parameters. */ +export interface WebPubSubReplicasGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WebPubSubReplicasGetResponse = Replica; + +/** Optional parameters. */ +export interface WebPubSubReplicasCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type WebPubSubReplicasCreateOrUpdateResponse = Replica; + +/** Optional parameters. */ +export interface WebPubSubReplicasDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface WebPubSubReplicasUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type WebPubSubReplicasUpdateResponse = Replica; + +/** Optional parameters. */ +export interface WebPubSubReplicasRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the restart operation. */ +export type WebPubSubReplicasRestartResponse = WebPubSubReplicasRestartHeaders; + +/** Optional parameters. */ +export interface WebPubSubReplicasListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type WebPubSubReplicasListNextResponse = ReplicaList; + /** Optional parameters. */ export interface WebPubSubSharedPrivateLinkResourcesListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts index 766a83dbb79f..d55f3bde14ad 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts @@ -578,51 +578,6 @@ export const ResourceSku: coreClient.CompositeMapper = { } }; -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", @@ -690,6 +645,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -701,7 +708,7 @@ export const WebPubSubTlsSettings: coreClient.CompositeMapper = { className: "WebPubSubTlsSettings", modelProperties: { clientCertEnabled: { - defaultValue: true, + defaultValue: false, serializedName: "clientCertEnabled", type: { name: "Boolean" @@ -1361,10 +1368,10 @@ export const RegenerateKeyParameters: coreClient.CompositeMapper = { } }; -export const SharedPrivateLinkResourceList: coreClient.CompositeMapper = { +export const ReplicaList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedPrivateLinkResourceList", + className: "ReplicaList", modelProperties: { value: { serializedName: "value", @@ -1373,7 +1380,7 @@ export const SharedPrivateLinkResourceList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SharedPrivateLinkResource" + className: "Replica" } } } @@ -1496,6 +1503,33 @@ export const SkuCapacity: coreClient.CompositeMapper = { } }; +export const SharedPrivateLinkResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SharedPrivateLinkResourceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1512,18 +1546,19 @@ export const TrackedResource: coreClient.CompositeMapper = { className: "TrackedResource", modelProperties: { ...Resource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" - } - }, tags: { serializedName: "tags", type: { name: "Dictionary", value: { type: { name: "String" } } } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } } } } @@ -1610,13 +1645,6 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { className: "PrivateEndpointConnection", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1660,13 +1688,6 @@ export const SharedPrivateLinkResource: coreClient.CompositeMapper = { className: "SharedPrivateLinkResource", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, groupId: { serializedName: "properties.groupId", type: { @@ -1709,13 +1730,6 @@ export const CustomCertificate: coreClient.CompositeMapper = { className: "CustomCertificate", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1753,13 +1767,6 @@ export const CustomDomain: coreClient.CompositeMapper = { className: "CustomDomain", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1791,13 +1798,6 @@ export const WebPubSubHub: coreClient.CompositeMapper = { className: "WebPubSubHub", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, properties: { serializedName: "properties", type: { @@ -1872,18 +1872,17 @@ export const WebPubSubResource: coreClient.CompositeMapper = { className: "ResourceSku" } }, - identity: { - serializedName: "identity", + kind: { + serializedName: "kind", type: { - name: "Composite", - className: "ManagedIdentity" + name: "String" } }, - systemData: { - serializedName: "systemData", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "SystemData" + className: "ManagedIdentity" } }, provisioningState: { @@ -2014,6 +2013,105 @@ export const WebPubSubResource: coreClient.CompositeMapper = { } }; +export const Replica: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Replica", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ResourceSku" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubRegenerateKeyHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubRegenerateKeyHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubReplicasUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubReplicasUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubReplicasRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubReplicasRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { EventListenerFilter: EventListenerFilter, EventListenerEndpoint: EventListenerEndpoint, diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts index 0eea4af06513..2cb46857de44 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts @@ -19,6 +19,7 @@ import { CustomDomain as CustomDomainMapper, WebPubSubHub as WebPubSubHubMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, + Replica as ReplicaMapper, SharedPrivateLinkResource as SharedPrivateLinkResourceMapper } from "../models/mappers"; @@ -49,7 +50,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-02-01", + defaultValue: "2023-06-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -104,7 +105,7 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -112,6 +113,10 @@ export const subscriptionId: OperationURLParameter = { export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, serializedName: "resourceGroupName", required: true, type: { @@ -123,6 +128,11 @@ export const resourceGroupName: OperationURLParameter = { export const resourceName: OperationURLParameter = { parameterPath: "resourceName", mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"), + MaxLength: 63, + MinLength: 3 + }, serializedName: "resourceName", required: true, type: { @@ -141,6 +151,22 @@ export const parameters2: OperationParameter = { mapper: RegenerateKeyParametersMapper }; +export const replicaName: OperationURLParameter = { + parameterPath: "replicaName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"), + MaxLength: 63, + MinLength: 3 + }, + serializedName: "replicaName", + required: true, + type: { + name: "String" + } + } +}; + export const certificateName: OperationURLParameter = { parameterPath: "certificateName", mapper: { @@ -205,6 +231,11 @@ export const parameters6: OperationParameter = { mapper: PrivateEndpointConnectionMapper }; +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: ReplicaMapper +}; + export const sharedPrivateLinkResourceName: OperationURLParameter = { parameterPath: "sharedPrivateLinkResourceName", mapper: { @@ -216,7 +247,7 @@ export const sharedPrivateLinkResourceName: OperationURLParameter = { } }; -export const parameters7: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: SharedPrivateLinkResourceMapper }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts index d8a87620926b..9ed9e9b6ad7f 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts @@ -14,4 +14,5 @@ export * from "./webPubSubCustomDomains"; export * from "./webPubSubHubs"; export * from "./webPubSubPrivateEndpointConnections"; export * from "./webPubSubPrivateLinkResources"; +export * from "./webPubSubReplicas"; export * from "./webPubSubSharedPrivateLinkResources"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts index 4aa56606e16e..1345ecee8e82 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts @@ -42,7 +42,10 @@ import { RegenerateKeyParameters, WebPubSubRegenerateKeyOptionalParams, WebPubSubRegenerateKeyResponse, + WebPubSubListReplicaSkusOptionalParams, + WebPubSubListReplicaSkusResponse, WebPubSubRestartOptionalParams, + WebPubSubRestartResponse, WebPubSubListSkusOptionalParams, WebPubSubListSkusResponse, WebPubSubListBySubscriptionNextResponse, @@ -118,8 +121,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Handles requests to list all resources in a resource group. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -218,8 +220,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Handles requests to list all resources in a resource group. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -234,8 +235,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Get the resource and its properties. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -252,8 +252,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Create or update a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation * @param options The options parameters. @@ -318,7 +317,8 @@ export class WebPubSubImpl implements WebPubSub { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -326,8 +326,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Create or update a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation * @param options The options parameters. @@ -349,8 +348,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Operation to delete a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -414,8 +412,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Operation to delete a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -434,8 +431,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Operation to update an exiting resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation * @param options The options parameters. @@ -500,7 +496,8 @@ export class WebPubSubImpl implements WebPubSub { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -508,8 +505,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Operation to update an exiting resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation * @param options The options parameters. @@ -531,8 +527,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Get the access keys of the resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -550,8 +545,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the * same time. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param options The options parameters. @@ -617,7 +611,7 @@ export class WebPubSubImpl implements WebPubSub { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -626,8 +620,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the * same time. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param options The options parameters. @@ -647,10 +640,28 @@ export class WebPubSubImpl implements WebPubSub { return poller.pollUntilDone(); } + /** + * List all available skus of the replica resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + listReplicaSkus( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubListReplicaSkusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, replicaName, options }, + listReplicaSkusOperationSpec + ); + } + /** * Operation to restart a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -658,11 +669,16 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubRestartResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -703,10 +719,13 @@ export class WebPubSubImpl implements WebPubSub { args: { resourceGroupName, resourceName, options }, spec: restartOperationSpec }); - const poller = await createHttpPoller>(lro, { + const poller = await createHttpPoller< + WebPubSubRestartResponse, + OperationState + >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -714,8 +733,7 @@ export class WebPubSubImpl implements WebPubSub { /** * Operation to restart a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -723,7 +741,7 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams - ): Promise { + ): Promise { const poller = await this.beginRestart( resourceGroupName, resourceName, @@ -734,8 +752,7 @@ export class WebPubSubImpl implements WebPubSub { /** * List all available skus of the resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -767,8 +784,7 @@ export class WebPubSubImpl implements WebPubSub { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -1013,15 +1029,46 @@ const regenerateKeyOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const listReplicaSkusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SkuList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept], + serializer +}; const restartOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart", httpMethod: "POST", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.WebPubSubRestartHeaders + }, + 201: { + headersMapper: Mappers.WebPubSubRestartHeaders + }, + 202: { + headersMapper: Mappers.WebPubSubRestartHeaders + }, + 204: { + headersMapper: Mappers.WebPubSubRestartHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts index e8d35f19afe8..af8d6d50a43d 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts @@ -48,8 +48,7 @@ export class WebPubSubCustomCertificatesImpl /** * List all custom certificates. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -125,8 +124,7 @@ export class WebPubSubCustomCertificatesImpl /** * List all custom certificates. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -143,8 +141,7 @@ export class WebPubSubCustomCertificatesImpl /** * Get a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param options The options parameters. @@ -163,8 +160,7 @@ export class WebPubSubCustomCertificatesImpl /** * Create or update a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param parameters A custom certificate. @@ -237,7 +233,8 @@ export class WebPubSubCustomCertificatesImpl OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -245,8 +242,7 @@ export class WebPubSubCustomCertificatesImpl /** * Create or update a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param parameters A custom certificate. @@ -271,8 +267,7 @@ export class WebPubSubCustomCertificatesImpl /** * Delete a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param options The options parameters. @@ -291,8 +286,7 @@ export class WebPubSubCustomCertificatesImpl /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts index b74081da2b01..6422056e0a06 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts @@ -47,8 +47,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * List all custom domains. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -124,8 +123,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * List all custom domains. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -142,8 +140,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * Get a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. @@ -162,8 +159,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * Create or update a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain @@ -230,7 +226,8 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -238,8 +235,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * Create or update a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain @@ -264,8 +260,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * Delete a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. @@ -331,8 +326,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * Delete a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. @@ -354,8 +348,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts index 4740914a841c..4468015ac036 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts @@ -47,8 +47,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * List hub settings. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -124,8 +123,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * List hub settings. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -143,8 +141,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * Get a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -163,8 +160,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * Create or update a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties * @param options The options parameters. @@ -230,7 +226,8 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -239,8 +236,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * Create or update a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties * @param options The options parameters. @@ -265,8 +261,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * Delete a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -332,8 +327,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * Delete a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -354,8 +348,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts index b4972ecec07b..67d0232e972b 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts @@ -48,8 +48,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * List private endpoint connections - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -125,8 +124,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * List private endpoint connections - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -143,9 +141,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * Get the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -168,9 +166,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * Update the state of specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties * @param options The options parameters. @@ -196,9 +194,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * Delete the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -268,9 +266,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * Delete the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -291,8 +289,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts index 34e58a7d62f6..b5f8327d4ecb 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts @@ -37,8 +37,7 @@ export class WebPubSubPrivateLinkResourcesImpl /** * Get the private link resources that need to be created for a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -114,8 +113,7 @@ export class WebPubSubPrivateLinkResourcesImpl /** * Get the private link resources that need to be created for a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -132,8 +130,7 @@ export class WebPubSubPrivateLinkResourcesImpl /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts new file mode 100644 index 000000000000..94888042b8e6 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts @@ -0,0 +1,702 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { WebPubSubReplicas } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClient } from "../webPubSubManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Replica, + WebPubSubReplicasListNextOptionalParams, + WebPubSubReplicasListOptionalParams, + WebPubSubReplicasListResponse, + WebPubSubReplicasGetOptionalParams, + WebPubSubReplicasGetResponse, + WebPubSubReplicasCreateOrUpdateOptionalParams, + WebPubSubReplicasCreateOrUpdateResponse, + WebPubSubReplicasDeleteOptionalParams, + WebPubSubReplicasUpdateOptionalParams, + WebPubSubReplicasUpdateResponse, + WebPubSubReplicasRestartOptionalParams, + WebPubSubReplicasRestartResponse, + WebPubSubReplicasListNextResponse +} from "../models"; + +/// +/** Class containing WebPubSubReplicas operations. */ +export class WebPubSubReplicasImpl implements WebPubSubReplicas { + private readonly client: WebPubSubManagementClient; + + /** + * Initialize a new instance of the class WebPubSubReplicas class. + * @param client Reference to the service client + */ + constructor(client: WebPubSubManagementClient) { + this.client = client; + } + + /** + * List all replicas belong to this resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + options?: WebPubSubReplicasListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + resourceName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: WebPubSubReplicasListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: WebPubSubReplicasListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, resourceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: WebPubSubReplicasListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * List all replicas belong to this resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + options?: WebPubSubReplicasListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec + ); + } + + /** + * Get the replica and its properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, replicaName, options }, + getOperationSpec + ); + } + + /** + * Create or update a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + replicaName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + WebPubSubReplicasCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + replicaName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Operation to delete a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, replicaName, options }, + deleteOperationSpec + ); + } + + /** + * Operation to update an exiting replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + replicaName, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + WebPubSubReplicasUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Operation to update an exiting replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + replicaName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Operation to restart a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + async beginRestart( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasRestartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, replicaName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + WebPubSubReplicasRestartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Operation to restart a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + resourceName, + replicaName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: WebPubSubReplicasListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicaList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Replica + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Replica + }, + 201: { + bodyMapper: Mappers.Replica + }, + 202: { + bodyMapper: Mappers.Replica + }, + 204: { + bodyMapper: Mappers.Replica + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Replica + }, + 201: { + bodyMapper: Mappers.Replica + }, + 202: { + bodyMapper: Mappers.Replica + }, + 204: { + bodyMapper: Mappers.Replica + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/restart", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.WebPubSubReplicasRestartHeaders + }, + 201: { + headersMapper: Mappers.WebPubSubReplicasRestartHeaders + }, + 202: { + headersMapper: Mappers.WebPubSubReplicasRestartHeaders + }, + 204: { + headersMapper: Mappers.WebPubSubReplicasRestartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicaList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts index 00fc6c2e5447..5dd7ead43aa7 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts @@ -48,8 +48,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * List shared private link resources - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -125,8 +124,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * List shared private link resources - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -144,8 +142,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Get the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -169,8 +166,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Create or update a shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource * @param options The options parameters. @@ -242,7 +238,8 @@ export class WebPubSubSharedPrivateLinkResourcesImpl OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -251,8 +248,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Create or update a shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource * @param options The options parameters. @@ -277,8 +273,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Delete the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -349,8 +344,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Delete the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -371,8 +365,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * ListNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -458,7 +451,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts index d8a87620926b..9ed9e9b6ad7f 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts @@ -14,4 +14,5 @@ export * from "./webPubSubCustomDomains"; export * from "./webPubSubHubs"; export * from "./webPubSubPrivateEndpointConnections"; export * from "./webPubSubPrivateLinkResources"; +export * from "./webPubSubReplicas"; export * from "./webPubSubSharedPrivateLinkResources"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts index 9d319607674c..09620b218ebc 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts @@ -27,7 +27,10 @@ import { RegenerateKeyParameters, WebPubSubRegenerateKeyOptionalParams, WebPubSubRegenerateKeyResponse, + WebPubSubListReplicaSkusOptionalParams, + WebPubSubListReplicaSkusResponse, WebPubSubRestartOptionalParams, + WebPubSubRestartResponse, WebPubSubListSkusOptionalParams, WebPubSubListSkusResponse } from "../models"; @@ -44,8 +47,7 @@ export interface WebPubSub { ): PagedAsyncIterableIterator; /** * Handles requests to list all resources in a resource group. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -65,8 +67,7 @@ export interface WebPubSub { ): Promise; /** * Get the resource and its properties. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -77,8 +78,7 @@ export interface WebPubSub { ): Promise; /** * Create or update a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation * @param options The options parameters. @@ -96,8 +96,7 @@ export interface WebPubSub { >; /** * Create or update a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation * @param options The options parameters. @@ -110,8 +109,7 @@ export interface WebPubSub { ): Promise; /** * Operation to delete a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -122,8 +120,7 @@ export interface WebPubSub { ): Promise, void>>; /** * Operation to delete a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -134,8 +131,7 @@ export interface WebPubSub { ): Promise; /** * Operation to update an exiting resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation * @param options The options parameters. @@ -153,8 +149,7 @@ export interface WebPubSub { >; /** * Operation to update an exiting resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation * @param options The options parameters. @@ -167,8 +162,7 @@ export interface WebPubSub { ): Promise; /** * Get the access keys of the resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -180,8 +174,7 @@ export interface WebPubSub { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the * same time. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param options The options parameters. @@ -200,8 +193,7 @@ export interface WebPubSub { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the * same time. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param options The options parameters. @@ -212,10 +204,22 @@ export interface WebPubSub { parameters: RegenerateKeyParameters, options?: WebPubSubRegenerateKeyOptionalParams ): Promise; + /** + * List all available skus of the replica resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + listReplicaSkus( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubListReplicaSkusOptionalParams + ): Promise; /** * Operation to restart a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -223,11 +227,15 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubRestartResponse + > + >; /** * Operation to restart a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -235,11 +243,10 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, options?: WebPubSubRestartOptionalParams - ): Promise; + ): Promise; /** * List all available skus of the resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts index 2c4f7c0eb349..a2f44e9d2fbb 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts @@ -23,8 +23,7 @@ import { export interface WebPubSubCustomCertificates { /** * List all custom certificates. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -35,8 +34,7 @@ export interface WebPubSubCustomCertificates { ): PagedAsyncIterableIterator; /** * Get a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param options The options parameters. @@ -49,8 +47,7 @@ export interface WebPubSubCustomCertificates { ): Promise; /** * Create or update a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param parameters A custom certificate. @@ -70,8 +67,7 @@ export interface WebPubSubCustomCertificates { >; /** * Create or update a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param parameters A custom certificate. @@ -86,8 +82,7 @@ export interface WebPubSubCustomCertificates { ): Promise; /** * Delete a custom certificate. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts index 47a55914ec88..35ed68a92114 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts @@ -23,8 +23,7 @@ import { export interface WebPubSubCustomDomains { /** * List all custom domains. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -35,8 +34,7 @@ export interface WebPubSubCustomDomains { ): PagedAsyncIterableIterator; /** * Get a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. @@ -49,8 +47,7 @@ export interface WebPubSubCustomDomains { ): Promise; /** * Create or update a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain @@ -70,8 +67,7 @@ export interface WebPubSubCustomDomains { >; /** * Create or update a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain @@ -86,8 +82,7 @@ export interface WebPubSubCustomDomains { ): Promise; /** * Delete a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. @@ -100,8 +95,7 @@ export interface WebPubSubCustomDomains { ): Promise, void>>; /** * Delete a custom domain. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param options The options parameters. diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts index ca8a9013e3b7..ebaad087b76d 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts @@ -23,8 +23,7 @@ import { export interface WebPubSubHubs { /** * List hub settings. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -36,8 +35,7 @@ export interface WebPubSubHubs { /** * Get a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -50,8 +48,7 @@ export interface WebPubSubHubs { /** * Create or update a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties * @param options The options parameters. @@ -71,8 +68,7 @@ export interface WebPubSubHubs { /** * Create or update a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties * @param options The options parameters. @@ -87,8 +83,7 @@ export interface WebPubSubHubs { /** * Delete a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -101,8 +96,7 @@ export interface WebPubSubHubs { /** * Delete a hub setting. * @param hubName The hub name. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts index 8d8cd6f86d26..4e4fe34cc981 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts @@ -23,8 +23,7 @@ import { export interface WebPubSubPrivateEndpointConnections { /** * List private endpoint connections - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -35,9 +34,9 @@ export interface WebPubSubPrivateEndpointConnections { ): PagedAsyncIterableIterator; /** * Get the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -49,9 +48,9 @@ export interface WebPubSubPrivateEndpointConnections { ): Promise; /** * Update the state of specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties * @param options The options parameters. @@ -65,9 +64,9 @@ export interface WebPubSubPrivateEndpointConnections { ): Promise; /** * Delete the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -79,9 +78,9 @@ export interface WebPubSubPrivateEndpointConnections { ): Promise, void>>; /** * Delete the specified private endpoint connection - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts index 6a4d1c5832d7..3896be6ace18 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts @@ -17,8 +17,7 @@ import { export interface WebPubSubPrivateLinkResources { /** * Get the private link resources that need to be created for a resource. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts new file mode 100644 index 000000000000..c8aa7da1a792 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts @@ -0,0 +1,166 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Replica, + WebPubSubReplicasListOptionalParams, + WebPubSubReplicasGetOptionalParams, + WebPubSubReplicasGetResponse, + WebPubSubReplicasCreateOrUpdateOptionalParams, + WebPubSubReplicasCreateOrUpdateResponse, + WebPubSubReplicasDeleteOptionalParams, + WebPubSubReplicasUpdateOptionalParams, + WebPubSubReplicasUpdateResponse, + WebPubSubReplicasRestartOptionalParams, + WebPubSubReplicasRestartResponse +} from "../models"; + +/// +/** Interface representing a WebPubSubReplicas. */ +export interface WebPubSubReplicas { + /** + * List all replicas belong to this resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: WebPubSubReplicasListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the replica and its properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasGetOptionalParams + ): Promise; + /** + * Create or update a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasCreateOrUpdateResponse + > + >; + /** + * Create or update a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasCreateOrUpdateOptionalParams + ): Promise; + /** + * Operation to delete a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasDeleteOptionalParams + ): Promise; + /** + * Operation to update an exiting replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasUpdateResponse + > + >; + /** + * Operation to update an exiting replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + parameters: Replica, + options?: WebPubSubReplicasUpdateOptionalParams + ): Promise; + /** + * Operation to restart a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicasRestartResponse + > + >; + /** + * Operation to restart a replica. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicasRestartOptionalParams + ): Promise; +} diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts index 440bb5ab41d9..8b4a5948a23f 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts @@ -23,8 +23,7 @@ import { export interface WebPubSubSharedPrivateLinkResources { /** * List shared private link resources - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -36,8 +35,7 @@ export interface WebPubSubSharedPrivateLinkResources { /** * Get the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -50,8 +48,7 @@ export interface WebPubSubSharedPrivateLinkResources { /** * Create or update a shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource * @param options The options parameters. @@ -71,8 +68,7 @@ export interface WebPubSubSharedPrivateLinkResources { /** * Create or update a shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource * @param options The options parameters. @@ -87,8 +83,7 @@ export interface WebPubSubSharedPrivateLinkResources { /** * Delete the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ @@ -101,8 +96,7 @@ export interface WebPubSubSharedPrivateLinkResources { /** * Delete the specified shared private link resource * @param sharedPrivateLinkResourceName The name of the shared private link resource - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts index 6f97d5a01230..6eecf344aafd 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts @@ -23,6 +23,7 @@ import { WebPubSubHubsImpl, WebPubSubPrivateEndpointConnectionsImpl, WebPubSubPrivateLinkResourcesImpl, + WebPubSubReplicasImpl, WebPubSubSharedPrivateLinkResourcesImpl } from "./operations"; import { @@ -34,6 +35,7 @@ import { WebPubSubHubs, WebPubSubPrivateEndpointConnections, WebPubSubPrivateLinkResources, + WebPubSubReplicas, WebPubSubSharedPrivateLinkResources } from "./operationsInterfaces"; import { WebPubSubManagementClientOptionalParams } from "./models"; @@ -46,8 +48,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { /** * Initializes a new instance of the WebPubSubManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure subscription. - * The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( @@ -71,7 +72,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-webpubsub/1.1.1`; + const packageDetails = `azsdk-js-arm-webpubsub/2.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -124,7 +125,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-02-01"; + this.apiVersion = options.apiVersion || "2023-06-01-preview"; this.operations = new OperationsImpl(this); this.webPubSub = new WebPubSubImpl(this); this.usages = new UsagesImpl(this); @@ -139,6 +140,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesImpl( this ); + this.webPubSubReplicas = new WebPubSubReplicasImpl(this); this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl( this ); @@ -181,5 +183,6 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { webPubSubHubs: WebPubSubHubs; webPubSubPrivateEndpointConnections: WebPubSubPrivateEndpointConnections; webPubSubPrivateLinkResources: WebPubSubPrivateLinkResources; + webPubSubReplicas: WebPubSubReplicas; webPubSubSharedPrivateLinkResources: WebPubSubSharedPrivateLinkResources; } diff --git a/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts @@ -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. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/web-pubsub/arm-webpubsub/tsconfig.json b/sdk/web-pubsub/arm-webpubsub/tsconfig.json index d4e1110ff459..3e6ae96443f3 100644 --- a/sdk/web-pubsub/arm-webpubsub/tsconfig.json +++ b/sdk/web-pubsub/arm-webpubsub/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-webpubsub": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"