From 5b1e36908ac83bd100a0d6148fde0e482d8766f4 Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:12:10 +0800 Subject: [PATCH 1/2] elasticsan release --- common/config/rush/pnpm-lock.yaml | 4 +- sdk/elasticsans/arm-elasticsan/CHANGELOG.md | 68 ++- sdk/elasticsans/arm-elasticsan/_meta.json | 8 +- sdk/elasticsans/arm-elasticsan/assets.json | 2 +- sdk/elasticsans/arm-elasticsan/package.json | 8 +- .../review/arm-elasticsan.api.md | 286 +++++++-- .../samples-dev/elasticSansCreateSample.ts | 31 +- .../samples-dev/elasticSansDeleteSample.ts | 16 +- .../samples-dev/elasticSansGetSample.ts | 16 +- .../elasticSansListByResourceGroupSample.ts | 12 +- .../elasticSansListBySubscriptionSample.ts | 8 +- .../samples-dev/elasticSansUpdateSample.ts | 22 +- .../samples-dev/operationsListSample.ts | 4 +- .../privateEndpointConnectionsCreateSample.ts | 89 +++ .../privateEndpointConnectionsDeleteSample.ts | 68 +++ .../privateEndpointConnectionsGetSample.ts | 68 +++ .../privateEndpointConnectionsListSample.ts | 70 +++ ...vateLinkResourcesListByElasticSanSample.ts | 64 +++ .../samples-dev/skusListSample.ts | 10 +- .../samples-dev/volumeGroupsCreateSample.ts | 29 +- .../samples-dev/volumeGroupsDeleteSample.ts | 20 +- .../samples-dev/volumeGroupsGetSample.ts | 20 +- .../volumeGroupsListByElasticSanSample.ts | 16 +- .../samples-dev/volumeGroupsUpdateSample.ts | 29 +- .../samples-dev/volumesCreateSample.ts | 31 +- .../samples-dev/volumesDeleteSample.ts | 24 +- .../samples-dev/volumesGetSample.ts | 24 +- .../volumesListByVolumeGroupSample.ts | 20 +- .../samples-dev/volumesUpdateSample.ts | 29 +- .../samples/v1-beta/javascript/README.md | 50 +- .../javascript/elasticSansCreateSample.js | 31 +- .../javascript/elasticSansDeleteSample.js | 16 +- .../javascript/elasticSansGetSample.js | 16 +- .../elasticSansListByResourceGroupSample.js | 12 +- .../elasticSansListBySubscriptionSample.js | 8 +- .../javascript/elasticSansUpdateSample.js | 22 +- .../javascript/operationsListSample.js | 4 +- .../privateEndpointConnectionsCreateSample.js | 80 +++ .../privateEndpointConnectionsDeleteSample.js | 62 ++ .../privateEndpointConnectionsGetSample.js | 62 ++ .../privateEndpointConnectionsListSample.js | 64 +++ ...vateLinkResourcesListByElasticSanSample.js | 58 ++ .../v1-beta/javascript/skusListSample.js | 10 +- .../javascript/volumeGroupsCreateSample.js | 29 +- .../javascript/volumeGroupsDeleteSample.js | 20 +- .../javascript/volumeGroupsGetSample.js | 20 +- .../volumeGroupsListByElasticSanSample.js | 16 +- .../javascript/volumeGroupsUpdateSample.js | 29 +- .../v1-beta/javascript/volumesCreateSample.js | 31 +- .../v1-beta/javascript/volumesDeleteSample.js | 24 +- .../v1-beta/javascript/volumesGetSample.js | 24 +- .../volumesListByVolumeGroupSample.js | 20 +- .../v1-beta/javascript/volumesUpdateSample.js | 29 +- .../samples/v1-beta/typescript/README.md | 50 +- .../typescript/src/elasticSansCreateSample.ts | 31 +- .../typescript/src/elasticSansDeleteSample.ts | 16 +- .../typescript/src/elasticSansGetSample.ts | 16 +- .../elasticSansListByResourceGroupSample.ts | 12 +- .../elasticSansListBySubscriptionSample.ts | 8 +- .../typescript/src/elasticSansUpdateSample.ts | 22 +- .../typescript/src/operationsListSample.ts | 4 +- .../privateEndpointConnectionsCreateSample.ts | 89 +++ .../privateEndpointConnectionsDeleteSample.ts | 68 +++ .../privateEndpointConnectionsGetSample.ts | 68 +++ .../privateEndpointConnectionsListSample.ts | 70 +++ ...vateLinkResourcesListByElasticSanSample.ts | 64 +++ .../v1-beta/typescript/src/skusListSample.ts | 10 +- .../src/volumeGroupsCreateSample.ts | 29 +- .../src/volumeGroupsDeleteSample.ts | 20 +- .../typescript/src/volumeGroupsGetSample.ts | 20 +- .../src/volumeGroupsListByElasticSanSample.ts | 16 +- .../src/volumeGroupsUpdateSample.ts | 29 +- .../typescript/src/volumesCreateSample.ts | 31 +- .../typescript/src/volumesDeleteSample.ts | 24 +- .../typescript/src/volumesGetSample.ts | 24 +- .../src/volumesListByVolumeGroupSample.ts | 20 +- .../typescript/src/volumesUpdateSample.ts | 29 +- .../src/elasticSanManagement.ts | 14 +- sdk/elasticsans/arm-elasticsan/src/lroImpl.ts | 54 +- .../arm-elasticsan/src/models/index.ts | 427 +++++++++++--- .../arm-elasticsan/src/models/mappers.ts | 543 ++++++++++++++---- .../arm-elasticsan/src/models/parameters.ts | 22 +- .../src/operations/elasticSans.ts | 94 +-- .../arm-elasticsan/src/operations/index.ts | 2 + .../src/operations/operations.ts | 12 +- .../operations/privateEndpointConnections.ts | 450 +++++++++++++++ .../src/operations/privateLinkResources.ts | 72 +++ .../arm-elasticsan/src/operations/skus.ts | 2 +- .../src/operations/volumeGroups.ts | 90 +-- .../arm-elasticsan/src/operations/volumes.ts | 92 +-- .../src/operationsInterfaces/elasticSans.ts | 12 +- .../src/operationsInterfaces/index.ts | 2 + .../src/operationsInterfaces/operations.ts | 4 +- .../privateEndpointConnections.ts | 109 ++++ .../privateLinkResources.ts | 27 + .../src/operationsInterfaces/volumeGroups.ts | 12 +- .../src/operationsInterfaces/volumes.ts | 14 +- 97 files changed, 3623 insertions(+), 1034 deletions(-) create mode 100644 sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsCreateSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsDeleteSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsGetSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsListSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples-dev/privateLinkResourcesListByElasticSanSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts create mode 100644 sdk/elasticsans/arm-elasticsan/src/operations/privateEndpointConnections.ts create mode 100644 sdk/elasticsans/arm-elasticsan/src/operations/privateLinkResources.ts create mode 100644 sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateEndpointConnections.ts create mode 100644 sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateLinkResources.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 86c03d325ceb..264d60b0d298 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -13638,7 +13638,7 @@ packages: dev: false file:projects/arm-elasticsan.tgz: - resolution: {integrity: sha512-wuPQXjMzsKDQRD9gt9YardeUOLib6zETTVhEHuCgM4rZH+T+yFfQcOV49OHf+sSweHiBeHun/54D87Tl7+1t3g==, tarball: file:projects/arm-elasticsan.tgz} + resolution: {integrity: sha512-mJahvWqbrYDPLUpN6GCn1f/kDTymrTGbJHC4aTaxFRO7t6CEtIoIiMbvoDJpZK84FScxsYheZzBwhXNXtpPPYA==, tarball: file:projects/arm-elasticsan.tgz} name: '@rush-temp/arm-elasticsan' version: 0.0.0 dependencies: @@ -13653,7 +13653,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.3.1 - mkdirp: 1.0.4 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 diff --git a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md index 6ce6c512f5a3..8c97807ca6a5 100644 --- a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md +++ b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md @@ -1,15 +1,69 @@ # Release History - -## 1.0.0-beta.2 (2023-01-10) - + +## 1.0.0-beta.2 (2023-07-12) + **Features** --  Exposes `getContinuationToken` helper function to extract continuation token - -**Bugs Fixed** + - Added operation group PrivateEndpointConnections + - Added operation group PrivateLinkResources + - Added Interface ElasticSansDeleteHeaders + - Added Interface ElasticSansUpdateHeaders + - Added Interface ErrorDetail + - Added Interface Operation + - Added Interface OperationDisplay + - Added Interface OperationListResult + - Added Interface PrivateEndpoint + - Added Interface PrivateEndpointConnection + - Added Interface PrivateEndpointConnectionListResult + - Added Interface PrivateEndpointConnectionsCreateOptionalParams + - Added Interface PrivateEndpointConnectionsDeleteHeaders + - Added Interface PrivateEndpointConnectionsDeleteOptionalParams + - Added Interface PrivateEndpointConnectionsGetOptionalParams + - Added Interface PrivateEndpointConnectionsListOptionalParams + - Added Interface PrivateLinkResource + - Added Interface PrivateLinkResourceListResult + - Added Interface PrivateLinkResourcesListByElasticSanOptionalParams + - Added Interface PrivateLinkServiceConnectionState + - Added Interface ProxyResource + - Added Interface VolumeGroupsDeleteHeaders + - Added Interface VolumeGroupsUpdateHeaders + - Added Interface VolumesDeleteHeaders + - Added Interface VolumesUpdateHeaders + - Added Type Alias ActionType + - Added Type Alias Origin + - Added Type Alias PrivateEndpointConnectionsCreateResponse + - Added Type Alias PrivateEndpointConnectionsGetResponse + - Added Type Alias PrivateEndpointConnectionsListResponse + - Added Type Alias PrivateEndpointServiceConnectionStatus + - Added Type Alias PrivateLinkResourcesListByElasticSanResponse + - Interface ElasticSan has a new optional parameter privateEndpointConnections + - Interface ErrorResponse has a new optional parameter error + - Interface Resource has a new optional parameter systemData + - Interface SkuInformationList has a new optional parameter nextLink + - Interface TrackedResource has a new optional parameter tags + - Interface VolumeGroup has a new optional parameter privateEndpointConnections + - Added Enum KnownActionType + - Added Enum KnownOrigin + - Added Enum KnownPrivateEndpointServiceConnectionStatus + - Added function getContinuationToken -- A series of small bug fixs relevant to authentication and apiVersion policy +**Breaking Changes** + - Interface ElasticSan no longer has parameter systemData + - Interface ErrorResponse no longer has parameter additionalInfo + - Interface ErrorResponse no longer has parameter code + - Interface ErrorResponse no longer has parameter details + - Interface ErrorResponse no longer has parameter message + - Interface ErrorResponse no longer has parameter target + - Interface Resource no longer has parameter tags + - Interface Volume no longer has parameter systemData + - Interface VolumeGroup no longer has parameter systemData + - Interface VolumeGroupUpdate no longer has parameter tags + - Interface VolumeUpdate no longer has parameter tags + - Parameter location of interface TrackedResource is now required + - Parameter sizeGiB of interface Volume is now required + + ## 1.0.0-beta.1 (2022-10-21) The package of @azure/arm-elasticsan is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/elasticsans/arm-elasticsan/_meta.json b/sdk/elasticsans/arm-elasticsan/_meta.json index f69b405fbbf3..d8b334dc2a04 100644 --- a/sdk/elasticsans/arm-elasticsan/_meta.json +++ b/sdk/elasticsans/arm-elasticsan/_meta.json @@ -1,8 +1,8 @@ { - "commit": "38e580acd81dbb904d048a23d805dd58b8699d93", + "commit": "eabc87b2e8e5ab5d5365cb2db064d7fd25a65f1a", "readme": "specification/elasticsan/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=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elasticsan\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.6.20221226.1 --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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elasticsan\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.6.20221226.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.5" } \ No newline at end of file diff --git a/sdk/elasticsans/arm-elasticsan/assets.json b/sdk/elasticsans/arm-elasticsan/assets.json index 2ab8ab6b6b98..32227ce9eae4 100644 --- a/sdk/elasticsans/arm-elasticsan/assets.json +++ b/sdk/elasticsans/arm-elasticsan/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/elasticsans/arm-elasticsan", - "Tag": "js/elasticsans/arm-elasticsan_20b3dff5dd" + "Tag": "js/elasticsans/arm-elasticsan_0e31476966" } diff --git a/sdk/elasticsans/arm-elasticsan/package.json b/sdk/elasticsans/arm-elasticsan/package.json index 614b269de4d2..b401da2d8ebf 100644 --- a/sdk/elasticsans/arm-elasticsan/package.json +++ b/sdk/elasticsans/arm-elasticsan/package.json @@ -8,10 +8,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,7 +33,7 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", @@ -120,4 +120,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md b/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md index 7452f47f5a02..58cec2fd7ed2 100644 --- a/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md +++ b/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md @@ -6,9 +6,12 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type ActionType = string; // @public export type CreatedByType = string; @@ -18,9 +21,9 @@ export interface ElasticSan extends TrackedResource { availabilityZones?: string[]; baseSizeTiB: number; extendedCapacitySizeTiB: number; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningStates; sku: Sku; - readonly systemData?: SystemData; readonly totalIops?: number; readonly totalMBps?: number; readonly totalSizeTiB?: number; @@ -31,7 +34,7 @@ export interface ElasticSan extends TrackedResource { // @public export interface ElasticSanList { readonly nextLink?: string; - value: ElasticSan[]; + value?: ElasticSan[]; } // @public (undocumented) @@ -46,6 +49,10 @@ export class ElasticSanManagement extends coreClient.ServiceClient { // (undocumented) operations: Operations; // (undocumented) + privateEndpointConnections: PrivateEndpointConnections; + // (undocumented) + privateLinkResources: PrivateLinkResources; + // (undocumented) skus: Skus; // (undocumented) subscriptionId: string; @@ -62,34 +69,13 @@ export interface ElasticSanManagementOptionalParams extends coreClient.ServiceCl endpoint?: string; } -// @public -export interface ElasticSanOperationDisplay { - description: string; - operation: string; - provider: string; - resource: string; -} - -// @public -export interface ElasticSanOperationListResult { - nextLink?: string; - value: ElasticSanRPOperation[]; -} - -// @public -export interface ElasticSanRPOperation { - readonly display?: ElasticSanOperationDisplay; - readonly isDataAction?: boolean; - name: string; -} - // @public export interface ElasticSans { - beginCreate(resourceGroupName: string, elasticSanName: string, parameters: ElasticSan, options?: ElasticSansCreateOptionalParams): Promise, ElasticSansCreateResponse>>; + beginCreate(resourceGroupName: string, elasticSanName: string, parameters: ElasticSan, options?: ElasticSansCreateOptionalParams): Promise, ElasticSansCreateResponse>>; beginCreateAndWait(resourceGroupName: string, elasticSanName: string, parameters: ElasticSan, options?: ElasticSansCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, elasticSanName: string, options?: ElasticSansDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, elasticSanName: string, options?: ElasticSansDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, elasticSanName: string, options?: ElasticSansDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, elasticSanName: string, parameters: ElasticSanUpdate, options?: ElasticSansUpdateOptionalParams): Promise, ElasticSansUpdateResponse>>; + beginUpdate(resourceGroupName: string, elasticSanName: string, parameters: ElasticSanUpdate, options?: ElasticSansUpdateOptionalParams): Promise, ElasticSansUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, elasticSanName: string, parameters: ElasticSanUpdate, options?: ElasticSansUpdateOptionalParams): Promise; get(resourceGroupName: string, elasticSanName: string, options?: ElasticSansGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ElasticSansListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -105,6 +91,12 @@ export interface ElasticSansCreateOptionalParams extends coreClient.OperationOpt // @public export type ElasticSansCreateResponse = ElasticSan; +// @public +export interface ElasticSansDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ElasticSansDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -146,6 +138,12 @@ export interface ElasticSansListBySubscriptionOptionalParams extends coreClient. // @public export type ElasticSansListBySubscriptionResponse = ElasticSanList; +// @public +export interface ElasticSansUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ElasticSansUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -174,19 +172,19 @@ export interface ErrorAdditionalInfo { } // @public -export interface ErrorModel { - error?: ErrorResponse; -} - -// @public -export interface ErrorResponse { +export interface ErrorDetail { readonly additionalInfo?: ErrorAdditionalInfo[]; readonly code?: string; - readonly details?: ErrorResponse[]; + readonly details?: ErrorDetail[]; readonly message?: string; readonly target?: string; } +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -199,6 +197,11 @@ export interface IscsiTargetInfo { readonly targetPortalPort?: number; } +// @public +export enum KnownActionType { + Internal = "Internal" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -224,6 +227,21 @@ export enum KnownOperationalStatus { Updating = "Updating" } +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + Approved = "Approved", + Failed = "Failed", + Pending = "Pending", + Rejected = "Rejected" +} + // @public export enum KnownProvisioningStates { Canceled = "Canceled", @@ -258,12 +276,35 @@ export interface NetworkRuleSet { virtualNetworkRules?: VirtualNetworkRule[]; } +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + // @public export type OperationalStatus = string; +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + // @public export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } // @public @@ -271,18 +312,122 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption } // @public -export type OperationsListResponse = ElasticSanOperationListResult; +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export interface PrivateEndpointConnection extends Resource { + groupIds?: string[]; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + readonly provisioningState?: ProvisioningStates; +} + +// @public +export interface PrivateEndpointConnectionListResult { + readonly nextLink?: string; + value?: PrivateEndpointConnection[]; +} + +// @public +export interface PrivateEndpointConnections { + beginCreate(resourceGroupName: string, elasticSanName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise, PrivateEndpointConnectionsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, elasticSanName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, elasticSanName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, elasticSanName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, elasticSanName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; + list(resourceGroupName: string, elasticSanName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export interface PrivateLinkResource extends Resource { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +} + +// @public +export interface PrivateLinkResourceListResult { + readonly nextLink?: string; + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkResources { + listByElasticSan(resourceGroupName: string, elasticSanName: string, options?: PrivateLinkResourcesListByElasticSanOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesListByElasticSanOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByElasticSanResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} // @public export type ProvisioningStates = string; +// @public +export interface ProxyResource extends Resource { +} + // @public export interface Resource { readonly id?: string; readonly name?: string; - tags?: { - [propertyName: string]: string; - }; + readonly systemData?: SystemData; readonly type?: string; } @@ -310,6 +455,7 @@ export interface SkuInformation { // @public export interface SkuInformationList { + readonly nextLink?: string; readonly value?: SkuInformation[]; } @@ -362,7 +508,10 @@ export interface SystemData { // @public export interface TrackedResource extends Resource { - location?: string; + location: string; + tags?: { + [propertyName: string]: string; + }; } // @public @@ -373,36 +522,35 @@ export interface VirtualNetworkRule { } // @public -export interface Volume extends Resource { +export interface Volume extends ProxyResource { creationData?: SourceCreationData; - sizeGiB?: number; + sizeGiB: number; readonly storageTarget?: IscsiTargetInfo; - readonly systemData?: SystemData; readonly volumeId?: string; } // @public -export interface VolumeGroup extends Resource { +export interface VolumeGroup extends ProxyResource { encryption?: EncryptionType; networkAcls?: NetworkRuleSet; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; protocolType?: StorageTargetType; readonly provisioningState?: ProvisioningStates; - readonly systemData?: SystemData; } // @public export interface VolumeGroupList { readonly nextLink?: string; - value: VolumeGroup[]; + value?: VolumeGroup[]; } // @public export interface VolumeGroups { - beginCreate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroup, options?: VolumeGroupsCreateOptionalParams): Promise, VolumeGroupsCreateResponse>>; + beginCreate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroup, options?: VolumeGroupsCreateOptionalParams): Promise, VolumeGroupsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroup, options?: VolumeGroupsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroupUpdate, options?: VolumeGroupsUpdateOptionalParams): Promise, VolumeGroupsUpdateResponse>>; + beginUpdate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroupUpdate, options?: VolumeGroupsUpdateOptionalParams): Promise, VolumeGroupsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, parameters: VolumeGroupUpdate, options?: VolumeGroupsUpdateOptionalParams): Promise; get(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsGetOptionalParams): Promise; listByElasticSan(resourceGroupName: string, elasticSanName: string, options?: VolumeGroupsListByElasticSanOptionalParams): PagedAsyncIterableIterator; @@ -417,6 +565,12 @@ export interface VolumeGroupsCreateOptionalParams extends coreClient.OperationOp // @public export type VolumeGroupsCreateResponse = VolumeGroup; +// @public +export interface VolumeGroupsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VolumeGroupsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -444,6 +598,12 @@ export interface VolumeGroupsListByElasticSanOptionalParams extends coreClient.O // @public export type VolumeGroupsListByElasticSanResponse = VolumeGroupList; +// @public +export interface VolumeGroupsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface VolumeGroupsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -458,24 +618,21 @@ export interface VolumeGroupUpdate { encryption?: EncryptionType; networkAcls?: NetworkRuleSet; protocolType?: StorageTargetType; - tags?: { - [propertyName: string]: string; - }; } // @public export interface VolumeList { readonly nextLink?: string; - value: Volume[]; + value?: Volume[]; } // @public export interface Volumes { - beginCreate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: Volume, options?: VolumesCreateOptionalParams): Promise, VolumesCreateResponse>>; + beginCreate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: Volume, options?: VolumesCreateOptionalParams): Promise, VolumesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: Volume, options?: VolumesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: VolumeUpdate, options?: VolumesUpdateOptionalParams): Promise, VolumesUpdateResponse>>; + beginUpdate(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: VolumeUpdate, options?: VolumesUpdateOptionalParams): Promise, VolumesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, parameters: VolumeUpdate, options?: VolumesUpdateOptionalParams): Promise; get(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: VolumesGetOptionalParams): Promise; listByVolumeGroup(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, options?: VolumesListByVolumeGroupOptionalParams): PagedAsyncIterableIterator; @@ -490,6 +647,12 @@ export interface VolumesCreateOptionalParams extends coreClient.OperationOptions // @public export type VolumesCreateResponse = Volume; +// @public +export interface VolumesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -517,6 +680,12 @@ export interface VolumesListByVolumeGroupOptionalParams extends coreClient.Opera // @public export type VolumesListByVolumeGroupResponse = VolumeList; +// @public +export interface VolumesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface VolumesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -529,9 +698,6 @@ export type VolumesUpdateResponse = Volume; // @public export interface VolumeUpdate { sizeGiB?: number; - tags?: { - [propertyName: string]: string; - }; } // (No @packageDocumentation comment for this package) diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansCreateSample.ts index 1155ccf2d39f..071264eae83e 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansCreateSample.ts @@ -18,21 +18,21 @@ dotenv.config(); * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json */ async function elasticSansCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSan = { - availabilityZones: ["aaaaaaaaaaaaaaaaa"], - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, - location: "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + availabilityZones: ["1"], + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS", tier: "Premium" }, - tags: { key896: "aaaaaaaaaaaaaaaaaa" } + tags: { key9316: "ihndtieqibtob" } }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -48,17 +48,18 @@ async function elasticSansCreateMaximumSetGen() { * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json */ async function elasticSansCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSan = { - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS" } }; const credential = new DefaultAzureCredential(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansDeleteSample.ts index ebf0666d4d3b..23c2d37de58a 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansDeleteSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json */ async function elasticSansDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait( @@ -39,14 +39,14 @@ async function elasticSansDeleteMaximumSetGen() { * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json */ async function elasticSansDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansGetSample.ts index 1528bd06138b..17c1fc8e5c52 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansGetSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json */ async function elasticSansGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get( @@ -39,14 +39,14 @@ async function elasticSansGetMaximumSetGen() { * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json */ async function elasticSansGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListByResourceGroupSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListByResourceGroupSample.ts index eec0c7946b99..063a82c1af00 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListByResourceGroupSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListByResourceGroupSample.ts @@ -18,13 +18,13 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json */ async function elasticSansListByResourceGroupMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -40,13 +40,13 @@ async function elasticSansListByResourceGroupMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json */ async function elasticSansListByResourceGroupMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListBySubscriptionSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListBySubscriptionSample.ts index 6b7f70581b2c..1cbfe62f3c03 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListBySubscriptionSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansListBySubscriptionSample.ts @@ -18,11 +18,11 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json */ async function elasticSansListBySubscriptionMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -36,11 +36,11 @@ async function elasticSansListBySubscriptionMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json */ async function elasticSansListBySubscriptionMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansUpdateSample.ts index 5b6900502d9f..3bf7eb5815ea 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/elasticSansUpdateSample.ts @@ -18,18 +18,18 @@ dotenv.config(); * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json */ async function elasticSansUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSanUpdate = { - baseSizeTiB: 23, - extendedCapacitySizeTiB: 4, - tags: { key3137: "aaaaaaaaaaaaaaa" } + baseSizeTiB: 10, + extendedCapacitySizeTiB: 22, + tags: { key4212: "cqvcnwfefljntgeio" } }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -45,14 +45,14 @@ async function elasticSansUpdateMaximumSetGen() { * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json */ async function elasticSansUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSanUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/operationsListSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/operationsListSample.ts index 1808cf49be19..60f67dff6b6b 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/operationsListSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MaximumSet_Gen.json */ async function operationsListMaximumSetGen() { const subscriptionId = @@ -37,7 +37,7 @@ async function operationsListMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MinimumSet_Gen.json */ async function operationsListMinimumSetGen() { const subscriptionId = diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsCreateSample.ts new file mode 100644 index 000000000000..d0e1fe2fe0b5 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsCreateSample.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + PrivateEndpointConnection, + ElasticSanManagement +} from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters: PrivateEndpointConnection = { + groupIds: ["sytxzqlcoapcaywthgwvwcw"], + privateEndpoint: {}, + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters: PrivateEndpointConnection = { + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsCreateMaximumSetGen(); + privateEndpointConnectionsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsDeleteSample.ts new file mode 100644 index 000000000000..c323101c2e4f --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsDeleteMaximumSetGen(); + privateEndpointConnectionsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsGetSample.ts new file mode 100644 index 000000000000..7c687a87b8ac --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsGetSample.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsGetMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsGetMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsGetMaximumSetGen(); + privateEndpointConnectionsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsListSample.ts new file mode 100644 index 000000000000..ece853c51e85 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/privateEndpointConnectionsListSample.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsListMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsListMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + privateEndpointConnectionsListMaximumSetGen(); + privateEndpointConnectionsListMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/privateLinkResourcesListByElasticSanSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/privateLinkResourcesListByElasticSanSample.ts new file mode 100644 index 000000000000..aacde7d20f17 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/privateLinkResourcesListByElasticSanSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +async function main() { + privateLinkResourcesListByElasticSanMaximumSetGen(); + privateLinkResourcesListByElasticSanMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/skusListSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/skusListSample.ts index 91a0fd5bd3d7..2196510463cc 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/skusListSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/skusListSample.ts @@ -21,12 +21,12 @@ dotenv.config(); * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MaximumSet_Gen.json */ async function skusListMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const filter = "aaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const filter = "dtycml"; const options: SkusListOptionalParams = { filter }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -41,11 +41,11 @@ async function skusListMaximumSetGen() { * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MinimumSet_Gen.json */ async function skusListMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsCreateSample.ts index 0a95d24959ff..d3a23a9c8466 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsCreateSample.ts @@ -18,24 +18,27 @@ dotenv.config(); * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json */ async function volumeGroupsCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroup = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { virtualNetworkRules: [ - { action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" } + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}" + } ] }, - protocolType: "Iscsi", - tags: { key5933: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } + protocolType: "Iscsi" }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -52,15 +55,15 @@ async function volumeGroupsCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json */ async function volumeGroupsCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroup = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsDeleteSample.ts index 8512da4e994f..c76f4ae51342 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsDeleteSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json */ async function volumeGroupsDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( @@ -41,15 +41,15 @@ async function volumeGroupsDeleteMaximumSetGen() { * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json */ async function volumeGroupsDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsGetSample.ts index a98bb92479a3..4110abd47b2d 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsGetSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json */ async function volumeGroupsGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get( @@ -41,15 +41,15 @@ async function volumeGroupsGetMaximumSetGen() { * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json */ async function volumeGroupsGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsListByElasticSanSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsListByElasticSanSample.ts index 569585a08db0..1a3ee6ab6b9c 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsListByElasticSanSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsListByElasticSanSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json */ async function volumeGroupsListByElasticSanMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -42,14 +42,14 @@ async function volumeGroupsListByElasticSanMaximumSetGen() { * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json */ async function volumeGroupsListByElasticSanMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsUpdateSample.ts index 033f73cef657..1befd9235fe4 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumeGroupsUpdateSample.ts @@ -18,24 +18,27 @@ dotenv.config(); * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json */ async function volumeGroupsUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroupUpdate = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { virtualNetworkRules: [ - { action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" } + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}" + } ] }, - protocolType: "Iscsi", - tags: { key7542: "aaaaaaaaaaaaaaaaaaaa" } + protocolType: "Iscsi" }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -52,15 +55,15 @@ async function volumeGroupsUpdateMaximumSetGen() { * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json */ async function volumeGroupsUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroupUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesCreateSample.ts index 44253843720a..9ae3985b9c13 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesCreateSample.ts @@ -18,20 +18,19 @@ dotenv.config(); * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MaximumSet_Gen.json */ async function volumesCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters: Volume = { - creationData: { createSource: "None", sourceUri: "aaaaaa" }, - sizeGiB: 22, - tags: { key7423: "aaaa" } + creationData: { createSource: "None", sourceUri: " ARM Id of resource" }, + sizeGiB: 23 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -49,17 +48,17 @@ async function volumesCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MinimumSet_Gen.json */ async function volumesCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters: Volume = {}; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters: Volume = { sizeGiB: 23 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginCreateAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesDeleteSample.ts index 45bbd133568e..ae60bece04b6 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesDeleteSample.ts @@ -18,16 +18,16 @@ dotenv.config(); * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json */ async function volumesDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( @@ -43,16 +43,16 @@ async function volumesDeleteMaximumSetGen() { * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json */ async function volumesDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesGetSample.ts index 3b51f92c9dd8..54899501f1b0 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesGetSample.ts @@ -18,16 +18,16 @@ dotenv.config(); * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MaximumSet_Gen.json */ async function volumesGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( @@ -43,16 +43,16 @@ async function volumesGetMaximumSetGen() { * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MinimumSet_Gen.json */ async function volumesGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesListByVolumeGroupSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesListByVolumeGroupSample.ts index 266e8aca3d2a..cd420e4ffac1 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesListByVolumeGroupSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesListByVolumeGroupSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json */ async function volumesListByVolumeGroupMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -44,15 +44,15 @@ async function volumesListByVolumeGroupMaximumSetGen() { * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json */ async function volumesListByVolumeGroupMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesUpdateSample.ts index 289623b220d0..fa239540a795 100644 --- a/sdk/elasticsans/arm-elasticsan/samples-dev/volumesUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples-dev/volumesUpdateSample.ts @@ -18,20 +18,17 @@ dotenv.config(); * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MaximumSet_Gen.json */ async function volumesUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters: VolumeUpdate = { - sizeGiB: 9, - tags: { key1864: "aaaaaaaaa" } - }; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters: VolumeUpdate = { sizeGiB: 11 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginUpdateAndWait( @@ -48,16 +45,16 @@ async function volumesUpdateMaximumSetGen() { * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MinimumSet_Gen.json */ async function volumesUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters: VolumeUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/README.md b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/README.md index 19b4d7e32e73..6f4fead6635a 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/README.md +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/README.md @@ -2,26 +2,31 @@ These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [elasticSansCreateSample.js][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MaximumSet_Gen.json | -| [elasticSansDeleteSample.js][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json | -| [elasticSansGetSample.js][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MaximumSet_Gen.json | -| [elasticSansListByResourceGroupSample.js][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json | -| [elasticSansListBySubscriptionSample.js][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json | -| [elasticSansUpdateSample.js][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MaximumSet_Gen.json | -| [skusListSample.js][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MaximumSet_Gen.json | -| [volumeGroupsCreateSample.js][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json | -| [volumeGroupsDeleteSample.js][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json | -| [volumeGroupsGetSample.js][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json | -| [volumeGroupsListByElasticSanSample.js][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json | -| [volumeGroupsUpdateSample.js][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json | -| [volumesCreateSample.js][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MaximumSet_Gen.json | -| [volumesDeleteSample.js][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MaximumSet_Gen.json | -| [volumesGetSample.js][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MaximumSet_Gen.json | -| [volumesListByVolumeGroupSample.js][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json | -| [volumesUpdateSample.js][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MaximumSet_Gen.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [elasticSansCreateSample.js][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json | +| [elasticSansDeleteSample.js][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json | +| [elasticSansGetSample.js][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json | +| [elasticSansListByResourceGroupSample.js][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json | +| [elasticSansListBySubscriptionSample.js][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json | +| [elasticSansUpdateSample.js][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json | +| [operationsListSample.js][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MaximumSet_Gen.json | +| [privateEndpointConnectionsCreateSample.js][privateendpointconnectionscreatesample] | Update the state of specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | List all Private Endpoint Connections associated with the Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json | +| [privateLinkResourcesListByElasticSanSample.js][privatelinkresourceslistbyelasticsansample] | Gets the private link resources that need to be created for a elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json | +| [skusListSample.js][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MaximumSet_Gen.json | +| [volumeGroupsCreateSample.js][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json | +| [volumeGroupsDeleteSample.js][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json | +| [volumeGroupsGetSample.js][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json | +| [volumeGroupsListByElasticSanSample.js][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json | +| [volumeGroupsUpdateSample.js][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json | +| [volumesCreateSample.js][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MaximumSet_Gen.json | +| [volumesDeleteSample.js][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json | +| [volumesGetSample.js][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MaximumSet_Gen.json | +| [volumesListByVolumeGroupSample.js][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json | +| [volumesUpdateSample.js][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MaximumSet_Gen.json | ## Prerequisites @@ -68,6 +73,11 @@ Take a look at our [API Documentation][apiref] for more information about the AP [elasticsanslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js [elasticsansupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js +[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js +[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js +[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js +[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js +[privatelinkresourceslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js [skuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js [volumegroupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js [volumegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansCreateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansCreateSample.js index a5e09afccd13..d34cff36ee0a 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansCreateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansCreateSample.js @@ -16,19 +16,19 @@ require("dotenv").config(); * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json */ async function elasticSansCreateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters = { - availabilityZones: ["aaaaaaaaaaaaaaaaa"], - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, - location: "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + availabilityZones: ["1"], + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS", tier: "Premium" }, - tags: { key896: "aaaaaaaaaaaaaaaaaa" }, + tags: { key9316: "ihndtieqibtob" }, }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -44,15 +44,16 @@ async function elasticSansCreateMaximumSetGen() { * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json */ async function elasticSansCreateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters = { - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS" }, }; const credential = new DefaultAzureCredential(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansDeleteSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansDeleteSample.js index b17a0b437baf..7689cd40c400 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansDeleteSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansDeleteSample.js @@ -16,12 +16,12 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json */ async function elasticSansDeleteMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait(resourceGroupName, elasticSanName); @@ -32,12 +32,12 @@ async function elasticSansDeleteMaximumSetGen() { * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json */ async function elasticSansDeleteMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait(resourceGroupName, elasticSanName); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansGetSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansGetSample.js index 9132579319c7..230434acd057 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansGetSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansGetSample.js @@ -16,12 +16,12 @@ require("dotenv").config(); * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json */ async function elasticSansGetMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get(resourceGroupName, elasticSanName); @@ -32,12 +32,12 @@ async function elasticSansGetMaximumSetGen() { * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json */ async function elasticSansGetMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get(resourceGroupName, elasticSanName); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListByResourceGroupSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListByResourceGroupSample.js index 5dd3319a961a..5215d7de6030 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListByResourceGroupSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListByResourceGroupSample.js @@ -16,11 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json */ async function elasticSansListByResourceGroupMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -34,11 +34,11 @@ async function elasticSansListByResourceGroupMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json */ async function elasticSansListByResourceGroupMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js index 451102e229b3..d924368745d4 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js @@ -16,10 +16,10 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json */ async function elasticSansListBySubscriptionMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -33,10 +33,10 @@ async function elasticSansListBySubscriptionMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json */ async function elasticSansListBySubscriptionMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js index f984ff3501b1..423109fe15af 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js @@ -16,16 +16,16 @@ require("dotenv").config(); * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json */ async function elasticSansUpdateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters = { - baseSizeTiB: 23, - extendedCapacitySizeTiB: 4, - tags: { key3137: "aaaaaaaaaaaaaaa" }, + baseSizeTiB: 10, + extendedCapacitySizeTiB: 22, + tags: { key4212: "cqvcnwfefljntgeio" }, }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -41,12 +41,12 @@ async function elasticSansUpdateMaximumSetGen() { * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json */ async function elasticSansUpdateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js index c90ad9ad37df..656cf0ddcc0e 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MaximumSet_Gen.json */ async function operationsListMaximumSetGen() { const subscriptionId = @@ -34,7 +34,7 @@ async function operationsListMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MinimumSet_Gen.json */ async function operationsListMinimumSetGen() { const subscriptionId = diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js new file mode 100644 index 000000000000..404c4675efa6 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ElasticSanManagement } = require("@azure/arm-elasticsan"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMaximumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters = { + groupIds: ["sytxzqlcoapcaywthgwvwcw"], + privateEndpoint: {}, + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMinimumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters = { + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsCreateMaximumSetGen(); + privateEndpointConnectionsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js new file mode 100644 index 000000000000..dc4967eca463 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ElasticSanManagement } = require("@azure/arm-elasticsan"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMaximumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMinimumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsDeleteMaximumSetGen(); + privateEndpointConnectionsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js new file mode 100644 index 000000000000..d87feef830e9 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ElasticSanManagement } = require("@azure/arm-elasticsan"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsGetMaximumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsGetMinimumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsGetMaximumSetGen(); + privateEndpointConnectionsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js new file mode 100644 index 000000000000..cd11de357c08 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ElasticSanManagement } = require("@azure/arm-elasticsan"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsListMaximumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsListMinimumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + privateEndpointConnectionsListMaximumSetGen(); + privateEndpointConnectionsListMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js new file mode 100644 index 000000000000..f91083b5c67e --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ElasticSanManagement } = require("@azure/arm-elasticsan"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMaximumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMinimumSetGen() { + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +async function main() { + privateLinkResourcesListByElasticSanMaximumSetGen(); + privateLinkResourcesListByElasticSanMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js index 98a8531beb59..5c162507b964 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js @@ -16,11 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MaximumSet_Gen.json */ async function skusListMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const filter = "aaaa"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const filter = "dtycml"; const options = { filter }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -35,10 +35,10 @@ async function skusListMaximumSetGen() { * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MinimumSet_Gen.json */ async function skusListMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js index db060df93f4f..982e0249d943 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js @@ -16,20 +16,25 @@ require("dotenv").config(); * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json */ async function volumeGroupsCreateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { - virtualNetworkRules: [{ action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" }], + virtualNetworkRules: [ + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}", + }, + ], }, protocolType: "Iscsi", - tags: { key5933: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -46,13 +51,13 @@ async function volumeGroupsCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json */ async function volumeGroupsCreateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js index 586ee9830faf..f97398539e48 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js @@ -16,13 +16,13 @@ require("dotenv").config(); * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json */ async function volumeGroupsDeleteMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( @@ -37,13 +37,13 @@ async function volumeGroupsDeleteMaximumSetGen() { * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json */ async function volumeGroupsDeleteMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsGetSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsGetSample.js index 6573437220c1..3d45fa052ca2 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsGetSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsGetSample.js @@ -16,13 +16,13 @@ require("dotenv").config(); * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json */ async function volumeGroupsGetMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get(resourceGroupName, elasticSanName, volumeGroupName); @@ -33,13 +33,13 @@ async function volumeGroupsGetMaximumSetGen() { * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json */ async function volumeGroupsGetMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get(resourceGroupName, elasticSanName, volumeGroupName); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsListByElasticSanSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsListByElasticSanSample.js index 019a01a23832..9f2ce664d731 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsListByElasticSanSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsListByElasticSanSample.js @@ -16,12 +16,12 @@ require("dotenv").config(); * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json */ async function volumeGroupsListByElasticSanMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -35,12 +35,12 @@ async function volumeGroupsListByElasticSanMaximumSetGen() { * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json */ async function volumeGroupsListByElasticSanMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsUpdateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsUpdateSample.js index 4e93918de6c3..461a3917e14c 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsUpdateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsUpdateSample.js @@ -16,20 +16,25 @@ require("dotenv").config(); * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json */ async function volumeGroupsUpdateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { - virtualNetworkRules: [{ action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" }], + virtualNetworkRules: [ + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}", + }, + ], }, protocolType: "Iscsi", - tags: { key7542: "aaaaaaaaaaaaaaaaaaaa" }, }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -46,13 +51,13 @@ async function volumeGroupsUpdateMaximumSetGen() { * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json */ async function volumeGroupsUpdateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesCreateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesCreateSample.js index 99cadcee54bf..723849442022 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesCreateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesCreateSample.js @@ -16,18 +16,17 @@ require("dotenv").config(); * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MaximumSet_Gen.json */ async function volumesCreateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters = { - creationData: { createSource: "None", sourceUri: "aaaaaa" }, - sizeGiB: 22, - tags: { key7423: "aaaa" }, + creationData: { createSource: "None", sourceUri: " ARM Id of resource" }, + sizeGiB: 23, }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -45,15 +44,15 @@ async function volumesCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MinimumSet_Gen.json */ async function volumesCreateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters = {}; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters = { sizeGiB: 23 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginCreateAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesDeleteSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesDeleteSample.js index 3b32ec778b7c..a42ce1cd338e 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesDeleteSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesDeleteSample.js @@ -16,14 +16,14 @@ require("dotenv").config(); * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json */ async function volumesDeleteMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( @@ -39,14 +39,14 @@ async function volumesDeleteMaximumSetGen() { * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json */ async function volumesDeleteMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesGetSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesGetSample.js index a347934b9a75..e6735c2998e0 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesGetSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesGetSample.js @@ -16,14 +16,14 @@ require("dotenv").config(); * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MaximumSet_Gen.json */ async function volumesGetMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( @@ -39,14 +39,14 @@ async function volumesGetMaximumSetGen() { * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MinimumSet_Gen.json */ async function volumesGetMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesListByVolumeGroupSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesListByVolumeGroupSample.js index 89d8e22b14d9..66f8773490f8 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesListByVolumeGroupSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesListByVolumeGroupSample.js @@ -16,13 +16,13 @@ require("dotenv").config(); * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json */ async function volumesListByVolumeGroupMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -40,13 +40,13 @@ async function volumesListByVolumeGroupMaximumSetGen() { * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json */ async function volumesListByVolumeGroupMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesUpdateSample.js b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesUpdateSample.js index 832d065c95b3..a01ede0c1cd6 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesUpdateSample.js +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesUpdateSample.js @@ -16,18 +16,15 @@ require("dotenv").config(); * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MaximumSet_Gen.json */ async function volumesUpdateMaximumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters = { - sizeGiB: 9, - tags: { key1864: "aaaaaaaaa" }, - }; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters = { sizeGiB: 11 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginUpdateAndWait( @@ -44,14 +41,14 @@ async function volumesUpdateMaximumSetGen() { * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MinimumSet_Gen.json */ async function volumesUpdateMinimumSetGen() { - const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/README.md b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/README.md index 8e103b5141ac..b39df086a1d7 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/README.md +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/README.md @@ -2,26 +2,31 @@ These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [elasticSansCreateSample.ts][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MaximumSet_Gen.json | -| [elasticSansDeleteSample.ts][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json | -| [elasticSansGetSample.ts][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MaximumSet_Gen.json | -| [elasticSansListByResourceGroupSample.ts][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json | -| [elasticSansListBySubscriptionSample.ts][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json | -| [elasticSansUpdateSample.ts][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MaximumSet_Gen.json | -| [skusListSample.ts][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MaximumSet_Gen.json | -| [volumeGroupsCreateSample.ts][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json | -| [volumeGroupsDeleteSample.ts][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json | -| [volumeGroupsGetSample.ts][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json | -| [volumeGroupsListByElasticSanSample.ts][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json | -| [volumeGroupsUpdateSample.ts][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json | -| [volumesCreateSample.ts][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MaximumSet_Gen.json | -| [volumesDeleteSample.ts][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MaximumSet_Gen.json | -| [volumesGetSample.ts][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MaximumSet_Gen.json | -| [volumesListByVolumeGroupSample.ts][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json | -| [volumesUpdateSample.ts][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MaximumSet_Gen.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [elasticSansCreateSample.ts][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json | +| [elasticSansDeleteSample.ts][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json | +| [elasticSansGetSample.ts][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json | +| [elasticSansListByResourceGroupSample.ts][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json | +| [elasticSansListBySubscriptionSample.ts][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json | +| [elasticSansUpdateSample.ts][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json | +| [operationsListSample.ts][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MaximumSet_Gen.json | +| [privateEndpointConnectionsCreateSample.ts][privateendpointconnectionscreatesample] | Update the state of specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | List all Private Endpoint Connections associated with the Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json | +| [privateLinkResourcesListByElasticSanSample.ts][privatelinkresourceslistbyelasticsansample] | Gets the private link resources that need to be created for a elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json | +| [skusListSample.ts][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MaximumSet_Gen.json | +| [volumeGroupsCreateSample.ts][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json | +| [volumeGroupsDeleteSample.ts][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json | +| [volumeGroupsGetSample.ts][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json | +| [volumeGroupsListByElasticSanSample.ts][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json | +| [volumeGroupsUpdateSample.ts][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json | +| [volumesCreateSample.ts][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MaximumSet_Gen.json | +| [volumesDeleteSample.ts][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json | +| [volumesGetSample.ts][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MaximumSet_Gen.json | +| [volumesListByVolumeGroupSample.ts][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json | +| [volumesUpdateSample.ts][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MaximumSet_Gen.json | ## Prerequisites @@ -80,6 +85,11 @@ Take a look at our [API Documentation][apiref] for more information about the AP [elasticsanslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts [elasticsansupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts +[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts +[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts +[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts +[privatelinkresourceslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts [skuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts [volumegroupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts [volumegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansCreateSample.ts index 1155ccf2d39f..071264eae83e 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansCreateSample.ts @@ -18,21 +18,21 @@ dotenv.config(); * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json */ async function elasticSansCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSan = { - availabilityZones: ["aaaaaaaaaaaaaaaaa"], - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, - location: "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + availabilityZones: ["1"], + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS", tier: "Premium" }, - tags: { key896: "aaaaaaaaaaaaaaaaaa" } + tags: { key9316: "ihndtieqibtob" } }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -48,17 +48,18 @@ async function elasticSansCreateMaximumSetGen() { * This sample demonstrates how to Create ElasticSan. * * @summary Create ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json */ async function elasticSansCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSan = { - baseSizeTiB: 26, - extendedCapacitySizeTiB: 7, + baseSizeTiB: 5, + extendedCapacitySizeTiB: 25, + location: "South Central US", sku: { name: "Premium_LRS" } }; const credential = new DefaultAzureCredential(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansDeleteSample.ts index ebf0666d4d3b..23c2d37de58a 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansDeleteSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json */ async function elasticSansDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait( @@ -39,14 +39,14 @@ async function elasticSansDeleteMaximumSetGen() { * This sample demonstrates how to Delete a Elastic San. * * @summary Delete a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json */ async function elasticSansDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansGetSample.ts index 1528bd06138b..17c1fc8e5c52 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansGetSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json */ async function elasticSansGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get( @@ -39,14 +39,14 @@ async function elasticSansGetMaximumSetGen() { * This sample demonstrates how to Get a ElasticSan. * * @summary Get a ElasticSan. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json */ async function elasticSansGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.elasticSans.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListByResourceGroupSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListByResourceGroupSample.ts index eec0c7946b99..063a82c1af00 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListByResourceGroupSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListByResourceGroupSample.ts @@ -18,13 +18,13 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json */ async function elasticSansListByResourceGroupMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -40,13 +40,13 @@ async function elasticSansListByResourceGroupMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan in a resource group. * * @summary Gets a list of ElasticSan in a resource group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json */ async function elasticSansListByResourceGroupMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts index 6b7f70581b2c..1cbfe62f3c03 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts @@ -18,11 +18,11 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json */ async function elasticSansListBySubscriptionMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -36,11 +36,11 @@ async function elasticSansListBySubscriptionMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSans in a subscription * * @summary Gets a list of ElasticSans in a subscription - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json */ async function elasticSansListBySubscriptionMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts index 5b6900502d9f..3bf7eb5815ea 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts @@ -18,18 +18,18 @@ dotenv.config(); * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json */ async function elasticSansUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSanUpdate = { - baseSizeTiB: 23, - extendedCapacitySizeTiB: 4, - tags: { key3137: "aaaaaaaaaaaaaaa" } + baseSizeTiB: 10, + extendedCapacitySizeTiB: 22, + tags: { key4212: "cqvcnwfefljntgeio" } }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -45,14 +45,14 @@ async function elasticSansUpdateMaximumSetGen() { * This sample demonstrates how to Update a Elastic San. * * @summary Update a Elastic San. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/ElasticSans_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json */ async function elasticSansUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const parameters: ElasticSanUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts index 1808cf49be19..60f67dff6b6b 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MaximumSet_Gen.json */ async function operationsListMaximumSetGen() { const subscriptionId = @@ -37,7 +37,7 @@ async function operationsListMaximumSetGen() { * This sample demonstrates how to Gets a list of ElasticSan operations. * * @summary Gets a list of ElasticSan operations. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Operations_List_MinimumSet_Gen.json */ async function operationsListMinimumSetGen() { const subscriptionId = diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts new file mode 100644 index 000000000000..d0e1fe2fe0b5 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + PrivateEndpointConnection, + ElasticSanManagement +} from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters: PrivateEndpointConnection = { + groupIds: ["sytxzqlcoapcaywthgwvwcw"], + privateEndpoint: {}, + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San + * + * @summary Update the state of specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsCreateMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const parameters: PrivateEndpointConnection = { + privateLinkServiceConnectionState: { + description: "Auto-Approved", + actionsRequired: "None", + status: "Pending" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginCreateAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsCreateMaximumSetGen(); + privateEndpointConnectionsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts new file mode 100644 index 000000000000..c323101c2e4f --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San + * + * @summary Deletes the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsDeleteMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.beginDeleteAndWait( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsDeleteMaximumSetGen(); + privateEndpointConnectionsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts new file mode 100644 index 000000000000..7c687a87b8ac --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsGetMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San + * + * @summary Gets the specified private endpoint connection associated with the Elastic San + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsGetMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const privateEndpointConnectionName = "privateendpointconnectionname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName + ); + console.log(result); +} + +async function main() { + privateEndpointConnectionsGetMaximumSetGen(); + privateEndpointConnectionsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts new file mode 100644 index 000000000000..ece853c51e85 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json + */ +async function privateEndpointConnectionsListMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San. + * + * @summary List all Private Endpoint Connections associated with the Elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json + */ +async function privateEndpointConnectionsListMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnections.list( + resourceGroupName, + elasticSanName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + privateEndpointConnectionsListMaximumSetGen(); + privateEndpointConnectionsListMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts new file mode 100644 index 000000000000..aacde7d20f17 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ElasticSanManagement } from "@azure/arm-elasticsan"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMaximumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the private link resources that need to be created for a elastic San. + * + * @summary Gets the private link resources that need to be created for a elastic San. + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json + */ +async function privateLinkResourcesListByElasticSanMinimumSetGen() { + const subscriptionId = + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const resourceGroupName = + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const credential = new DefaultAzureCredential(); + const client = new ElasticSanManagement(credential, subscriptionId); + const result = await client.privateLinkResources.listByElasticSan( + resourceGroupName, + elasticSanName + ); + console.log(result); +} + +async function main() { + privateLinkResourcesListByElasticSanMaximumSetGen(); + privateLinkResourcesListByElasticSanMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts index 91a0fd5bd3d7..2196510463cc 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts @@ -21,12 +21,12 @@ dotenv.config(); * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MaximumSet_Gen.json */ async function skusListMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; - const filter = "aaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; + const filter = "dtycml"; const options: SkusListOptionalParams = { filter }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -41,11 +41,11 @@ async function skusListMaximumSetGen() { * This sample demonstrates how to List all the available Skus in the region and information related to them * * @summary List all the available Skus in the region and information related to them - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Skus_List_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Skus_List_MinimumSet_Gen.json */ async function skusListMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts index 0a95d24959ff..d3a23a9c8466 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts @@ -18,24 +18,27 @@ dotenv.config(); * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json */ async function volumeGroupsCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroup = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { virtualNetworkRules: [ - { action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" } + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}" + } ] }, - protocolType: "Iscsi", - tags: { key5933: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } + protocolType: "Iscsi" }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -52,15 +55,15 @@ async function volumeGroupsCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume Group. * * @summary Create a Volume Group. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json */ async function volumeGroupsCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroup = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts index 8512da4e994f..c76f4ae51342 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json */ async function volumeGroupsDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( @@ -41,15 +41,15 @@ async function volumeGroupsDeleteMaximumSetGen() { * This sample demonstrates how to Delete an VolumeGroup. * * @summary Delete an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json */ async function volumeGroupsDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsGetSample.ts index a98bb92479a3..4110abd47b2d 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsGetSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json */ async function volumeGroupsGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get( @@ -41,15 +41,15 @@ async function volumeGroupsGetMaximumSetGen() { * This sample demonstrates how to Get an VolumeGroups. * * @summary Get an VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json */ async function volumeGroupsGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumeGroups.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsListByElasticSanSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsListByElasticSanSample.ts index 569585a08db0..1a3ee6ab6b9c 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsListByElasticSanSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsListByElasticSanSample.ts @@ -18,14 +18,14 @@ dotenv.config(); * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json */ async function volumeGroupsListByElasticSanMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -42,14 +42,14 @@ async function volumeGroupsListByElasticSanMaximumSetGen() { * This sample demonstrates how to List VolumeGroups. * * @summary List VolumeGroups. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json */ async function volumeGroupsListByElasticSanMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsUpdateSample.ts index 033f73cef657..1befd9235fe4 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsUpdateSample.ts @@ -18,24 +18,27 @@ dotenv.config(); * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json */ async function volumeGroupsUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroupUpdate = { encryption: "EncryptionAtRestWithPlatformKey", networkAcls: { virtualNetworkRules: [ - { action: "Allow", virtualNetworkResourceId: "aaaaaaaaaaaaaaaa" } + { + action: "Allow", + virtualNetworkResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}" + } ] }, - protocolType: "Iscsi", - tags: { key7542: "aaaaaaaaaaaaaaaaaaaa" } + protocolType: "Iscsi" }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -52,15 +55,15 @@ async function volumeGroupsUpdateMaximumSetGen() { * This sample demonstrates how to Update an VolumeGroup. * * @summary Update an VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json */ async function volumeGroupsUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const parameters: VolumeGroupUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesCreateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesCreateSample.ts index 44253843720a..9ae3985b9c13 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesCreateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesCreateSample.ts @@ -18,20 +18,19 @@ dotenv.config(); * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MaximumSet_Gen.json */ async function volumesCreateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters: Volume = { - creationData: { createSource: "None", sourceUri: "aaaaaa" }, - sizeGiB: 22, - tags: { key7423: "aaaa" } + creationData: { createSource: "None", sourceUri: " ARM Id of resource" }, + sizeGiB: 23 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); @@ -49,17 +48,17 @@ async function volumesCreateMaximumSetGen() { * This sample demonstrates how to Create a Volume. * * @summary Create a Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Create_MinimumSet_Gen.json */ async function volumesCreateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters: Volume = {}; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters: Volume = { sizeGiB: 23 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginCreateAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesDeleteSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesDeleteSample.ts index 45bbd133568e..ae60bece04b6 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesDeleteSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesDeleteSample.ts @@ -18,16 +18,16 @@ dotenv.config(); * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json */ async function volumesDeleteMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( @@ -43,16 +43,16 @@ async function volumesDeleteMaximumSetGen() { * This sample demonstrates how to Delete an Volume. * * @summary Delete an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json */ async function volumesDeleteMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginDeleteAndWait( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesGetSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesGetSample.ts index 3b51f92c9dd8..54899501f1b0 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesGetSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesGetSample.ts @@ -18,16 +18,16 @@ dotenv.config(); * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MaximumSet_Gen.json */ async function volumesGetMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( @@ -43,16 +43,16 @@ async function volumesGetMaximumSetGen() { * This sample demonstrates how to Get an Volume. * * @summary Get an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Get_MinimumSet_Gen.json */ async function volumesGetMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.get( diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesListByVolumeGroupSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesListByVolumeGroupSample.ts index 266e8aca3d2a..cd420e4ffac1 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesListByVolumeGroupSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesListByVolumeGroupSample.ts @@ -18,15 +18,15 @@ dotenv.config(); * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json */ async function volumesListByVolumeGroupMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); @@ -44,15 +44,15 @@ async function volumesListByVolumeGroupMaximumSetGen() { * This sample demonstrates how to List Volumes in a VolumeGroup. * * @summary List Volumes in a VolumeGroup. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json */ async function volumesListByVolumeGroupMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesUpdateSample.ts b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesUpdateSample.ts index 289623b220d0..fa239540a795 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesUpdateSample.ts +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesUpdateSample.ts @@ -18,20 +18,17 @@ dotenv.config(); * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MaximumSet_Gen.json */ async function volumesUpdateMaximumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; - const parameters: VolumeUpdate = { - sizeGiB: 9, - tags: { key1864: "aaaaaaaaa" } - }; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; + const parameters: VolumeUpdate = { sizeGiB: 11 }; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); const result = await client.volumes.beginUpdateAndWait( @@ -48,16 +45,16 @@ async function volumesUpdateMaximumSetGen() { * This sample demonstrates how to Update an Volume. * * @summary Update an Volume. - * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2022-12-01-preview/examples/Volumes_Update_MinimumSet_Gen.json */ async function volumesUpdateMinimumSetGen() { const subscriptionId = - process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "aaaaaaaaaaaaaaaaaa"; + process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid"; const resourceGroupName = - process.env["ELASTICSANS_RESOURCE_GROUP"] || "rgelasticsan"; - const elasticSanName = "ti7q-k952-1qB3J_5"; - const volumeGroupName = "u_5I_1j4t3"; - const volumeName = "9132y"; + process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname"; + const elasticSanName = "elasticsanname"; + const volumeGroupName = "volumegroupname"; + const volumeName = "volumename"; const parameters: VolumeUpdate = {}; const credential = new DefaultAzureCredential(); const client = new ElasticSanManagement(credential, subscriptionId); diff --git a/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts b/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts index edc5ac0b78f7..3b089536f5ce 100644 --- a/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts +++ b/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts @@ -19,14 +19,18 @@ import { SkusImpl, ElasticSansImpl, VolumeGroupsImpl, - VolumesImpl + VolumesImpl, + PrivateEndpointConnectionsImpl, + PrivateLinkResourcesImpl } from "./operations"; import { Operations, Skus, ElasticSans, VolumeGroups, - Volumes + Volumes, + PrivateEndpointConnections, + PrivateLinkResources } from "./operationsInterfaces"; import { ElasticSanManagementOptionalParams } from "./models"; @@ -115,12 +119,14 @@ export class ElasticSanManagement extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-11-20-preview"; + this.apiVersion = options.apiVersion || "2022-12-01-preview"; this.operations = new OperationsImpl(this); this.skus = new SkusImpl(this); this.elasticSans = new ElasticSansImpl(this); this.volumeGroups = new VolumeGroupsImpl(this); this.volumes = new VolumesImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -157,4 +163,6 @@ export class ElasticSanManagement extends coreClient.ServiceClient { elasticSans: ElasticSans; volumeGroups: VolumeGroups; volumes: Volumes; + privateEndpointConnections: PrivateEndpointConnections; + privateLinkResources: PrivateLinkResources; } diff --git a/sdk/elasticsans/arm-elasticsan/src/lroImpl.ts b/sdk/elasticsans/arm-elasticsan/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/elasticsans/arm-elasticsan/src/lroImpl.ts +++ b/sdk/elasticsans/arm-elasticsan/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/elasticsans/arm-elasticsan/src/models/index.ts b/sdk/elasticsans/arm-elasticsan/src/models/index.ts index 445e60454a70..93941518b2aa 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/index.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/index.ts @@ -8,50 +8,78 @@ import * as coreClient from "@azure/core-client"; -/** List of operations supported by the RP. */ -export interface ElasticSanOperationListResult { - /** An array of operations supported by the ElasticSan RP. */ - value: ElasticSanRPOperation[]; - /** URI to fetch the next section of the paginated response. */ - nextLink?: string; +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** Description of a ElasticSan RP Operation */ -export interface ElasticSanRPOperation { - /** The name of the operation being performed on this particular object */ - name: string; +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { /** - * Indicates whether the operation applies to data-plane. + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; /** - * Additional metadata about RP operation. + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly display?: ElasticSanOperationDisplay; + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; } -/** Metadata about an operation. */ -export interface ElasticSanOperationDisplay { - /** Localized friendly form of the resource provider name. */ - provider: string; - /** Localized friendly form of the resource type related to this action/operation. */ - resource: string; - /** Localized friendly name for the operation, as it should be shown to the user. */ - operation: string; - /** Localized friendly description for the operation, as it should be shown to the user. */ - description: string; +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; } -/** The resource management error response. */ -export interface ErrorModel { - /** RP error response. */ - error?: ErrorResponse; +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; } -/** The resource management error response. */ -export interface ErrorResponse { +/** The error detail. */ +export interface ErrorDetail { /** * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -71,7 +99,7 @@ export interface ErrorResponse { * The error details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: ErrorResponse[]; + readonly details?: ErrorDetail[]; /** * The error additional info. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -100,6 +128,11 @@ export interface SkuInformationList { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: SkuInformation[]; + /** + * URI to fetch the next section of the paginated response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** ElasticSAN SKU and its properties */ @@ -161,7 +194,7 @@ export interface SKUCapability { /** List of Elastic Sans */ export interface ElasticSanList { /** An array of Elastic San objects. */ - value: ElasticSan[]; + value?: ElasticSan[]; /** * URI to fetch the next section of the paginated response. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -177,41 +210,63 @@ export interface Sku { tier?: SkuTier; } -/** 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; +/** Response for PrivateEndpoint */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; +} + +/** Response for Private Link Service Connection state */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; } -/** The resource model definition. */ +/** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Azure resource identifier. + * Fully qualified resource ID for the resource. Ex - /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; /** - * Azure resource name. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Azure resource type. + * 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 tags. */ - tags?: { [propertyName: string]: 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; } /** Response for ElasticSan update request. */ @@ -227,7 +282,7 @@ export interface ElasticSanUpdate { /** List of Volume Groups */ export interface VolumeGroupList { /** An array of Volume Groups objects. */ - value: VolumeGroup[]; + value?: VolumeGroup[]; /** * URI to fetch the next section of the paginated response. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -256,8 +311,6 @@ export interface VirtualNetworkRule { /** Volume Group request. */ export interface VolumeGroupUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; /** Type of storage target */ protocolType?: StorageTargetType; /** Type of encryption */ @@ -302,8 +355,6 @@ export interface IscsiTargetInfo { /** Response for Volume request. */ export interface VolumeUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; /** Volume size. */ sizeGiB?: number; } @@ -311,7 +362,7 @@ export interface VolumeUpdate { /** List of Volumes */ export interface VolumeList { /** An array of Volume objects. */ - value: Volume[]; + value?: Volume[]; /** * URI to fetch the next section of the paginated response. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -319,62 +370,72 @@ export interface VolumeList { readonly nextLink?: string; } -/** The resource model definition for a ARM tracked top level resource. */ -export interface TrackedResource extends Resource { - /** The geo-location where the resource lives. */ - location?: string; -} - -/** Response for Volume Group request. */ -export interface VolumeGroup extends Resource { +/** List of private endpoint connections associated with SAN */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; /** - * Resource metadata required by ARM RPC + * URI to fetch the next section of the paginated response. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly nextLink?: string; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; /** - * State of the operation on the resource. + * URI to fetch the next section of the paginated response. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningStates; - /** Type of storage target */ - protocolType?: StorageTargetType; - /** Type of encryption */ - encryption?: EncryptionType; - /** A collection of rules governing the accessibility from specific network locations. */ - networkAcls?: NetworkRuleSet; + readonly nextLink?: string; } -/** Response for Volume request. */ -export interface Volume extends Resource { +/** Response for PrivateEndpoint Connection object */ +export interface PrivateEndpointConnection extends Resource { /** - * Resource metadata required by ARM RPC + * Provisioning State of Private Endpoint connection resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningStates; + /** Private Endpoint resource */ + privateEndpoint?: PrivateEndpoint; + /** Private Link Service Connection State. */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** List of resources private endpoint is mapped */ + groupIds?: string[]; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: 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 {} + +/** A private link resource */ +export interface PrivateLinkResource extends Resource { /** - * Unique Id of the volume in GUID format + * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly volumeId?: string; - /** State of the operation on the resource. */ - creationData?: SourceCreationData; - /** Volume size. */ - sizeGiB?: number; + readonly groupId?: string; /** - * Storage target information + * The private link resource required member names. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageTarget?: IscsiTargetInfo; + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; } /** Response for ElasticSan request. */ export interface ElasticSan extends TrackedResource { - /** - * Resource metadata required by ARM RPC - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** resource sku */ sku: Sku; /** Logical zone for Elastic San resource; example: ["1"]. */ @@ -413,8 +474,122 @@ export interface ElasticSan extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalSizeTiB?: number; + /** + * The list of Private Endpoint Connections. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +} + +/** Response for Volume Group request. */ +export interface VolumeGroup extends ProxyResource { + /** + * State of the operation on the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningStates; + /** Type of storage target */ + protocolType?: StorageTargetType; + /** Type of encryption */ + encryption?: EncryptionType; + /** A collection of rules governing the accessibility from specific network locations. */ + networkAcls?: NetworkRuleSet; + /** + * The list of Private Endpoint Connections. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +} + +/** Response for Volume request. */ +export interface Volume extends ProxyResource { + /** + * Unique Id of the volume in GUID format + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly volumeId?: string; + /** State of the operation on the resource. */ + creationData?: SourceCreationData; + /** Volume size. */ + sizeGiB: number; + /** + * Storage target information + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageTarget?: IscsiTargetInfo; +} + +/** Defines headers for ElasticSans_update operation. */ +export interface ElasticSansUpdateHeaders { + location?: string; +} + +/** Defines headers for ElasticSans_delete operation. */ +export interface ElasticSansDeleteHeaders { + location?: string; +} + +/** Defines headers for VolumeGroups_update operation. */ +export interface VolumeGroupsUpdateHeaders { + location?: string; +} + +/** Defines headers for VolumeGroups_delete operation. */ +export interface VolumeGroupsDeleteHeaders { + location?: string; } +/** Defines headers for Volumes_update operation. */ +export interface VolumesUpdateHeaders { + location?: string; +} + +/** Defines headers for Volumes_delete operation. */ +export interface VolumesDeleteHeaders { + location?: string; +} + +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + location?: string; +} + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { /** Premium locally redundant storage */ @@ -484,6 +659,30 @@ export enum KnownProvisioningStates { */ export type ProvisioningStates = string; +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + /** Pending */ + Pending = "Pending", + /** Approved */ + Approved = "Approved", + /** Failed */ + Failed = "Failed", + /** Rejected */ + Rejected = "Rejected" +} + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Failed** \ + * **Rejected** + */ +export type PrivateEndpointServiceConnectionStatus = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -589,7 +788,7 @@ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = ElasticSanOperationListResult; +export type OperationsListResponse = OperationListResult; /** Optional parameters. */ export interface SkusListOptionalParams extends coreClient.OperationOptions { @@ -775,6 +974,48 @@ export interface VolumesListByVolumeGroupNextOptionalParams /** Contains response data for the listByVolumeGroupNext operation. */ export type VolumesListByVolumeGroupNextResponse = VolumeList; +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCreateOptionalParams + 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 create operation. */ +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsDeleteOptionalParams + 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; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByElasticSanOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByElasticSan operation. */ +export type PrivateLinkResourcesListByElasticSanResponse = PrivateLinkResourceListResult; + /** Optional parameters. */ export interface ElasticSanManagementOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts b/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts index 38f580a3bd57..fd4c5cc2982c 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts @@ -8,26 +8,27 @@ import * as coreClient from "@azure/core-client"; -export const ElasticSanOperationListResult: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticSanOperationListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ElasticSanRPOperation" + className: "Operation" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -36,14 +37,14 @@ export const ElasticSanOperationListResult: coreClient.CompositeMapper = { } }; -export const ElasticSanRPOperation: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticSanRPOperation", + className: "Operation", modelProperties: { name: { serializedName: "name", - required: true, + readOnly: true, type: { name: "String" } @@ -59,42 +60,56 @@ export const ElasticSanRPOperation: coreClient.CompositeMapper = { serializedName: "display", type: { name: "Composite", - className: "ElasticSanOperationDisplay" + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" } } } } }; -export const ElasticSanOperationDisplay: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticSanOperationDisplay", + className: "OperationDisplay", modelProperties: { provider: { serializedName: "provider", - required: true, + readOnly: true, type: { name: "String" } }, resource: { serializedName: "resource", - required: true, + readOnly: true, type: { name: "String" } }, operation: { serializedName: "operation", - required: true, + readOnly: true, type: { name: "String" } }, description: { serializedName: "description", - required: true, + readOnly: true, type: { name: "String" } @@ -103,26 +118,26 @@ export const ElasticSanOperationDisplay: coreClient.CompositeMapper = { } }; -export const ErrorModel: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorModel", + className: "ErrorResponse", modelProperties: { error: { serializedName: "error", type: { name: "Composite", - className: "ErrorResponse" + className: "ErrorDetail" } } } } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "ErrorDetail", modelProperties: { code: { serializedName: "code", @@ -153,7 +168,7 @@ export const ErrorResponse: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorResponse" + className: "ErrorDetail" } } } @@ -216,6 +231,13 @@ export const SkuInformationList: coreClient.CompositeMapper = { } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } @@ -346,7 +368,6 @@ export const ElasticSanList: coreClient.CompositeMapper = { modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { @@ -390,46 +411,44 @@ export const Sku: coreClient.CompositeMapper = { } }; -export const SystemData: coreClient.CompositeMapper = { +export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "PrivateEndpoint", modelProperties: { - createdBy: { - serializedName: "createdBy", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } - }, - createdByType: { - serializedName: "createdByType", + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + description: { + serializedName: "description", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + actionsRequired: { + serializedName: "actionsRequired", type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } } } } @@ -461,11 +480,56 @@ export const Resource: coreClient.CompositeMapper = { name: "String" } }, - tags: { - serializedName: "tags", + systemData: { + serializedName: "systemData", type: { - name: "Dictionary", - value: { type: { name: "String" } } + 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" } } } @@ -507,7 +571,6 @@ export const VolumeGroupList: coreClient.CompositeMapper = { modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { @@ -593,13 +656,6 @@ export const VolumeGroupUpdate: coreClient.CompositeMapper = { name: "Composite", className: "VolumeGroupUpdate", modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, protocolType: { serializedName: "properties.protocolType", type: { @@ -694,13 +750,6 @@ export const VolumeUpdate: coreClient.CompositeMapper = { name: "Composite", className: "VolumeUpdate", modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, sizeGiB: { serializedName: "properties.sizeGiB", type: { @@ -718,7 +767,6 @@ export const VolumeList: coreClient.CompositeMapper = { modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { @@ -740,14 +788,26 @@ export const VolumeList: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "PrivateEndpointConnectionListResult", modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -756,19 +816,40 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const VolumeGroup: coreClient.CompositeMapper = { +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumeGroup", + className: "PrivateLinkResourceListResult", modelProperties: { - ...Resource.type.modelProperties, - systemData: { - serializedName: "systemData", + value: { + serializedName: "value", type: { - name: "Composite", - className: "SystemData" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } } }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -776,67 +857,103 @@ export const VolumeGroup: coreClient.CompositeMapper = { name: "String" } }, - protocolType: { - serializedName: "properties.protocolType", + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "String" + name: "Composite", + className: "PrivateEndpoint" } }, - encryption: { - serializedName: "properties.encryption", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "PrivateLinkServiceConnectionState" } }, - networkAcls: { - serializedName: "properties.networkAcls", + groupIds: { + serializedName: "properties.groupIds", type: { - name: "Composite", - className: "NetworkRuleSet" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Volume: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "TrackedResource", modelProperties: { ...Resource.type.modelProperties, - systemData: { - serializedName: "systemData", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "SystemData" + name: "Dictionary", + value: { type: { name: "String" } } } }, - volumeId: { - serializedName: "properties.volumeId", - readOnly: true, + location: { + serializedName: "location", + required: true, type: { name: "String" } - }, - creationData: { - serializedName: "properties.creationData", + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, type: { - name: "Composite", - className: "SourceCreationData" + name: "String" } }, - sizeGiB: { - serializedName: "properties.sizeGiB", + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - storageTarget: { - serializedName: "properties.storageTarget", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "Composite", - className: "IscsiTargetInfo" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } @@ -849,13 +966,6 @@ export const ElasticSan: coreClient.CompositeMapper = { className: "ElasticSan", modelProperties: { ...TrackedResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, sku: { serializedName: "properties.sku", type: { @@ -929,6 +1039,211 @@ export const ElasticSan: coreClient.CompositeMapper = { type: { name: "Number" } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + +export const VolumeGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + protocolType: { + serializedName: "properties.protocolType", + type: { + name: "String" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "String" + } + }, + networkAcls: { + serializedName: "properties.networkAcls", + type: { + name: "Composite", + className: "NetworkRuleSet" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + +export const Volume: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Volume", + modelProperties: { + ...ProxyResource.type.modelProperties, + volumeId: { + serializedName: "properties.volumeId", + readOnly: true, + type: { + name: "String" + } + }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "SourceCreationData" + } + }, + sizeGiB: { + serializedName: "properties.sizeGiB", + required: true, + type: { + name: "Number" + } + }, + storageTarget: { + serializedName: "properties.storageTarget", + type: { + name: "Composite", + className: "IscsiTargetInfo" + } + } + } + } +}; + +export const ElasticSansUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticSansUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticSansDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticSansDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VolumeGroupsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeGroupsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VolumeGroupsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeGroupsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VolumesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VolumesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } } } } diff --git a/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts b/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts index ec72b4d23c3a..c9d051837228 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts @@ -17,7 +17,8 @@ import { VolumeGroup as VolumeGroupMapper, VolumeGroupUpdate as VolumeGroupUpdateMapper, Volume as VolumeMapper, - VolumeUpdate as VolumeUpdateMapper + VolumeUpdate as VolumeUpdateMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -47,7 +48,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-11-20-preview", + defaultValue: "2022-12-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -84,7 +85,6 @@ export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { constraints: { - Pattern: new RegExp("^[-\\w\\._]*[0-9A-Za-z]$"), MaxLength: 90, MinLength: 1 }, @@ -197,3 +197,19 @@ export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: VolumeUpdateMapper }; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: PrivateEndpointConnectionMapper +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/elasticSans.ts b/sdk/elasticsans/arm-elasticsan/src/operations/elasticSans.ts index 1ffcd918cf3d..5b993d5a2e82 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/elasticSans.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/elasticSans.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ElasticSanManagement } from "../elasticSanManagement"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ElasticSan, ElasticSansListBySubscriptionNextOptionalParams, @@ -212,8 +216,8 @@ export class ElasticSansImpl implements ElasticSans { parameters: ElasticSan, options?: ElasticSansCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ElasticSansCreateResponse > > { @@ -223,7 +227,7 @@ export class ElasticSansImpl implements ElasticSans { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -256,15 +260,18 @@ export class ElasticSansImpl implements ElasticSans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, elasticSanName, parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, parameters, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ElasticSansCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -305,8 +312,8 @@ export class ElasticSansImpl implements ElasticSans { parameters: ElasticSanUpdate, options?: ElasticSansUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ElasticSansUpdateResponse > > { @@ -316,7 +323,7 @@ export class ElasticSansImpl implements ElasticSans { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -349,15 +356,18 @@ export class ElasticSansImpl implements ElasticSans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, elasticSanName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ElasticSansUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -395,14 +405,14 @@ export class ElasticSansImpl implements ElasticSans { resourceGroupName: string, elasticSanName: string, options?: ElasticSansDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -435,15 +445,15 @@ export class ElasticSansImpl implements ElasticSans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, elasticSanName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -529,7 +539,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSanList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -546,7 +556,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSanList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -576,7 +586,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSan }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -609,7 +619,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSan }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters1, @@ -634,7 +644,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -656,7 +666,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSan }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -677,7 +687,7 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSanList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ @@ -696,7 +706,7 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ElasticSanList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/index.ts b/sdk/elasticsans/arm-elasticsan/src/operations/index.ts index 75c3aa932129..617c77039b87 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/index.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/index.ts @@ -11,3 +11,5 @@ export * from "./skus"; export * from "./elasticSans"; export * from "./volumeGroups"; export * from "./volumes"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/operations.ts b/sdk/elasticsans/arm-elasticsan/src/operations/operations.ts index 742f2e5dee24..ee8fd20d4162 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/operations.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/operations.ts @@ -13,7 +13,7 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ElasticSanManagement } from "../elasticSanManagement"; import { - ElasticSanRPOperation, + Operation, OperationsListOptionalParams, OperationsListResponse } from "../models"; @@ -37,7 +37,7 @@ export class OperationsImpl implements Operations { */ public list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -58,7 +58,7 @@ export class OperationsImpl implements Operations { private async *listPagingPage( options?: OperationsListOptionalParams, _settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: OperationsListResponse; result = await this._list(options); yield result.value || []; @@ -66,7 +66,7 @@ export class OperationsImpl implements Operations { private async *listPagingAll( options?: OperationsListOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; } @@ -90,10 +90,10 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ElasticSanOperationListResult + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/privateEndpointConnections.ts b/sdk/elasticsans/arm-elasticsan/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..134b1af5fa35 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/src/operations/privateEndpointConnections.ts @@ -0,0 +1,450 @@ +/* + * 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 { PrivateEndpointConnections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ElasticSanManagement } from "../elasticSanManagement"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsListOptionalParams, + PrivateEndpointConnectionsListResponse, + PrivateEndpointConnectionsCreateOptionalParams, + PrivateEndpointConnectionsCreateResponse, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsDeleteOptionalParams +} from "../models"; + +/// +/** Class containing PrivateEndpointConnections operations. */ +export class PrivateEndpointConnectionsImpl + implements PrivateEndpointConnections { + private readonly client: ElasticSanManagement; + + /** + * Initialize a new instance of the class PrivateEndpointConnections class. + * @param client Reference to the service client + */ + constructor(client: ElasticSanManagement) { + this.client = client; + } + + /** + * List all Private Endpoint Connections associated with the Elastic San. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, elasticSanName, 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, + elasticSanName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateEndpointConnectionsListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: PrivateEndpointConnectionsListResponse; + result = await this._list(resourceGroupName, elasticSanName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + elasticSanName, + options + )) { + yield* page; + } + } + + /** + * Update the state of specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param parameters Private Endpoint Connection Approval object. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionsCreateResponse + > + > { + 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, + elasticSanName, + privateEndpointConnectionName, + parameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update the state of specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param parameters Private Endpoint Connection Approval object. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Deletes the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise, void>> { + 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, + elasticSanName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + elasticSanName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all Private Endpoint Connections associated with the Elastic San. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, elasticSanName, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.elasticSanName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.elasticSanName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.elasticSanName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.elasticSanName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/privateLinkResources.ts b/sdk/elasticsans/arm-elasticsan/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..cc8ec2b5c43b --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/src/operations/privateLinkResources.ts @@ -0,0 +1,72 @@ +/* + * 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 { PrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ElasticSanManagement } from "../elasticSanManagement"; +import { + PrivateLinkResourcesListByElasticSanOptionalParams, + PrivateLinkResourcesListByElasticSanResponse +} from "../models"; + +/** Class containing PrivateLinkResources operations. */ +export class PrivateLinkResourcesImpl implements PrivateLinkResources { + private readonly client: ElasticSanManagement; + + /** + * Initialize a new instance of the class PrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: ElasticSanManagement) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a elastic San. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param options The options parameters. + */ + listByElasticSan( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateLinkResourcesListByElasticSanOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, elasticSanName, options }, + listByElasticSanOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByElasticSanOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.elasticSanName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/skus.ts b/sdk/elasticsans/arm-elasticsan/src/operations/skus.ts index 523f5fac207e..542f7cf746fa 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/skus.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/skus.ts @@ -91,7 +91,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SkuInformationList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/volumeGroups.ts b/sdk/elasticsans/arm-elasticsan/src/operations/volumeGroups.ts index 78b778a11144..0570a761c7f3 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/volumeGroups.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/volumeGroups.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ElasticSanManagement } from "../elasticSanManagement"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VolumeGroup, VolumeGroupsListByElasticSanNextOptionalParams, @@ -160,8 +164,8 @@ export class VolumeGroupsImpl implements VolumeGroups { parameters: VolumeGroup, options?: VolumeGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VolumeGroupsCreateResponse > > { @@ -171,7 +175,7 @@ export class VolumeGroupsImpl implements VolumeGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -204,21 +208,24 @@ export class VolumeGroupsImpl implements VolumeGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VolumeGroupsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -264,8 +271,8 @@ export class VolumeGroupsImpl implements VolumeGroups { parameters: VolumeGroupUpdate, options?: VolumeGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VolumeGroupsUpdateResponse > > { @@ -275,7 +282,7 @@ export class VolumeGroupsImpl implements VolumeGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -308,21 +315,24 @@ export class VolumeGroupsImpl implements VolumeGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VolumeGroupsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -365,14 +375,14 @@ export class VolumeGroupsImpl implements VolumeGroups { elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -405,15 +415,15 @@ export class VolumeGroupsImpl implements VolumeGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, elasticSanName, volumeGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -491,7 +501,7 @@ const listByElasticSanOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeGroupList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -522,7 +532,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeGroup }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters2, @@ -556,7 +566,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeGroup }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters3, @@ -582,7 +592,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -605,7 +615,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeGroup }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -627,7 +637,7 @@ const listByElasticSanNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeGroupList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ diff --git a/sdk/elasticsans/arm-elasticsan/src/operations/volumes.ts b/sdk/elasticsans/arm-elasticsan/src/operations/volumes.ts index e9440e979ef6..a24f3e36d5c4 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operations/volumes.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operations/volumes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ElasticSanManagement } from "../elasticSanManagement"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Volume, VolumesListByVolumeGroupNextOptionalParams, @@ -154,7 +158,10 @@ export class VolumesImpl implements Volumes { parameters: Volume, options?: VolumesCreateOptionalParams ): Promise< - PollerLike, VolumesCreateResponse> + SimplePollerLike< + OperationState, + VolumesCreateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -162,7 +169,7 @@ export class VolumesImpl implements Volumes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -195,9 +202,9 @@ export class VolumesImpl implements Volumes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, @@ -205,12 +212,15 @@ export class VolumesImpl implements Volumes { parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VolumesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -261,7 +271,10 @@ export class VolumesImpl implements Volumes { parameters: VolumeUpdate, options?: VolumesUpdateOptionalParams ): Promise< - PollerLike, VolumesUpdateResponse> + SimplePollerLike< + OperationState, + VolumesUpdateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -269,7 +282,7 @@ export class VolumesImpl implements Volumes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -302,9 +315,9 @@ export class VolumesImpl implements Volumes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, @@ -312,12 +325,15 @@ export class VolumesImpl implements Volumes { parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VolumesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -365,14 +381,14 @@ export class VolumesImpl implements Volumes { volumeGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -405,21 +421,21 @@ export class VolumesImpl implements Volumes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, elasticSanName, volumeGroupName, volumeName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -538,7 +554,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Volume }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters4, @@ -573,7 +589,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Volume }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters5, @@ -600,7 +616,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -624,7 +640,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Volume }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -648,7 +664,7 @@ const listByVolumeGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -670,7 +686,7 @@ const listByVolumeGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.VolumeList }, default: { - bodyMapper: Mappers.ErrorModel + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/elasticSans.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/elasticSans.ts index c4ffc1b81409..ee77f0aa39d0 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/elasticSans.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/elasticSans.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ElasticSan, ElasticSansListBySubscriptionOptionalParams, @@ -54,8 +54,8 @@ export interface ElasticSans { parameters: ElasticSan, options?: ElasticSansCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ElasticSansCreateResponse > >; @@ -85,8 +85,8 @@ export interface ElasticSans { parameters: ElasticSanUpdate, options?: ElasticSansUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ElasticSansUpdateResponse > >; @@ -113,7 +113,7 @@ export interface ElasticSans { resourceGroupName: string, elasticSanName: string, options?: ElasticSansDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Elastic San. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/index.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/index.ts index 75c3aa932129..617c77039b87 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/index.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/index.ts @@ -11,3 +11,5 @@ export * from "./skus"; export * from "./elasticSans"; export * from "./volumeGroups"; export * from "./volumes"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/operations.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/operations.ts index d6267d7bf74d..c727dc5c6045 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/operations.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ElasticSanRPOperation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models"; /// /** Interface representing a Operations. */ @@ -18,5 +18,5 @@ export interface Operations { */ list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; } diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateEndpointConnections.ts new file mode 100644 index 000000000000..a51c76214f26 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateEndpointConnections.ts @@ -0,0 +1,109 @@ +/* + * 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 { + PrivateEndpointConnection, + PrivateEndpointConnectionsListOptionalParams, + PrivateEndpointConnectionsCreateOptionalParams, + PrivateEndpointConnectionsCreateResponse, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnections. */ +export interface PrivateEndpointConnections { + /** + * List all Private Endpoint Connections associated with the Elastic San. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Update the state of specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param parameters Private Endpoint Connection Approval object. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionsCreateResponse + > + >; + /** + * Update the state of specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param parameters Private Endpoint Connection Approval object. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOptionalParams + ): Promise; + /** + * Gets the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise; + /** + * Deletes the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified private endpoint connection associated with the Elastic San + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param privateEndpointConnectionName The name of the Private Endpoint connection. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + elasticSanName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateLinkResources.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateLinkResources.ts new file mode 100644 index 000000000000..e0c8f6478694 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/privateLinkResources.ts @@ -0,0 +1,27 @@ +/* + * 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 { + PrivateLinkResourcesListByElasticSanOptionalParams, + PrivateLinkResourcesListByElasticSanResponse +} from "../models"; + +/** Interface representing a PrivateLinkResources. */ +export interface PrivateLinkResources { + /** + * Gets the private link resources that need to be created for a elastic San. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param elasticSanName The name of the ElasticSan. + * @param options The options parameters. + */ + listByElasticSan( + resourceGroupName: string, + elasticSanName: string, + options?: PrivateLinkResourcesListByElasticSanOptionalParams + ): Promise; +} diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumeGroups.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumeGroups.ts index c8430eee2609..6048463395f2 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumeGroups.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumeGroups.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VolumeGroup, VolumeGroupsListByElasticSanOptionalParams, @@ -50,8 +50,8 @@ export interface VolumeGroups { parameters: VolumeGroup, options?: VolumeGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VolumeGroupsCreateResponse > >; @@ -85,8 +85,8 @@ export interface VolumeGroups { parameters: VolumeGroupUpdate, options?: VolumeGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VolumeGroupsUpdateResponse > >; @@ -117,7 +117,7 @@ export interface VolumeGroups { elasticSanName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an VolumeGroup. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumes.ts b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumes.ts index a6bd659e778d..46766b391b04 100644 --- a/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumes.ts +++ b/sdk/elasticsans/arm-elasticsan/src/operationsInterfaces/volumes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Volume, VolumesListByVolumeGroupOptionalParams, @@ -54,7 +54,10 @@ export interface Volumes { parameters: Volume, options?: VolumesCreateOptionalParams ): Promise< - PollerLike, VolumesCreateResponse> + SimplePollerLike< + OperationState, + VolumesCreateResponse + > >; /** * Create a Volume. @@ -90,7 +93,10 @@ export interface Volumes { parameters: VolumeUpdate, options?: VolumesUpdateOptionalParams ): Promise< - PollerLike, VolumesUpdateResponse> + SimplePollerLike< + OperationState, + VolumesUpdateResponse + > >; /** * Update an Volume. @@ -123,7 +129,7 @@ export interface Volumes { volumeGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an Volume. * @param resourceGroupName The name of the resource group. The name is case insensitive. From 5bb4b015d5379a6cd92fd7f90ee7074ddab9c396 Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:07:11 +0800 Subject: [PATCH 2/2] update files --- sdk/elasticsans/arm-elasticsan/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md index 8c97807ca6a5..5440e1942cc1 100644 --- a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md +++ b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md @@ -46,9 +46,6 @@ - Added Enum KnownOrigin - Added Enum KnownPrivateEndpointServiceConnectionStatus - Added function getContinuationToken - -**Breaking Changes** - - Interface ElasticSan no longer has parameter systemData - Interface ErrorResponse no longer has parameter additionalInfo - Interface ErrorResponse no longer has parameter code @@ -60,6 +57,9 @@ - Interface VolumeGroup no longer has parameter systemData - Interface VolumeGroupUpdate no longer has parameter tags - Interface VolumeUpdate no longer has parameter tags + +**Breaking Changes** + - Parameter location of interface TrackedResource is now required - Parameter sizeGiB of interface Volume is now required