diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c9cc16feff49..7a78ae8563bf 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -706,6 +706,19 @@ packages: - supports-color dev: false + /@azure-tools/test-recorder/2.0.0: + resolution: {integrity: sha512-OTic1OwOk25B8ecdMQ4wgyDaUNMMw0qzO4/0sy9ScPXWLmUFGMlkS0+BOQ2K9t8WCksM/wU+NjUZo/5T4zaG6A==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/core-auth': 1.4.0 + '@azure/core-http': 2.3.1 + '@azure/core-rest-pipeline': 1.10.2 + '@azure/core-util': 1.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /@azure/abort-controller/1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} engines: {node: '>=12.0.0'} @@ -3873,7 +3886,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230313 + typescript: 5.1.0-dev.20230315 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8729,8 +8742,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230313: - resolution: {integrity: sha512-vveGdy/uNUyKJ/JbXsJTSP8Z8gfCRsiXdHBMbvJ2XzuzHsDQC3mR+ZPvIGrXoTWMn5XNbyJ8ufYuqGiCGTi6tg==} + /typescript/5.1.0-dev.20230315: + resolution: {integrity: sha512-lHUjpyLQRGRdkxHROCqNyAeoq8ytzxFqAY2nCOTiI/sSygZsAsTyUS521ldoNcjym/DiR+rmaNG6mpt29enm9g==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -10795,10 +10808,11 @@ packages: dev: false file:projects/arm-compute-1.tgz: - resolution: {integrity: sha512-Wo7QcOadvBoR5vbeXSNYdwkIDmtRMlbeJLc+VM/gTSeju8z7NQ0/01SpkeOb/SHHejAyuDkHXtl9vrMT6mKnsQ==, tarball: file:projects/arm-compute-1.tgz} + resolution: {integrity: sha512-kPwfiqHl2OShPblzrdmESAnlv0/9Wc8gDlXce1JRWLU0RRTvO3/CRrLucqDP1OqsnyCJwXX6bX0CuU+WnFKnvw==, tarball: file:projects/arm-compute-1.tgz} name: '@rush-temp/arm-compute-1' version: 0.0.0 dependencies: + '@azure-tools/test-recorder': 2.0.0 '@azure/arm-network': 26.0.0 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.37 @@ -10811,7 +10825,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -10820,6 +10834,7 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: + - encoding - supports-color dev: false @@ -13311,7 +13326,7 @@ packages: dev: false file:projects/arm-network-1.tgz: - resolution: {integrity: sha512-h69TQy3Jv3Sq4nOUUoQ1PqUMQ5vPWhMxTAhPG2D0ci1lXMpmDgg0eLov6oGX5/Q1uzaa4yXyc4OToGLF7p3BBA==, tarball: file:projects/arm-network-1.tgz} + resolution: {integrity: sha512-HP4VbHNAjhBlsVcszfjybzzFd7MlgIBwbEnYhkPOk+uNySUPuU1whPAIPsgcbAkwf90ulTjitwCRSmBdf91Zhg==, tarball: file:projects/arm-network-1.tgz} name: '@rush-temp/arm-network-1' version: 0.0.0 dependencies: @@ -13336,7 +13351,6 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - encoding - supports-color dev: false @@ -15298,7 +15312,7 @@ packages: dev: false file:projects/arm-webpubsub.tgz: - resolution: {integrity: sha512-EjFMfROIleuK8B/I2xiUMpXg9aBaxGkT+2uR4P51hS5oe+lmBVqnCJ8dlkGKbauBdwBqjt6jxeouvPWmCHBbjA==, tarball: file:projects/arm-webpubsub.tgz} + resolution: {integrity: sha512-p2yKPQQABjap5rsdwWPO/pDmLhwsEZfsd5KjA7TU/rb+kwJu3OG6ZCfBsJj6OIT5+0ZuVabpLVOQgZCJzTVxRw==, tarball: file:projects/arm-webpubsub.tgz} name: '@rush-temp/arm-webpubsub' version: 0.0.0 dependencies: @@ -15323,7 +15337,6 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - encoding - supports-color dev: false @@ -15517,7 +15530,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - eslint: 8.35.0 + eslint: 8.36.0 events: 3.3.0 inherits: 2.0.4 karma: 6.4.1 @@ -16912,7 +16925,7 @@ packages: dev: false file:projects/event-hubs.tgz: - resolution: {integrity: sha512-19yBgs9YYynzl6fcHlrWVHrqz+5BQlzWhXk8R3s70JGbf7ZvQRCznNpM6n7MHUZU/n1OnqPB4Bw0tt+ADqxtQg==, tarball: file:projects/event-hubs.tgz} + resolution: {integrity: sha512-5TzCX3EbyrKQTJlA9IvX6pwajWdeU/5wOtqYoq6r/1DGoI87ffCek+ws57UkSExMwKw0gg6E1wDG0uFUMpzcPQ==, tarball: file:projects/event-hubs.tgz} name: '@rush-temp/event-hubs' version: 0.0.0 dependencies: @@ -19057,7 +19070,7 @@ packages: dev: false file:projects/service-bus.tgz: - resolution: {integrity: sha512-capTfQmTOxtimRb9xqcMuZE6wAVbDx1EK+GllnqYjLm3+sMfyB71R9JLbhN0ncmTeweJVv5/RnKxTbAsJUNSEw==, tarball: file:projects/service-bus.tgz} + resolution: {integrity: sha512-WsequaezjWAVEEDEhVWOq+MwN7tcmgtiCPZS4o7B4HuT2u9JW90z0k2uJTkQzhwozGU/G1GFai8EJw5xIAoxZA==, tarball: file:projects/service-bus.tgz} name: '@rush-temp/service-bus' version: 0.0.0 dependencies: diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index 59f4dac04a27..e13e20692447 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History + +## 20.1.0 (2023-03-15) + +**Features** -## 20.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Interface VirtualMachineScaleSetVMInstanceView has a new optional parameter computerName + - Interface VirtualMachineScaleSetVMInstanceView has a new optional parameter hyperVGeneration + - Interface VirtualMachineScaleSetVMInstanceView has a new optional parameter osName + - Interface VirtualMachineScaleSetVMInstanceView has a new optional parameter osVersion + - Enum KnownStorageAccountType has a new value StandardSSDLRS + + ## 20.0.0 (2023-01-05) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 66dce6b4a0c2..f052c636eb8c 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3dae9445631a0e27d743c1355f8cb82391d1634f", + "commit": "2245c872dee3730ed770a4ca508a1a450200c231", "readme": "specification/compute/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\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/compute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.9", "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.5.20221215.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.9" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index 1cd639773138..5ac5f312149a 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ComputeManagementClient.", - "version": "20.0.1", + "version": "20.1.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@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": "~4.8.0", @@ -41,15 +41,14 @@ "rimraf": "^3.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-network": "^26.0.0" + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -112,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute" +} \ No newline at end of file diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md index 050bd7723852..f38e2169d477 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -8,9 +8,9 @@ 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 AccessLevel = string; @@ -367,11 +367,11 @@ export interface CapacityReservationProfile { // @public export interface CapacityReservations { - beginCreateOrUpdate(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservation, options?: CapacityReservationsCreateOrUpdateOptionalParams): Promise, CapacityReservationsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservation, options?: CapacityReservationsCreateOrUpdateOptionalParams): Promise, CapacityReservationsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservation, options?: CapacityReservationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservationUpdate, options?: CapacityReservationsUpdateOptionalParams): Promise, CapacityReservationsUpdateResponse>>; + beginUpdate(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservationUpdate, options?: CapacityReservationsUpdateOptionalParams): Promise, CapacityReservationsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, parameters: CapacityReservationUpdate, options?: CapacityReservationsUpdateOptionalParams): Promise; get(resourceGroupName: string, capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsGetOptionalParams): Promise; listByCapacityReservationGroup(resourceGroupName: string, capacityReservationGroupName: string, options?: CapacityReservationsListByCapacityReservationGroupOptionalParams): PagedAsyncIterableIterator; @@ -583,13 +583,13 @@ export interface CloudServiceRole { // @public export interface CloudServiceRoleInstances { - beginDelete(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams): Promise, void>>; + beginDelete(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams): Promise; - beginRebuild(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams): Promise, void>>; + beginRebuild(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams): Promise, void>>; beginRebuildAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams): Promise; - beginReimage(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams): Promise, void>>; + beginReimage(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams): Promise, void>>; beginReimageAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams): Promise; - beginRestart(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams): Promise, void>>; + beginRestart(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams): Promise, void>>; beginRestartAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams): Promise; get(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesGetOptionalParams): Promise; getInstanceView(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesGetInstanceViewOptionalParams): Promise; @@ -719,23 +719,23 @@ export type CloudServiceRolesListResponse = CloudServiceRoleListResult; // @public export interface CloudServices { - beginCreateOrUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams): Promise, CloudServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams): Promise, CloudServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams): Promise; - beginDeleteInstances(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams): Promise, void>>; + beginDeleteInstances(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams): Promise, void>>; beginDeleteInstancesAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams): Promise, void>>; + beginPowerOff(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams): Promise, void>>; beginPowerOffAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams): Promise; - beginRebuild(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams): Promise, void>>; + beginRebuild(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams): Promise, void>>; beginRebuildAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams): Promise; - beginReimage(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams): Promise, void>>; + beginReimage(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams): Promise, void>>; beginReimageAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams): Promise; - beginStart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateOptionalParams): Promise, CloudServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateOptionalParams): Promise, CloudServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateOptionalParams): Promise; get(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesGetOptionalParams): Promise; getInstanceView(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesGetInstanceViewOptionalParams): Promise; @@ -846,7 +846,7 @@ export interface CloudServicesStartOptionalParams extends coreClient.OperationOp // @public export interface CloudServicesUpdateDomain { - beginWalkUpdateDomain(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams): Promise, void>>; + beginWalkUpdateDomain(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams): Promise, void>>; beginWalkUpdateDomainAndWait(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams): Promise; getUpdateDomain(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainGetUpdateDomainOptionalParams): Promise; listUpdateDomains(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams): PagedAsyncIterableIterator; @@ -1370,13 +1370,13 @@ export interface DedicatedHostListResult { // @public export interface DedicatedHosts { - beginCreateOrUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams): Promise, DedicatedHostsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams): Promise, DedicatedHostsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams): Promise; - beginRestart(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsRestartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams): Promise, DedicatedHostsUpdateResponse>>; + beginUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams): Promise, DedicatedHostsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams): Promise; get(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsGetOptionalParams): Promise; listByHostGroup(resourceGroupName: string, hostGroupName: string, options?: DedicatedHostsListByHostGroupOptionalParams): PagedAsyncIterableIterator; @@ -1527,15 +1527,15 @@ export interface DiskAccess extends Resource { // @public export interface DiskAccesses { - beginCreateOrUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams): Promise, DiskAccessesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams): Promise, DiskAccessesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams): Promise; - beginDeleteAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams): Promise, void>>; + beginDeleteAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams): Promise, void>>; beginDeleteAPrivateEndpointConnectionAndWait(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams): Promise; - beginUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams): Promise, DiskAccessesUpdateResponse>>; + beginUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams): Promise, DiskAccessesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams): Promise; - beginUpdateAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams): Promise, DiskAccessesUpdateAPrivateEndpointConnectionResponse>>; + beginUpdateAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams): Promise, DiskAccessesUpdateAPrivateEndpointConnectionResponse>>; beginUpdateAPrivateEndpointConnectionAndWait(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams): Promise; get(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesGetOptionalParams): Promise; getAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesGetAPrivateEndpointConnectionOptionalParams): Promise; @@ -1703,11 +1703,11 @@ export interface DiskEncryptionSetParameters extends SubResource { // @public export interface DiskEncryptionSets { - beginCreateOrUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams): Promise, DiskEncryptionSetsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams): Promise, DiskEncryptionSetsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams): Promise, DiskEncryptionSetsUpdateResponse>>; + beginUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams): Promise, DiskEncryptionSetsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams): Promise; get(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsGetOptionalParams): Promise; list(options?: DiskEncryptionSetsListOptionalParams): PagedAsyncIterableIterator; @@ -1893,9 +1893,9 @@ export type DiskRestorePointListByRestorePointResponse = DiskRestorePointList; // @public export interface DiskRestorePointOperations { - beginGrantAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, grantAccessData: GrantAccessData, options?: DiskRestorePointGrantAccessOptionalParams): Promise, DiskRestorePointGrantAccessResponse>>; + beginGrantAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, grantAccessData: GrantAccessData, options?: DiskRestorePointGrantAccessOptionalParams): Promise, DiskRestorePointGrantAccessResponse>>; beginGrantAccessAndWait(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, grantAccessData: GrantAccessData, options?: DiskRestorePointGrantAccessOptionalParams): Promise; - beginRevokeAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointRevokeAccessOptionalParams): Promise, void>>; beginRevokeAccessAndWait(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointRevokeAccessOptionalParams): Promise; get(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointGetOptionalParams): Promise; listByRestorePoint(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, options?: DiskRestorePointListByRestorePointOptionalParams): PagedAsyncIterableIterator; @@ -1915,15 +1915,15 @@ export interface DiskRestorePointRevokeAccessOptionalParams extends coreClient.O // @public export interface Disks { - beginCreateOrUpdate(resourceGroupName: string, diskName: string, disk: Disk, options?: DisksCreateOrUpdateOptionalParams): Promise, DisksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, diskName: string, disk: Disk, options?: DisksCreateOrUpdateOptionalParams): Promise, DisksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, diskName: string, disk: Disk, options?: DisksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams): Promise; - beginGrantAccess(resourceGroupName: string, diskName: string, grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams): Promise, DisksGrantAccessResponse>>; + beginGrantAccess(resourceGroupName: string, diskName: string, grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams): Promise, DisksGrantAccessResponse>>; beginGrantAccessAndWait(resourceGroupName: string, diskName: string, grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams): Promise; - beginRevokeAccess(resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccess(resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams): Promise, void>>; beginRevokeAccessAndWait(resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams): Promise; - beginUpdate(resourceGroupName: string, diskName: string, disk: DiskUpdate, options?: DisksUpdateOptionalParams): Promise, DisksUpdateResponse>>; + beginUpdate(resourceGroupName: string, diskName: string, disk: DiskUpdate, options?: DisksUpdateOptionalParams): Promise, DisksUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, diskName: string, disk: DiskUpdate, options?: DisksUpdateOptionalParams): Promise; get(resourceGroupName: string, diskName: string, options?: DisksGetOptionalParams): Promise; list(options?: DisksListOptionalParams): PagedAsyncIterableIterator; @@ -2120,11 +2120,11 @@ export interface Extension { // @public export interface Galleries { - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise, GalleriesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise, GalleriesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, galleryName: string, gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams): Promise, GalleriesUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams): Promise, GalleriesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams): Promise; get(resourceGroupName: string, galleryName: string, options?: GalleriesGetOptionalParams): Promise; list(options?: GalleriesListOptionalParams): PagedAsyncIterableIterator; @@ -2241,11 +2241,11 @@ export interface GalleryApplicationList { // @public export interface GalleryApplications { - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams): Promise, GalleryApplicationsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams): Promise, GalleryApplicationsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams): Promise, GalleryApplicationsUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams): Promise, GalleryApplicationsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams): Promise; get(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsGetOptionalParams): Promise; listByGallery(resourceGroupName: string, galleryName: string, options?: GalleryApplicationsListByGalleryOptionalParams): PagedAsyncIterableIterator; @@ -2336,11 +2336,11 @@ export interface GalleryApplicationVersionPublishingProfile extends GalleryArtif // @public export interface GalleryApplicationVersions { - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams): Promise, GalleryApplicationVersionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams): Promise, GalleryApplicationVersionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams): Promise, GalleryApplicationVersionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams): Promise, GalleryApplicationVersionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams): Promise; get(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsGetOptionalParams): Promise; listByGalleryApplication(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams): PagedAsyncIterableIterator; @@ -2512,11 +2512,11 @@ export interface GalleryImageList { // @public export interface GalleryImages { - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise, GalleryImagesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise, GalleryImagesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams): Promise, GalleryImagesUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams): Promise, GalleryImagesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams): Promise; get(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesGetOptionalParams): Promise; listByGallery(resourceGroupName: string, galleryName: string, options?: GalleryImagesListByGalleryOptionalParams): PagedAsyncIterableIterator; @@ -2607,11 +2607,11 @@ export interface GalleryImageVersionPublishingProfile extends GalleryArtifactPub // @public export interface GalleryImageVersions { - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams): Promise, GalleryImageVersionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams): Promise, GalleryImageVersionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams): Promise, GalleryImageVersionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams): Promise, GalleryImageVersionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams): Promise; get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsGetOptionalParams): Promise; listByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImageVersionsListByGalleryImageOptionalParams): PagedAsyncIterableIterator; @@ -2703,7 +2703,7 @@ export type GallerySharingPermissionTypes = string; // @public export interface GallerySharingProfile { - beginUpdate(resourceGroupName: string, galleryName: string, sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams): Promise, GallerySharingProfileUpdateResponse>>; + beginUpdate(resourceGroupName: string, galleryName: string, sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams): Promise, GallerySharingProfileUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, galleryName: string, sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams): Promise; } @@ -2837,11 +2837,11 @@ export interface ImageReference extends SubResource { // @public export interface Images { - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: Image_2, options?: ImagesCreateOrUpdateOptionalParams): Promise, ImagesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: Image_2, options?: ImagesCreateOrUpdateOptionalParams): Promise, ImagesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, imageName: string, parameters: Image_2, options?: ImagesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, imageName: string, parameters: ImageUpdate, options?: ImagesUpdateOptionalParams): Promise, ImagesUpdateResponse>>; + beginUpdate(resourceGroupName: string, imageName: string, parameters: ImageUpdate, options?: ImagesUpdateOptionalParams): Promise, ImagesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, imageName: string, parameters: ImageUpdate, options?: ImagesUpdateOptionalParams): Promise; get(resourceGroupName: string, imageName: string, options?: ImagesGetOptionalParams): Promise; list(options?: ImagesListOptionalParams): PagedAsyncIterableIterator; @@ -3526,6 +3526,7 @@ export enum KnownSnapshotStorageAccountTypes { export enum KnownStorageAccountType { PremiumLRS = "Premium_LRS", StandardLRS = "Standard_LRS", + StandardSSDLRS = "StandardSSD_LRS", StandardZRS = "Standard_ZRS" } @@ -3893,9 +3894,9 @@ export interface LoadBalancerFrontendIpConfigurationProperties { // @public export interface LogAnalytics { - beginExportRequestRateByInterval(location: string, parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams): Promise, LogAnalyticsExportRequestRateByIntervalResponse>>; + beginExportRequestRateByInterval(location: string, parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams): Promise, LogAnalyticsExportRequestRateByIntervalResponse>>; beginExportRequestRateByIntervalAndWait(location: string, parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams): Promise; - beginExportThrottledRequests(location: string, parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams): Promise, LogAnalyticsExportThrottledRequestsResponse>>; + beginExportThrottledRequests(location: string, parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams): Promise, LogAnalyticsExportThrottledRequestsResponse>>; beginExportThrottledRequestsAndWait(location: string, parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams): Promise; } @@ -4636,7 +4637,7 @@ export interface RestorePointCollectionListResult { // @public export interface RestorePointCollections { - beginDelete(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, restorePointCollectionName: string, parameters: RestorePointCollection, options?: RestorePointCollectionsCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsGetOptionalParams): Promise; @@ -4726,9 +4727,9 @@ export interface RestorePointInstanceView { // @public export interface RestorePoints { - beginCreate(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, parameters: RestorePoint, options?: RestorePointsCreateOptionalParams): Promise, RestorePointsCreateResponse>>; + beginCreate(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, parameters: RestorePoint, options?: RestorePointsCreateOptionalParams): Promise, RestorePointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, parameters: RestorePoint, options?: RestorePointsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams): Promise; get(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsGetOptionalParams): Promise; } @@ -5218,15 +5219,15 @@ export interface SnapshotList { // @public export interface Snapshots { - beginCreateOrUpdate(resourceGroupName: string, snapshotName: string, snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams): Promise, SnapshotsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, snapshotName: string, snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams): Promise, SnapshotsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, snapshotName: string, snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise; - beginGrantAccess(resourceGroupName: string, snapshotName: string, grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams): Promise, SnapshotsGrantAccessResponse>>; + beginGrantAccess(resourceGroupName: string, snapshotName: string, grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams): Promise, SnapshotsGrantAccessResponse>>; beginGrantAccessAndWait(resourceGroupName: string, snapshotName: string, grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams): Promise; - beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams): Promise, void>>; beginRevokeAccessAndWait(resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams): Promise; - beginUpdate(resourceGroupName: string, snapshotName: string, snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams): Promise, SnapshotsUpdateResponse>>; + beginUpdate(resourceGroupName: string, snapshotName: string, snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams): Promise, SnapshotsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, snapshotName: string, snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams): Promise; get(resourceGroupName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise; list(options?: SnapshotsListOptionalParams): PagedAsyncIterableIterator; @@ -5823,11 +5824,11 @@ export interface VirtualMachineExtensionInstanceView { // @public export interface VirtualMachineExtensions { - beginCreateOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineExtensionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams): Promise, VirtualMachineExtensionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams): Promise, VirtualMachineExtensionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams): Promise; get(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsGetOptionalParams): Promise; list(resourceGroupName: string, vmName: string, options?: VirtualMachineExtensionsListOptionalParams): Promise; @@ -6195,11 +6196,11 @@ export interface VirtualMachineRunCommandInstanceView { // @public export interface VirtualMachineRunCommands { - beginCreateOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineRunCommandsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams): Promise, VirtualMachineRunCommandsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams): Promise, VirtualMachineRunCommandsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams): Promise; get(location: string, commandId: string, options?: VirtualMachineRunCommandsGetOptionalParams): Promise; getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsGetByVirtualMachineOptionalParams): Promise; @@ -6305,37 +6306,37 @@ export interface VirtualMachineRunCommandUpdate extends UpdateResource { // @public export interface VirtualMachines { - beginAssessPatches(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise, VirtualMachinesAssessPatchesResponse>>; + beginAssessPatches(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise, VirtualMachinesAssessPatchesResponse>>; beginAssessPatchesAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise; - beginCapture(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise, VirtualMachinesCaptureResponse>>; + beginCapture(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise, VirtualMachinesCaptureResponse>>; beginCaptureAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise, void>>; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise, void>>; beginConvertToManagedDisksAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise, VirtualMachinesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise, VirtualMachinesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise; - beginDeallocate(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise, void>>; + beginDeallocate(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise, void>>; beginDeallocateAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; - beginInstallPatches(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise, VirtualMachinesInstallPatchesResponse>>; + beginInstallPatches(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise, VirtualMachinesInstallPatchesResponse>>; beginInstallPatchesAndWait(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise; - beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise, void>>; beginPerformMaintenanceAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise, void>>; + beginPowerOff(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise, void>>; beginPowerOffAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise; - beginReapply(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise, void>>; + beginReapply(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise, void>>; beginReapplyAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise; - beginRedeploy(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise, void>>; + beginRedeploy(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise, void>>; beginRedeployAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise; - beginReimage(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise, void>>; + beginReimage(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise, void>>; beginReimageAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise, VirtualMachinesRunCommandResponse>>; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise, VirtualMachinesRunCommandResponse>>; beginRunCommandAndWait(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise; - beginStart(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise; generalize(resourceGroupName: string, vmName: string, options?: VirtualMachinesGeneralizeOptionalParams): Promise; get(resourceGroupName: string, vmName: string, options?: VirtualMachinesGetOptionalParams): Promise; @@ -6431,11 +6432,11 @@ export interface VirtualMachineScaleSetExtensionProfile { // @public export interface VirtualMachineScaleSetExtensions { - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams): Promise; get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsGetOptionalParams): Promise; list(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetExtensionsListOptionalParams): PagedAsyncIterableIterator; @@ -6534,7 +6535,7 @@ export interface VirtualMachineScaleSetInstanceViewStatusesSummary { } // @public -export interface VirtualMachineScaleSetIPConfiguration extends SubResource { +export interface VirtualMachineScaleSetIPConfiguration { applicationGatewayBackendAddressPools?: SubResource[]; applicationSecurityGroups?: SubResource[]; loadBalancerBackendAddressPools?: SubResource[]; @@ -6584,7 +6585,7 @@ export interface VirtualMachineScaleSetManagedDiskParameters { } // @public -export interface VirtualMachineScaleSetNetworkConfiguration extends SubResource { +export interface VirtualMachineScaleSetNetworkConfiguration { deleteOption?: DeleteOptions; disableTcpStateTracking?: boolean; dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; @@ -6661,11 +6662,11 @@ export interface VirtualMachineScaleSetReimageParameters extends VirtualMachineS // @public export interface VirtualMachineScaleSetRollingUpgrades { - beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams): Promise, void>>; + beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams): Promise, void>>; beginCancelAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams): Promise; - beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams): Promise, void>>; + beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams): Promise, void>>; beginStartExtensionUpgradeAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams): Promise; - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams): Promise, void>>; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams): Promise, void>>; beginStartOSUpgradeAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams): Promise; getLatest(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams): Promise; } @@ -6697,33 +6698,33 @@ export interface VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalPara // @public export interface VirtualMachineScaleSets { - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams): Promise; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams): Promise, void>>; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams): Promise, void>>; beginDeallocateAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams): Promise; - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams): Promise, void>>; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams): Promise, void>>; beginDeleteInstancesAndWait(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise, void>>; beginPerformMaintenanceAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams): Promise, void>>; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams): Promise, void>>; beginPowerOffAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams): Promise, void>>; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams): Promise, void>>; beginRedeployAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams): Promise, void>>; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams): Promise, void>>; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams): Promise, void>>; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams): Promise, void>>; beginReimageAllAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams): Promise; beginReimageAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams): Promise; - beginSetOrchestrationServiceState(resourceGroupName: string, vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams): Promise, void>>; + beginSetOrchestrationServiceState(resourceGroupName: string, vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams): Promise, void>>; beginSetOrchestrationServiceStateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams): Promise, VirtualMachineScaleSetsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams): Promise, VirtualMachineScaleSetsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams): Promise; - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams): Promise, void>>; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams): Promise, void>>; beginUpdateInstancesAndWait(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams): Promise; convertToSinglePlacementGroup(resourceGroupName: string, vmScaleSetName: string, parameters: VMScaleSetConvertToSinglePlacementGroupInput, options?: VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams): Promise; forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, options?: VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams): Promise; @@ -7114,11 +7115,11 @@ export interface VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { // @public export interface VirtualMachineScaleSetVMExtensions { - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams): Promise; get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsGetOptionalParams): Promise; list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMExtensionsListOptionalParams): Promise; @@ -7205,9 +7206,13 @@ export interface VirtualMachineScaleSetVMInstanceRequiredIDs { export interface VirtualMachineScaleSetVMInstanceView { readonly assignedHost?: string; bootDiagnostics?: BootDiagnosticsInstanceView; + computerName?: string; disks?: DiskInstanceView[]; extensions?: VirtualMachineExtensionInstanceView[]; + hyperVGeneration?: HyperVGeneration; maintenanceRedeployStatus?: MaintenanceRedeployStatus; + osName?: string; + osVersion?: string; placementGroupId?: string; platformFaultDomain?: number; platformUpdateDomain?: number; @@ -7260,11 +7265,11 @@ export interface VirtualMachineScaleSetVMReimageParameters extends VirtualMachin // @public export interface VirtualMachineScaleSetVMRunCommands { - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams): Promise; get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsGetOptionalParams): Promise; list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams): PagedAsyncIterableIterator; @@ -7319,27 +7324,27 @@ export type VirtualMachineScaleSetVMRunCommandsUpdateResponse = VirtualMachineRu // @public export interface VirtualMachineScaleSetVMs { - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams): Promise, void>>; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams): Promise, void>>; beginDeallocateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams): Promise, void>>; beginPerformMaintenanceAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise, void>>; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise, void>>; beginPowerOffAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams): Promise, void>>; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams): Promise, void>>; beginRedeployAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams): Promise, void>>; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams): Promise, void>>; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams): Promise, void>>; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams): Promise, void>>; beginReimageAllAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams): Promise; beginReimageAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams): Promise; - beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams): Promise, VirtualMachineScaleSetVMsRunCommandResponse>>; + beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams): Promise, VirtualMachineScaleSetVMsRunCommandResponse>>; beginRunCommandAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMsUpdateResponse>>; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams): Promise; get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsGetOptionalParams): Promise; getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsGetInstanceViewOptionalParams): Promise; diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 17bdc7369edb..16f9824fb23b 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -145,7 +145,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-compute/20.0.1`; + const packageDetails = `azsdk-js-arm-compute/20.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/compute/arm-compute/src/lroImpl.ts b/sdk/compute/arm-compute/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/compute/arm-compute/src/lroImpl.ts +++ b/sdk/compute/arm-compute/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/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index 02d8d385ea82..69766bd09d32 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -513,12 +513,58 @@ export interface ApiEntityReference { id?: string; } +/** Describes a virtual machine scale set network profile's network configurations. */ +export interface VirtualMachineScaleSetNetworkConfiguration { + /** The network configuration name. */ + name: string; + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies whether the network interface is disabled for tcp state tracking. */ + disableTcpStateTracking?: boolean; + /** Specifies whether the network interface is FPGA networking-enabled. */ + enableFpga?: boolean; + /** The network security group. */ + networkSecurityGroup?: SubResource; + /** The dns settings to be applied on the network interfaces. */ + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + /** Specifies the IP configurations of the network interface. */ + ipConfigurations?: VirtualMachineScaleSetIPConfiguration[]; + /** Whether IP forwarding enabled on this NIC. */ + enableIPForwarding?: boolean; + /** Specify what happens to the network interface when the VM is deleted */ + deleteOption?: DeleteOptions; +} + /** Describes a virtual machines scale sets network configuration's DNS settings. */ export interface VirtualMachineScaleSetNetworkConfigurationDnsSettings { /** List of DNS servers IP addresses */ dnsServers?: string[]; } +/** Describes a virtual machine scale set network profile's IP configuration. */ +export interface VirtualMachineScaleSetIPConfiguration { + /** The IP configuration name. */ + name: string; + /** Specifies the identifier of the subnet. */ + subnet?: ApiEntityReference; + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** The publicIPAddressConfiguration. */ + publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; + /** Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ + privateIPAddressVersion?: IPVersion; + /** Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. */ + applicationGatewayBackendAddressPools?: SubResource[]; + /** Specifies an array of references to application security group. */ + applicationSecurityGroups?: SubResource[]; + /** Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ + loadBalancerBackendAddressPools?: SubResource[]; + /** Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ + loadBalancerInboundNatPools?: SubResource[]; +} + /** Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ export interface VirtualMachineScaleSetPublicIPAddressConfiguration { /** The publicIP address configuration name. */ @@ -638,7 +684,7 @@ export interface TerminateNotificationProfile { } export interface OSImageNotificationProfile { - /** Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, with the value set to 15 minutes (PT15M) */ + /** Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M) */ notBeforeTimeout?: string; /** Specifies whether the OS Image Scheduled event is enabled or disabled. */ enable?: boolean; @@ -1294,6 +1340,14 @@ export interface VirtualMachineScaleSetVMInstanceView { readonly assignedHost?: string; /** The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. */ placementGroupId?: string; + /** Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

**Max-length (Windows):** 15 characters

**Max-length (Linux):** 64 characters.

For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). */ + computerName?: string; + /** The Operating System running on the hybrid machine. */ + osName?: string; + /** The version of Operating System running on the hybrid machine. */ + osVersion?: string; + /** The hypervisor generation of the Virtual Machine [V1, V2] */ + hyperVGeneration?: HyperVGeneration; } /** The instance view of the VM Agent running on the virtual machine. */ @@ -3299,7 +3353,7 @@ export interface GalleryIdentifier { /** Profile for gallery sharing to subscription or tenant */ export interface SharingProfile { - /** This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community** */ + /** This property allows you to specify the permission of sharing gallery. Possible values are: **Private,** **Groups,** **Community** */ permissions?: GallerySharingPermissionTypes; /** * A list of sharing profile groups. @@ -3312,7 +3366,7 @@ export interface SharingProfile { /** Group of the gallery sharing profile */ export interface SharingProfileGroup { - /** This property allows you to specify the type of sharing group.

Possible values are:

**Subscriptions**

**AADTenants** */ + /** This property allows you to specify the type of sharing group. Possible values are: **Subscriptions,** **AADTenants** */ type?: SharingProfileGroupTypes; /** A list of subscription/tenant ids the gallery is aimed to be shared to. */ ids?: string[]; @@ -3694,7 +3748,7 @@ export interface GalleryApplicationVersionList { /** Specifies information about the gallery sharing profile update. */ export interface SharingUpdate { - /** This property allows you to specify the operation type of gallery sharing update.

Possible values are:

**Add**

**Remove**

**Reset** */ + /** This property allows you to specify the operation type of gallery sharing update. Possible values are: **Add,** **Remove,** **Reset** */ operationType: SharingUpdateOperationTypes; /** A list of sharing profile groups. */ groups?: SharingProfileGroup[]; @@ -4469,53 +4523,6 @@ export interface ImageReference extends SubResource { /** Describes the parameter of customer managed disk encryption set resource id that can be specified for disk.

NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. */ export interface DiskEncryptionSetParameters extends SubResource {} -/** Describes a virtual machine scale set network profile's IP configuration. */ -export interface VirtualMachineScaleSetIPConfiguration extends SubResource { - /** The IP configuration name. */ - name: string; - /** Specifies the identifier of the subnet. */ - subnet?: ApiEntityReference; - /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ - primary?: boolean; - /** The publicIPAddressConfiguration. */ - publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; - /** Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ - privateIPAddressVersion?: IPVersion; - /** Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. */ - applicationGatewayBackendAddressPools?: SubResource[]; - /** Specifies an array of references to application security group. */ - applicationSecurityGroups?: SubResource[]; - /** Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ - loadBalancerBackendAddressPools?: SubResource[]; - /** Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ - loadBalancerInboundNatPools?: SubResource[]; -} - -/** Describes a virtual machine scale set network profile's network configurations. */ -export interface VirtualMachineScaleSetNetworkConfiguration - extends SubResource { - /** The network configuration name. */ - name: string; - /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ - primary?: boolean; - /** Specifies whether the network interface is accelerated networking-enabled. */ - enableAcceleratedNetworking?: boolean; - /** Specifies whether the network interface is disabled for tcp state tracking. */ - disableTcpStateTracking?: boolean; - /** Specifies whether the network interface is FPGA networking-enabled. */ - enableFpga?: boolean; - /** The network security group. */ - networkSecurityGroup?: SubResource; - /** The dns settings to be applied on the network interfaces. */ - dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - /** Specifies the IP configurations of the network interface. */ - ipConfigurations?: VirtualMachineScaleSetIPConfiguration[]; - /** Whether IP forwarding enabled on this NIC. */ - enableIPForwarding?: boolean; - /** Specify what happens to the network interface when the VM is deleted */ - deleteOption?: DeleteOptions; -} - /** Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network */ export interface VirtualMachineScaleSetUpdateIPConfiguration extends SubResource { @@ -5556,7 +5563,7 @@ export interface GalleryImage extends Resource { privacyStatementUri?: string; /** The release note uri. */ releaseNoteUri?: string; - /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux** */ osType?: OperatingSystemTypes; /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ osState?: OperatingSystemStateTypes; @@ -5615,7 +5622,7 @@ export interface GalleryApplication extends Resource { releaseNoteUri?: string; /** The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. */ endOfLifeDate?: Date; - /** This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the supported type of the OS that application is built for. Possible values are: **Windows,** **Linux** */ supportedOSType?: OperatingSystemTypes; /** A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. */ customActions?: GalleryApplicationCustomAction[]; @@ -6190,7 +6197,7 @@ export interface GalleryImageUpdate extends UpdateResourceDefinition { privacyStatementUri?: string; /** The release note uri. */ releaseNoteUri?: string; - /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux** */ osType?: OperatingSystemTypes; /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ osState?: OperatingSystemStateTypes; @@ -6249,7 +6256,7 @@ export interface GalleryApplicationUpdate extends UpdateResourceDefinition { releaseNoteUri?: string; /** The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. */ endOfLifeDate?: Date; - /** This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the supported type of the OS that application is built for. Possible values are: **Windows,** **Linux** */ supportedOSType?: OperatingSystemTypes; /** A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. */ customActions?: GalleryApplicationCustomAction[]; @@ -6369,7 +6376,7 @@ export interface CommunityGallery extends PirCommunityGalleryResource {} /** Specifies information about the gallery image definition that you want to create or update. */ export interface CommunityGalleryImage extends PirCommunityGalleryResource { - /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. The possible values are: **Windows,** **Linux** */ osType?: OperatingSystemTypes; /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ osState?: OperatingSystemStateTypes; @@ -6440,7 +6447,7 @@ export interface SharedGallery extends PirSharedGalleryResource {} /** Specifies information about the gallery image definition that you want to create or update. */ export interface SharedGalleryImage extends PirSharedGalleryResource { - /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux** */ osType?: OperatingSystemTypes; /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ osState?: OperatingSystemStateTypes; @@ -7015,6 +7022,24 @@ export enum KnownOrchestrationServiceStateAction { */ export type OrchestrationServiceStateAction = string; +/** Known values of {@link HyperVGeneration} that the service accepts. */ +export enum KnownHyperVGeneration { + /** V1 */ + V1 = "V1", + /** V2 */ + V2 = "V2" +} + +/** + * Defines values for HyperVGeneration. \ + * {@link KnownHyperVGeneration} can be used interchangeably with HyperVGeneration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **V1** \ + * **V2** + */ +export type HyperVGeneration = string; + /** Known values of {@link VirtualMachineSizeTypes} that the service accepts. */ export enum KnownVirtualMachineSizeTypes { /** BasicA0 */ @@ -8089,13 +8114,13 @@ export enum KnownDiskStorageAccountTypes { StandardLRS = "Standard_LRS", /** Premium SSD locally redundant storage. Best for production and performance sensitive workloads. */ PremiumLRS = "Premium_LRS", - /** Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test. */ + /** Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. */ StandardSSDLRS = "StandardSSD_LRS", /** Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. */ UltraSSDLRS = "UltraSSD_LRS", /** Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures. */ PremiumZRS = "Premium_ZRS", - /** Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. */ + /** Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev\/test that need storage resiliency against zone failures. */ StandardSSDZRS = "StandardSSD_ZRS", /** Premium SSD v2 locally redundant storage. Best for production and performance-sensitive workloads that consistently require low latency and high IOPS and throughput. */ PremiumV2LRS = "PremiumV2_LRS" @@ -8116,24 +8141,6 @@ export enum KnownDiskStorageAccountTypes { */ export type DiskStorageAccountTypes = string; -/** Known values of {@link HyperVGeneration} that the service accepts. */ -export enum KnownHyperVGeneration { - /** V1 */ - V1 = "V1", - /** V2 */ - V2 = "V2" -} - -/** - * Defines values for HyperVGeneration. \ - * {@link KnownHyperVGeneration} can be used interchangeably with HyperVGeneration, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **V1** \ - * **V2** - */ -export type HyperVGeneration = string; - /** Known values of {@link Architecture} that the service accepts. */ export enum KnownArchitecture { /** X64 */ @@ -8316,9 +8323,9 @@ export type PublicNetworkAccess = string; /** Known values of {@link DataAccessAuthMode} that the service accepts. */ export enum KnownDataAccessAuthMode { - /** When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth. */ + /** When export\/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export\/upload the data. Please refer to aka.ms\/DisksAzureADAuth. */ AzureActiveDirectory = "AzureActiveDirectory", - /** No additional authentication would be performed when accessing export/upload URL. */ + /** No additional authentication would be performed when accessing export\/upload URL. */ None = "None" } @@ -8624,7 +8631,9 @@ export enum KnownStorageAccountType { /** StandardZRS */ StandardZRS = "Standard_ZRS", /** PremiumLRS */ - PremiumLRS = "Premium_LRS" + PremiumLRS = "Premium_LRS", + /** StandardSSDLRS */ + StandardSSDLRS = "StandardSSD_LRS" } /** @@ -8634,7 +8643,8 @@ export enum KnownStorageAccountType { * ### Known values supported by the service * **Standard_LRS** \ * **Standard_ZRS** \ - * **Premium_LRS** + * **Premium_LRS** \ + * **StandardSSD_LRS** */ export type StorageAccountType = string; diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index d52741bcda2e..4f5232ff759e 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -1488,6 +1488,84 @@ export const ApiEntityReference: coreClient.CompositeMapper = { } }; +export const VirtualMachineScaleSetNetworkConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfiguration", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + primary: { + serializedName: "properties.primary", + type: { + name: "Boolean" + } + }, + enableAcceleratedNetworking: { + serializedName: "properties.enableAcceleratedNetworking", + type: { + name: "Boolean" + } + }, + disableTcpStateTracking: { + serializedName: "properties.disableTcpStateTracking", + type: { + name: "Boolean" + } + }, + enableFpga: { + serializedName: "properties.enableFpga", + type: { + name: "Boolean" + } + }, + networkSecurityGroup: { + serializedName: "properties.networkSecurityGroup", + type: { + name: "Composite", + className: "SubResource" + } + }, + dnsSettings: { + serializedName: "properties.dnsSettings", + type: { + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" + } + }, + ipConfigurations: { + serializedName: "properties.ipConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetIPConfiguration" + } + } + } + }, + enableIPForwarding: { + serializedName: "properties.enableIPForwarding", + type: { + name: "Boolean" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", + type: { + name: "String" + } + } + } + } +}; + export const VirtualMachineScaleSetNetworkConfigurationDnsSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1508,6 +1586,96 @@ export const VirtualMachineScaleSetNetworkConfigurationDnsSettings: coreClient.C } }; +export const VirtualMachineScaleSetIPConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetIPConfiguration", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + subnet: { + serializedName: "properties.subnet", + type: { + name: "Composite", + className: "ApiEntityReference" + } + }, + primary: { + serializedName: "properties.primary", + type: { + name: "Boolean" + } + }, + publicIPAddressConfiguration: { + serializedName: "properties.publicIPAddressConfiguration", + type: { + name: "Composite", + className: "VirtualMachineScaleSetPublicIPAddressConfiguration" + } + }, + privateIPAddressVersion: { + serializedName: "properties.privateIPAddressVersion", + type: { + name: "String" + } + }, + applicationGatewayBackendAddressPools: { + serializedName: "properties.applicationGatewayBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + applicationSecurityGroups: { + serializedName: "properties.applicationSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + loadBalancerBackendAddressPools: { + serializedName: "properties.loadBalancerBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + loadBalancerInboundNatPools: { + serializedName: "properties.loadBalancerInboundNatPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + } + } + } +}; + export const VirtualMachineScaleSetPublicIPAddressConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3461,6 +3629,30 @@ export const VirtualMachineScaleSetVMInstanceView: coreClient.CompositeMapper = type: { name: "String" } + }, + computerName: { + serializedName: "computerName", + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + type: { + name: "String" + } + }, + osVersion: { + serializedName: "osVersion", + type: { + name: "String" + } + }, + hyperVGeneration: { + serializedName: "hyperVGeneration", + type: { + name: "String" + } } } } @@ -11474,176 +11666,6 @@ export const DiskEncryptionSetParameters: coreClient.CompositeMapper = { } }; -export const VirtualMachineScaleSetIPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetIPConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "ApiEntityReference" - } - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", - type: { - name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfiguration" - } - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", - type: { - name: "String" - } - }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - }, - loadBalancerInboundNatPools: { - serializedName: "properties.loadBalancerInboundNatPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - } - } - } -}; - -export const VirtualMachineScaleSetNetworkConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkConfiguration", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", - type: { - name: "Boolean" - } - }, - disableTcpStateTracking: { - serializedName: "properties.disableTcpStateTracking", - type: { - name: "Boolean" - } - }, - enableFpga: { - serializedName: "properties.enableFpga", - type: { - name: "Boolean" - } - }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", - type: { - name: "Composite", - className: "SubResource" - } - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" - } - }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetIPConfiguration" - } - } - } - }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", - type: { - name: "Boolean" - } - }, - deleteOption: { - serializedName: "properties.deleteOption", - type: { - name: "String" - } - } - } - } -}; - export const VirtualMachineScaleSetUpdateIPConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/compute/arm-compute/src/operations/capacityReservations.ts b/sdk/compute/arm-compute/src/operations/capacityReservations.ts index afa2242d0a9c..7e78e4b38535 100644 --- a/sdk/compute/arm-compute/src/operations/capacityReservations.ts +++ b/sdk/compute/arm-compute/src/operations/capacityReservations.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { CapacityReservation, CapacityReservationsListByCapacityReservationGroupNextOptionalParams, @@ -146,8 +150,8 @@ export class CapacityReservationsImpl implements CapacityReservations { parameters: CapacityReservation, options?: CapacityReservationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CapacityReservationsCreateOrUpdateResponse > > { @@ -157,7 +161,7 @@ export class CapacityReservationsImpl implements CapacityReservations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -190,19 +194,22 @@ export class CapacityReservationsImpl implements CapacityReservations { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CapacityReservationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -251,8 +258,8 @@ export class CapacityReservationsImpl implements CapacityReservations { parameters: CapacityReservationUpdate, options?: CapacityReservationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CapacityReservationsUpdateResponse > > { @@ -262,7 +269,7 @@ export class CapacityReservationsImpl implements CapacityReservations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,19 +302,22 @@ export class CapacityReservationsImpl implements CapacityReservations { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CapacityReservationsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -353,14 +363,14 @@ export class CapacityReservationsImpl implements CapacityReservations { capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsDeleteOptionalParams - ): 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 ) => { @@ -393,18 +403,18 @@ export class CapacityReservationsImpl implements CapacityReservations { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, capacityReservationGroupName, capacityReservationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts index 549c445a23ff..1077b7c26008 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { RoleInstance, CloudServiceRoleInstancesListNextOptionalParams, @@ -140,14 +144,14 @@ export class CloudServiceRoleInstancesImpl resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams - ): 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 ) => { @@ -180,13 +184,13 @@ export class CloudServiceRoleInstancesImpl }; }; - const lro = new LroImpl( - sendOperation, - { roleInstanceName, resourceGroupName, cloudServiceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { roleInstanceName, resourceGroupName, cloudServiceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -284,14 +288,14 @@ export class CloudServiceRoleInstancesImpl resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams - ): 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 ) => { @@ -324,13 +328,13 @@ export class CloudServiceRoleInstancesImpl }; }; - const lro = new LroImpl( - sendOperation, - { roleInstanceName, resourceGroupName, cloudServiceName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { roleInstanceName, resourceGroupName, cloudServiceName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -373,14 +377,14 @@ export class CloudServiceRoleInstancesImpl resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams - ): 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 ) => { @@ -413,13 +417,13 @@ export class CloudServiceRoleInstancesImpl }; }; - const lro = new LroImpl( - sendOperation, - { roleInstanceName, resourceGroupName, cloudServiceName, options }, - reimageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { roleInstanceName, resourceGroupName, cloudServiceName, options }, + spec: reimageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -463,14 +467,14 @@ export class CloudServiceRoleInstancesImpl resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams - ): 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 ) => { @@ -503,13 +507,13 @@ export class CloudServiceRoleInstancesImpl }; }; - const lro = new LroImpl( - sendOperation, - { roleInstanceName, resourceGroupName, cloudServiceName, options }, - rebuildOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { roleInstanceName, resourceGroupName, cloudServiceName, options }, + spec: rebuildOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/cloudServices.ts b/sdk/compute/arm-compute/src/operations/cloudServices.ts index 4226077df7e7..dc2c2161ca3f 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServices.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServices.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { CloudService, CloudServicesListAllNextOptionalParams, @@ -186,8 +190,8 @@ export class CloudServicesImpl implements CloudServices { cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudServicesCreateOrUpdateResponse > > { @@ -197,7 +201,7 @@ export class CloudServicesImpl implements CloudServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -230,13 +234,16 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CloudServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -274,8 +281,8 @@ export class CloudServicesImpl implements CloudServices { cloudServiceName: string, options?: CloudServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudServicesUpdateResponse > > { @@ -285,7 +292,7 @@ export class CloudServicesImpl implements CloudServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -318,13 +325,16 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CloudServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -360,14 +370,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams - ): 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 ) => { @@ -400,13 +410,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -504,14 +514,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams - ): 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 ) => { @@ -544,13 +554,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -587,14 +597,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams - ): 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 ) => { @@ -627,13 +637,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - powerOffOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: powerOffOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -670,14 +680,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams - ): 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 ) => { @@ -710,13 +720,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -753,14 +763,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams - ): 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 ) => { @@ -793,13 +803,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - reimageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: reimageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -838,14 +848,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams - ): 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 ) => { @@ -878,13 +888,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - rebuildOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: rebuildOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -922,14 +932,14 @@ export class CloudServicesImpl implements CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams - ): 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 ) => { @@ -962,13 +972,13 @@ export class CloudServicesImpl implements CloudServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, options }, - deleteInstancesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, options }, + spec: deleteInstancesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts b/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts index d1600cd5868f..7087b18820fd 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { UpdateDomain, CloudServicesUpdateDomainListUpdateDomainsNextOptionalParams, @@ -138,14 +142,14 @@ export class CloudServicesUpdateDomainImpl cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams - ): 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 ) => { @@ -178,13 +182,13 @@ export class CloudServicesUpdateDomainImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudServiceName, updateDomain, options }, - walkUpdateDomainOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudServiceName, updateDomain, options }, + spec: walkUpdateDomainOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts b/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts index f442a3bf83ab..00373018891f 100644 --- a/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts +++ b/sdk/compute/arm-compute/src/operations/dedicatedHosts.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { DedicatedHost, DedicatedHostsListByHostGroupNextOptionalParams, @@ -145,8 +149,8 @@ export class DedicatedHostsImpl implements DedicatedHosts { parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsCreateOrUpdateResponse > > { @@ -156,7 +160,7 @@ export class DedicatedHostsImpl implements DedicatedHosts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -189,13 +193,16 @@ export class DedicatedHostsImpl implements DedicatedHosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostGroupName, hostName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostGroupName, hostName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DedicatedHostsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -242,8 +249,8 @@ export class DedicatedHostsImpl implements DedicatedHosts { parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsUpdateResponse > > { @@ -253,7 +260,7 @@ export class DedicatedHostsImpl implements DedicatedHosts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -286,13 +293,16 @@ export class DedicatedHostsImpl implements DedicatedHosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostGroupName, hostName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostGroupName, hostName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DedicatedHostsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -336,14 +346,14 @@ export class DedicatedHostsImpl implements DedicatedHosts { hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams - ): 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 ) => { @@ -376,13 +386,13 @@ export class DedicatedHostsImpl implements DedicatedHosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostGroupName, hostName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostGroupName, hostName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -463,14 +473,14 @@ export class DedicatedHostsImpl implements DedicatedHosts { hostGroupName: string, hostName: string, options?: DedicatedHostsRestartOptionalParams - ): 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 ) => { @@ -503,13 +513,13 @@ export class DedicatedHostsImpl implements DedicatedHosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostGroupName, hostName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostGroupName, hostName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/diskAccesses.ts b/sdk/compute/arm-compute/src/operations/diskAccesses.ts index a2ffbb53c0d5..4054a2fff630 100644 --- a/sdk/compute/arm-compute/src/operations/diskAccesses.ts +++ b/sdk/compute/arm-compute/src/operations/diskAccesses.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { DiskAccess, DiskAccessesListByResourceGroupNextOptionalParams, @@ -284,8 +288,8 @@ export class DiskAccessesImpl implements DiskAccesses { diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesCreateOrUpdateResponse > > { @@ -295,7 +299,7 @@ export class DiskAccessesImpl implements DiskAccesses { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -328,13 +332,16 @@ export class DiskAccessesImpl implements DiskAccesses { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskAccessName, diskAccess, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskAccessName, diskAccess, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DiskAccessesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -380,8 +387,8 @@ export class DiskAccessesImpl implements DiskAccesses { diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesUpdateResponse > > { @@ -391,7 +398,7 @@ export class DiskAccessesImpl implements DiskAccesses { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -424,13 +431,16 @@ export class DiskAccessesImpl implements DiskAccesses { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskAccessName, diskAccess, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskAccessName, diskAccess, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DiskAccessesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -492,14 +502,14 @@ export class DiskAccessesImpl implements DiskAccesses { resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams - ): 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 ) => { @@ -532,13 +542,13 @@ export class DiskAccessesImpl implements DiskAccesses { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskAccessName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskAccessName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -629,8 +639,8 @@ export class DiskAccessesImpl implements DiskAccesses { privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesUpdateAPrivateEndpointConnectionResponse > > { @@ -640,7 +650,7 @@ export class DiskAccessesImpl implements DiskAccesses { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -673,19 +683,22 @@ export class DiskAccessesImpl implements DiskAccesses { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options }, - updateAPrivateEndpointConnectionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateAPrivateEndpointConnectionOperationSpec + }); + const poller = await createHttpPoller< + DiskAccessesUpdateAPrivateEndpointConnectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -761,14 +774,14 @@ export class DiskAccessesImpl implements DiskAccesses { diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams - ): 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 ) => { @@ -801,18 +814,18 @@ export class DiskAccessesImpl implements DiskAccesses { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskAccessName, privateEndpointConnectionName, options }, - deleteAPrivateEndpointConnectionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteAPrivateEndpointConnectionOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts b/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts index f5bdccc130f7..2997217ee8aa 100644 --- a/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts +++ b/sdk/compute/arm-compute/src/operations/diskEncryptionSets.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { DiskEncryptionSet, DiskEncryptionSetsListByResourceGroupNextOptionalParams, @@ -277,8 +281,8 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskEncryptionSetsCreateOrUpdateResponse > > { @@ -288,7 +292,7 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -321,13 +325,21 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + diskEncryptionSetName, + diskEncryptionSet, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DiskEncryptionSetsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -375,8 +387,8 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskEncryptionSetsUpdateResponse > > { @@ -386,7 +398,7 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -419,13 +431,21 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + diskEncryptionSetName, + diskEncryptionSet, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DiskEncryptionSetsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,14 +508,14 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams - ): 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 ) => { @@ -528,13 +548,13 @@ export class DiskEncryptionSetsImpl implements DiskEncryptionSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskEncryptionSetName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskEncryptionSetName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts b/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts index 0e823530506c..c95df45e6735 100644 --- a/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts +++ b/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { DiskRestorePoint, DiskRestorePointListByRestorePointNextOptionalParams, @@ -208,8 +212,8 @@ export class DiskRestorePointOperationsImpl grantAccessData: GrantAccessData, options?: DiskRestorePointGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskRestorePointGrantAccessResponse > > { @@ -219,7 +223,7 @@ export class DiskRestorePointOperationsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -252,9 +256,9 @@ export class DiskRestorePointOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, restorePointCollectionName, vmRestorePointName, @@ -262,12 +266,15 @@ export class DiskRestorePointOperationsImpl grantAccessData, options }, - grantAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: grantAccessOperationSpec + }); + const poller = await createHttpPoller< + DiskRestorePointGrantAccessResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -317,14 +324,14 @@ export class DiskRestorePointOperationsImpl vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointRevokeAccessOptionalParams - ): 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 ) => { @@ -357,21 +364,21 @@ export class DiskRestorePointOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, options }, - revokeAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: revokeAccessOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operations/disks.ts b/sdk/compute/arm-compute/src/operations/disks.ts index c638e18f33f3..0ae26f9967c1 100644 --- a/sdk/compute/arm-compute/src/operations/disks.ts +++ b/sdk/compute/arm-compute/src/operations/disks.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { Disk, DisksListByResourceGroupNextOptionalParams, @@ -190,8 +194,8 @@ export class DisksImpl implements Disks { disk: Disk, options?: DisksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DisksCreateOrUpdateResponse > > { @@ -201,7 +205,7 @@ export class DisksImpl implements Disks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -234,13 +238,16 @@ export class DisksImpl implements Disks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskName, disk, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskName, disk, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DisksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -286,7 +293,7 @@ export class DisksImpl implements Disks { disk: DiskUpdate, options?: DisksUpdateOptionalParams ): Promise< - PollerLike, DisksUpdateResponse> + SimplePollerLike, DisksUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -294,7 +301,7 @@ export class DisksImpl implements Disks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -327,13 +334,16 @@ export class DisksImpl implements Disks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskName, disk, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskName, disk, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DisksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -395,14 +405,14 @@ export class DisksImpl implements Disks { resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams - ): 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,13 +445,13 @@ export class DisksImpl implements Disks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -503,8 +513,8 @@ export class DisksImpl implements Disks { grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DisksGrantAccessResponse > > { @@ -514,7 +524,7 @@ export class DisksImpl implements Disks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -547,15 +557,18 @@ export class DisksImpl implements Disks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskName, grantAccessData, options }, - grantAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskName, grantAccessData, options }, + spec: grantAccessOperationSpec + }); + const poller = await createHttpPoller< + DisksGrantAccessResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -597,14 +610,14 @@ export class DisksImpl implements Disks { resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams - ): 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 ) => { @@ -637,15 +650,15 @@ export class DisksImpl implements Disks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, diskName, options }, - revokeAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, diskName, options }, + spec: revokeAccessOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operations/galleries.ts b/sdk/compute/arm-compute/src/operations/galleries.ts index f61ec96453e2..980a152f34fa 100644 --- a/sdk/compute/arm-compute/src/operations/galleries.ts +++ b/sdk/compute/arm-compute/src/operations/galleries.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { Gallery, GalleriesListByResourceGroupNextOptionalParams, @@ -185,8 +189,8 @@ export class GalleriesImpl implements Galleries { gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesCreateOrUpdateResponse > > { @@ -196,7 +200,7 @@ export class GalleriesImpl implements Galleries { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -229,13 +233,16 @@ export class GalleriesImpl implements Galleries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, gallery, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, gallery, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleriesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -279,8 +286,8 @@ export class GalleriesImpl implements Galleries { gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesUpdateResponse > > { @@ -290,7 +297,7 @@ export class GalleriesImpl implements Galleries { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -323,13 +330,16 @@ export class GalleriesImpl implements Galleries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, gallery, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, gallery, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleriesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -386,14 +396,14 @@ export class GalleriesImpl implements Galleries { resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams - ): 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 ) => { @@ -426,13 +436,13 @@ export class GalleriesImpl implements Galleries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts b/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts index 9f77fc30bddb..7fa4a13062be 100644 --- a/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts +++ b/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { GalleryApplicationVersion, GalleryApplicationVersionsListByGalleryApplicationNextOptionalParams, @@ -162,8 +166,8 @@ export class GalleryApplicationVersionsImpl galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationVersionsCreateOrUpdateResponse > > { @@ -173,7 +177,7 @@ export class GalleryApplicationVersionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -206,9 +210,9 @@ export class GalleryApplicationVersionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, @@ -216,10 +220,13 @@ export class GalleryApplicationVersionsImpl galleryApplicationVersion, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleryApplicationVersionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -281,8 +288,8 @@ export class GalleryApplicationVersionsImpl galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationVersionsUpdateResponse > > { @@ -292,7 +299,7 @@ export class GalleryApplicationVersionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,9 +332,9 @@ export class GalleryApplicationVersionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, @@ -335,10 +342,13 @@ export class GalleryApplicationVersionsImpl galleryApplicationVersion, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryApplicationVersionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -423,14 +433,14 @@ export class GalleryApplicationVersionsImpl galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams - ): 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 ) => { @@ -463,19 +473,19 @@ export class GalleryApplicationVersionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/galleryApplications.ts b/sdk/compute/arm-compute/src/operations/galleryApplications.ts index 1d3ad5f7bb04..03fee87c042e 100644 --- a/sdk/compute/arm-compute/src/operations/galleryApplications.ts +++ b/sdk/compute/arm-compute/src/operations/galleryApplications.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { GalleryApplication, GalleryApplicationsListByGalleryNextOptionalParams, @@ -147,8 +151,8 @@ export class GalleryApplicationsImpl implements GalleryApplications { galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationsCreateOrUpdateResponse > > { @@ -158,7 +162,7 @@ export class GalleryApplicationsImpl implements GalleryApplications { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -191,19 +195,22 @@ export class GalleryApplicationsImpl implements GalleryApplications { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleryApplicationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -256,8 +263,8 @@ export class GalleryApplicationsImpl implements GalleryApplications { galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationsUpdateResponse > > { @@ -267,7 +274,7 @@ export class GalleryApplicationsImpl implements GalleryApplications { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,19 +307,22 @@ export class GalleryApplicationsImpl implements GalleryApplications { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryApplicationsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -380,14 +390,14 @@ export class GalleryApplicationsImpl implements GalleryApplications { galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams - ): 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 ) => { @@ -420,13 +430,13 @@ export class GalleryApplicationsImpl implements GalleryApplications { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, galleryApplicationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryApplicationName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts b/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts index b651f6ce527f..13c3203169fd 100644 --- a/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts +++ b/sdk/compute/arm-compute/src/operations/galleryImageVersions.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { GalleryImageVersion, GalleryImageVersionsListByGalleryImageNextOptionalParams, @@ -159,8 +163,8 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImageVersionsCreateOrUpdateResponse > > { @@ -170,7 +174,7 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -203,9 +207,9 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, @@ -213,10 +217,13 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { galleryImageVersion, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImageVersionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -275,8 +282,8 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImageVersionsUpdateResponse > > { @@ -286,7 +293,7 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -319,9 +326,9 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, @@ -329,10 +336,13 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { galleryImageVersion, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImageVersionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -411,14 +421,14 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams - ): 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 ) => { @@ -451,19 +461,19 @@ export class GalleryImageVersionsImpl implements GalleryImageVersions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/galleryImages.ts b/sdk/compute/arm-compute/src/operations/galleryImages.ts index d83af3978740..e46aa4ef9a1d 100644 --- a/sdk/compute/arm-compute/src/operations/galleryImages.ts +++ b/sdk/compute/arm-compute/src/operations/galleryImages.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { GalleryImage, GalleryImagesListByGalleryNextOptionalParams, @@ -147,8 +151,8 @@ export class GalleryImagesImpl implements GalleryImages { galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImagesCreateOrUpdateResponse > > { @@ -158,7 +162,7 @@ export class GalleryImagesImpl implements GalleryImages { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -191,19 +195,22 @@ export class GalleryImagesImpl implements GalleryImages { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, galleryImage, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -256,8 +263,8 @@ export class GalleryImagesImpl implements GalleryImages { galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImagesUpdateResponse > > { @@ -267,7 +274,7 @@ export class GalleryImagesImpl implements GalleryImages { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,19 +307,22 @@ export class GalleryImagesImpl implements GalleryImages { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, galleryImage, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -380,14 +390,14 @@ export class GalleryImagesImpl implements GalleryImages { galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams - ): 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 ) => { @@ -420,13 +430,13 @@ export class GalleryImagesImpl implements GalleryImages { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, galleryImageName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, galleryImageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts b/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts index 3f694599aff9..717a581ef043 100644 --- a/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts +++ b/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { SharingUpdate, GallerySharingProfileUpdateOptionalParams, @@ -44,8 +48,8 @@ export class GallerySharingProfileImpl implements GallerySharingProfile { sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GallerySharingProfileUpdateResponse > > { @@ -55,7 +59,7 @@ export class GallerySharingProfileImpl implements GallerySharingProfile { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -88,13 +92,16 @@ export class GallerySharingProfileImpl implements GallerySharingProfile { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, galleryName, sharingUpdate, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryName, sharingUpdate, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GallerySharingProfileUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/images.ts b/sdk/compute/arm-compute/src/operations/images.ts index cec5902f6ba9..1bc1ff8155f0 100644 --- a/sdk/compute/arm-compute/src/operations/images.ts +++ b/sdk/compute/arm-compute/src/operations/images.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { Image, ImagesListByResourceGroupNextOptionalParams, @@ -185,8 +189,8 @@ export class ImagesImpl implements Images { parameters: Image, options?: ImagesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ImagesCreateOrUpdateResponse > > { @@ -196,7 +200,7 @@ export class ImagesImpl implements Images { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -229,13 +233,16 @@ export class ImagesImpl implements Images { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, imageName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, imageName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ImagesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -277,7 +284,7 @@ export class ImagesImpl implements Images { parameters: ImageUpdate, options?: ImagesUpdateOptionalParams ): Promise< - PollerLike, ImagesUpdateResponse> + SimplePollerLike, ImagesUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -285,7 +292,7 @@ export class ImagesImpl implements Images { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -318,13 +325,16 @@ export class ImagesImpl implements Images { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, imageName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, imageName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ImagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -363,14 +373,14 @@ export class ImagesImpl implements Images { resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams - ): 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 ) => { @@ -403,13 +413,13 @@ export class ImagesImpl implements Images { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, imageName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, imageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/logAnalytics.ts b/sdk/compute/arm-compute/src/operations/logAnalytics.ts index e4b123f983ed..1ee43c16df21 100644 --- a/sdk/compute/arm-compute/src/operations/logAnalytics.ts +++ b/sdk/compute/arm-compute/src/operations/logAnalytics.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { RequestRateByIntervalInput, LogAnalyticsExportRequestRateByIntervalOptionalParams, @@ -46,8 +50,8 @@ export class LogAnalyticsImpl implements LogAnalytics { parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LogAnalyticsExportRequestRateByIntervalResponse > > { @@ -57,7 +61,7 @@ export class LogAnalyticsImpl implements LogAnalytics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -90,15 +94,18 @@ export class LogAnalyticsImpl implements LogAnalytics { }; }; - const lro = new LroImpl( - sendOperation, - { location, parameters, options }, - exportRequestRateByIntervalOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { location, parameters, options }, + spec: exportRequestRateByIntervalOperationSpec + }); + const poller = await createHttpPoller< + LogAnalyticsExportRequestRateByIntervalResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -135,8 +142,8 @@ export class LogAnalyticsImpl implements LogAnalytics { parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LogAnalyticsExportThrottledRequestsResponse > > { @@ -146,7 +153,7 @@ export class LogAnalyticsImpl implements LogAnalytics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -179,15 +186,18 @@ export class LogAnalyticsImpl implements LogAnalytics { }; }; - const lro = new LroImpl( - sendOperation, - { location, parameters, options }, - exportThrottledRequestsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { location, parameters, options }, + spec: exportThrottledRequestsOperationSpec + }); + const poller = await createHttpPoller< + LogAnalyticsExportThrottledRequestsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operations/restorePointCollections.ts b/sdk/compute/arm-compute/src/operations/restorePointCollections.ts index 5d092f484754..81f04be69466 100644 --- a/sdk/compute/arm-compute/src/operations/restorePointCollections.ts +++ b/sdk/compute/arm-compute/src/operations/restorePointCollections.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { RestorePointCollection, RestorePointCollectionsListNextOptionalParams, @@ -217,14 +221,14 @@ export class RestorePointCollectionsImpl implements RestorePointCollections { resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams - ): 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 ) => { @@ -257,13 +261,13 @@ export class RestorePointCollectionsImpl implements RestorePointCollections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, restorePointCollectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, restorePointCollectionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/restorePoints.ts b/sdk/compute/arm-compute/src/operations/restorePoints.ts index 85cbcbafb20b..747970d620c5 100644 --- a/sdk/compute/arm-compute/src/operations/restorePoints.ts +++ b/sdk/compute/arm-compute/src/operations/restorePoints.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { RestorePoint, RestorePointsCreateOptionalParams, @@ -50,8 +54,8 @@ export class RestorePointsImpl implements RestorePoints { parameters: RestorePoint, options?: RestorePointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RestorePointsCreateResponse > > { @@ -61,7 +65,7 @@ export class RestorePointsImpl implements RestorePoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -94,19 +98,22 @@ export class RestorePointsImpl implements RestorePoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, restorePointCollectionName, restorePointName, parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + RestorePointsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -151,14 +158,14 @@ export class RestorePointsImpl implements RestorePoints { restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams - ): 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 ) => { @@ -191,18 +198,18 @@ export class RestorePointsImpl implements RestorePoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, restorePointCollectionName, restorePointName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/snapshots.ts b/sdk/compute/arm-compute/src/operations/snapshots.ts index f4323659fdfe..6257f2de0768 100644 --- a/sdk/compute/arm-compute/src/operations/snapshots.ts +++ b/sdk/compute/arm-compute/src/operations/snapshots.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { Snapshot, SnapshotsListByResourceGroupNextOptionalParams, @@ -190,8 +194,8 @@ export class SnapshotsImpl implements Snapshots { snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsCreateOrUpdateResponse > > { @@ -201,7 +205,7 @@ export class SnapshotsImpl implements Snapshots { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -234,13 +238,16 @@ export class SnapshotsImpl implements Snapshots { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, snapshotName, snapshot, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, snapshotName, snapshot, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SnapshotsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -286,8 +293,8 @@ export class SnapshotsImpl implements Snapshots { snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsUpdateResponse > > { @@ -297,7 +304,7 @@ export class SnapshotsImpl implements Snapshots { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -330,13 +337,16 @@ export class SnapshotsImpl implements Snapshots { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, snapshotName, snapshot, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, snapshotName, snapshot, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + SnapshotsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -398,14 +408,14 @@ export class SnapshotsImpl implements Snapshots { resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams - ): 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 ) => { @@ -438,13 +448,13 @@ export class SnapshotsImpl implements Snapshots { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, snapshotName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, snapshotName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -512,8 +522,8 @@ export class SnapshotsImpl implements Snapshots { grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsGrantAccessResponse > > { @@ -523,7 +533,7 @@ export class SnapshotsImpl implements Snapshots { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -556,15 +566,18 @@ export class SnapshotsImpl implements Snapshots { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, snapshotName, grantAccessData, options }, - grantAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, snapshotName, grantAccessData, options }, + spec: grantAccessOperationSpec + }); + const poller = await createHttpPoller< + SnapshotsGrantAccessResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -606,14 +619,14 @@ export class SnapshotsImpl implements Snapshots { resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams - ): 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 ) => { @@ -646,15 +659,15 @@ export class SnapshotsImpl implements Snapshots { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, snapshotName, options }, - revokeAccessOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, snapshotName, options }, + spec: revokeAccessOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts index 80e532629b76..860d8eca27ab 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineExtension, VirtualMachineExtensionsCreateOrUpdateOptionalParams, @@ -54,8 +58,8 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineExtensionsCreateOrUpdateResponse > > { @@ -65,7 +69,7 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -98,19 +102,22 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, vmExtensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -157,8 +164,8 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineExtensionsUpdateResponse > > { @@ -168,7 +175,7 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -201,19 +208,22 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, vmExtensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -257,14 +267,14 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams - ): 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 ) => { @@ -297,13 +307,13 @@ export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, vmExtensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, vmExtensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts index 459c9cc5fc75..53fc4f8f474e 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { RunCommandDocumentBase, VirtualMachineRunCommandsListNextOptionalParams, @@ -241,8 +245,8 @@ export class VirtualMachineRunCommandsImpl runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineRunCommandsCreateOrUpdateResponse > > { @@ -252,7 +256,7 @@ export class VirtualMachineRunCommandsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -285,13 +289,16 @@ export class VirtualMachineRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, runCommandName, runCommand, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, runCommandName, runCommand, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineRunCommandsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -338,8 +345,8 @@ export class VirtualMachineRunCommandsImpl runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineRunCommandsUpdateResponse > > { @@ -349,7 +356,7 @@ export class VirtualMachineRunCommandsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -382,13 +389,16 @@ export class VirtualMachineRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, runCommandName, runCommand, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, runCommandName, runCommand, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineRunCommandsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -432,14 +442,14 @@ export class VirtualMachineRunCommandsImpl vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams - ): 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 ) => { @@ -472,13 +482,13 @@ export class VirtualMachineRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, runCommandName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, runCommandName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts index 302f11644fd7..7611976b9b7f 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineScaleSetExtension, VirtualMachineScaleSetExtensionsListNextOptionalParams, @@ -136,10 +140,8 @@ export class VirtualMachineScaleSetExtensionsImpl extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetExtensionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetExtensionsCreateOrUpdateResponse > > { @@ -149,7 +151,7 @@ export class VirtualMachineScaleSetExtensionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -182,19 +184,22 @@ export class VirtualMachineScaleSetExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -241,8 +246,8 @@ export class VirtualMachineScaleSetExtensionsImpl extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetExtensionsUpdateResponse > > { @@ -252,7 +257,7 @@ export class VirtualMachineScaleSetExtensionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -285,19 +290,22 @@ export class VirtualMachineScaleSetExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -341,14 +349,14 @@ export class VirtualMachineScaleSetExtensionsImpl vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams - ): 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 ) => { @@ -381,13 +389,13 @@ export class VirtualMachineScaleSetExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, vmssExtensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, vmssExtensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts index d518931b556b..58b6cc1bf29f 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineScaleSetRollingUpgradesCancelOptionalParams, VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams, @@ -44,14 +48,14 @@ export class VirtualMachineScaleSetRollingUpgradesImpl resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams - ): 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 ) => { @@ -84,13 +88,13 @@ export class VirtualMachineScaleSetRollingUpgradesImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - cancelOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: cancelOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -128,14 +132,14 @@ export class VirtualMachineScaleSetRollingUpgradesImpl resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams - ): 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 ) => { @@ -168,13 +172,13 @@ export class VirtualMachineScaleSetRollingUpgradesImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - startOSUpgradeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: startOSUpgradeOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -214,14 +218,14 @@ export class VirtualMachineScaleSetRollingUpgradesImpl resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams - ): 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 ) => { @@ -254,13 +258,13 @@ export class VirtualMachineScaleSetRollingUpgradesImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - startExtensionUpgradeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: startExtensionUpgradeOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts index 6db627b9870a..c58d77d235f9 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineScaleSetVMExtension, VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams, @@ -57,10 +61,8 @@ export class VirtualMachineScaleSetVMExtensionsImpl extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse > > { @@ -70,7 +72,7 @@ export class VirtualMachineScaleSetVMExtensionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -103,9 +105,9 @@ export class VirtualMachineScaleSetVMExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, @@ -113,10 +115,13 @@ export class VirtualMachineScaleSetVMExtensionsImpl extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -168,8 +173,8 @@ export class VirtualMachineScaleSetVMExtensionsImpl extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMExtensionsUpdateResponse > > { @@ -179,7 +184,7 @@ export class VirtualMachineScaleSetVMExtensionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -212,9 +217,9 @@ export class VirtualMachineScaleSetVMExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, @@ -222,10 +227,13 @@ export class VirtualMachineScaleSetVMExtensionsImpl extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -274,14 +282,14 @@ export class VirtualMachineScaleSetVMExtensionsImpl instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams - ): 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 ) => { @@ -314,19 +322,19 @@ export class VirtualMachineScaleSetVMExtensionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts index 1cd694a32089..763b5aba3561 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineRunCommand, VirtualMachineScaleSetVMRunCommandsListNextOptionalParams, @@ -155,10 +159,8 @@ export class VirtualMachineScaleSetVMRunCommandsImpl runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse > > { @@ -168,7 +170,7 @@ export class VirtualMachineScaleSetVMRunCommandsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -201,9 +203,9 @@ export class VirtualMachineScaleSetVMRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, @@ -211,10 +213,13 @@ export class VirtualMachineScaleSetVMRunCommandsImpl runCommand, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -266,8 +271,8 @@ export class VirtualMachineScaleSetVMRunCommandsImpl runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMRunCommandsUpdateResponse > > { @@ -277,7 +282,7 @@ export class VirtualMachineScaleSetVMRunCommandsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -310,9 +315,9 @@ export class VirtualMachineScaleSetVMRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, @@ -320,10 +325,13 @@ export class VirtualMachineScaleSetVMRunCommandsImpl runCommand, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMRunCommandsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -372,14 +380,14 @@ export class VirtualMachineScaleSetVMRunCommandsImpl instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams - ): 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 ) => { @@ -412,19 +420,19 @@ export class VirtualMachineScaleSetVMRunCommandsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, runCommandName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts index 09ca5b32488a..e5bcb0c15845 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineScaleSetVM, VirtualMachineScaleSetVMsListNextOptionalParams, @@ -154,14 +158,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams - ): 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 ) => { @@ -194,13 +198,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - reimageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: reimageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -242,14 +246,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams - ): 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 ) => { @@ -282,13 +286,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - reimageAllOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: reimageAllOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -332,14 +336,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams - ): 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 ) => { @@ -372,13 +376,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - deallocateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: deallocateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -424,8 +428,8 @@ export class VirtualMachineScaleSetVMsImpl parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMsUpdateResponse > > { @@ -435,7 +439,7 @@ export class VirtualMachineScaleSetVMsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -468,13 +472,22 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + vmScaleSetName, + instanceId, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -518,14 +531,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams - ): 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 ) => { @@ -558,13 +571,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -662,14 +675,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams - ): 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 ) => { @@ -702,13 +715,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - powerOffOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: powerOffOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -751,14 +764,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams - ): 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 ) => { @@ -791,13 +804,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -838,14 +851,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams - ): 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 ) => { @@ -878,13 +891,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -926,14 +939,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams - ): 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 ) => { @@ -966,13 +979,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - redeployOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: redeployOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1033,14 +1046,14 @@ export class VirtualMachineScaleSetVMsImpl vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams - ): 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 ) => { @@ -1073,13 +1086,13 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, options }, - performMaintenanceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, instanceId, options }, + spec: performMaintenanceOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1142,8 +1155,8 @@ export class VirtualMachineScaleSetVMsImpl parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMsRunCommandResponse > > { @@ -1153,7 +1166,7 @@ export class VirtualMachineScaleSetVMsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1186,15 +1199,24 @@ export class VirtualMachineScaleSetVMsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, instanceId, parameters, options }, - runCommandOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + vmScaleSetName, + instanceId, + parameters, + options + }, + spec: runCommandOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetVMsRunCommandResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts index ae0e7cd261f1..5e13d157b553 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachineScaleSet, VirtualMachineScaleSetsListByLocationNextOptionalParams, @@ -454,8 +458,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsCreateOrUpdateResponse > > { @@ -465,7 +469,7 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -498,13 +502,16 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -546,8 +553,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsUpdateResponse > > { @@ -557,7 +564,7 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -590,13 +597,16 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineScaleSetsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -635,14 +645,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams - ): 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 ) => { @@ -675,13 +685,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -736,14 +746,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams - ): 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 ) => { @@ -776,13 +786,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - deallocateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: deallocateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -822,14 +832,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams - ): 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 ) => { @@ -862,13 +872,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, - deleteInstancesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, + spec: deleteInstancesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -988,14 +998,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams - ): 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 ) => { @@ -1028,13 +1038,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - powerOffOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: powerOffOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1072,14 +1082,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams - ): 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 ) => { @@ -1112,13 +1122,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1154,14 +1164,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams - ): 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 ) => { @@ -1194,13 +1204,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1237,14 +1247,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams - ): 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 ) => { @@ -1277,13 +1287,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - redeployOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: redeployOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1323,14 +1333,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams - ): 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 ) => { @@ -1363,13 +1373,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - performMaintenanceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: performMaintenanceOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1410,14 +1420,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams - ): 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 ) => { @@ -1450,13 +1460,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, - updateInstancesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, + spec: updateInstancesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1497,14 +1507,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams - ): 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 ) => { @@ -1537,13 +1547,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - reimageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: reimageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1582,14 +1592,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams - ): 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 ) => { @@ -1622,13 +1632,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, options }, - reimageAllOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: reimageAllOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1708,14 +1718,14 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams - ): 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 ) => { @@ -1748,13 +1758,13 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmScaleSetName, parameters, options }, - setOrchestrationServiceStateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, parameters, options }, + spec: setOrchestrationServiceStateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/compute/arm-compute/src/operations/virtualMachines.ts b/sdk/compute/arm-compute/src/operations/virtualMachines.ts index 0eac9c874844..2ba551c8dfd6 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachines.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 { ComputeManagementClient } from "../computeManagementClient"; -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 { VirtualMachine, VirtualMachinesListByLocationNextOptionalParams, @@ -352,8 +356,8 @@ export class VirtualMachinesImpl implements VirtualMachines { parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesCaptureResponse > > { @@ -363,7 +367,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -396,15 +400,18 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, parameters, options }, - captureOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, parameters, options }, + spec: captureOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesCaptureResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -447,8 +454,8 @@ export class VirtualMachinesImpl implements VirtualMachines { parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesCreateOrUpdateResponse > > { @@ -458,7 +465,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -491,13 +498,16 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -540,8 +550,8 @@ export class VirtualMachinesImpl implements VirtualMachines { parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesUpdateResponse > > { @@ -551,7 +561,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -584,13 +594,16 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -629,14 +642,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams - ): 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 ) => { @@ -669,13 +682,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -742,14 +755,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams - ): 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 ) => { @@ -782,13 +795,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - convertToManagedDisksOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: convertToManagedDisksOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -826,14 +839,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams - ): 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 ) => { @@ -866,13 +879,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - deallocateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: deallocateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -976,14 +989,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams - ): 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 ) => { @@ -1016,13 +1029,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - powerOffOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: powerOffOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1055,14 +1068,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams - ): 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 ) => { @@ -1095,13 +1108,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - reapplyOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: reapplyOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1133,14 +1146,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams - ): 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 ) => { @@ -1173,13 +1186,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1211,14 +1224,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams - ): 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 ) => { @@ -1251,13 +1264,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1289,14 +1302,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams - ): 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 ) => { @@ -1329,13 +1342,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - redeployOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: redeployOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1372,14 +1385,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams - ): 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 ) => { @@ -1412,13 +1425,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - reimageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: reimageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1472,14 +1485,14 @@ export class VirtualMachinesImpl implements VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams - ): 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 ) => { @@ -1512,13 +1525,13 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - performMaintenanceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: performMaintenanceOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1572,8 +1585,8 @@ export class VirtualMachinesImpl implements VirtualMachines { vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesAssessPatchesResponse > > { @@ -1583,7 +1596,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1616,15 +1629,18 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, options }, - assessPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, options }, + spec: assessPatchesOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesAssessPatchesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1662,8 +1678,8 @@ export class VirtualMachinesImpl implements VirtualMachines { installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesInstallPatchesResponse > > { @@ -1673,7 +1689,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1706,15 +1722,18 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, installPatchesInput, options }, - installPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, installPatchesInput, options }, + spec: installPatchesOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesInstallPatchesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1755,8 +1774,8 @@ export class VirtualMachinesImpl implements VirtualMachines { parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesRunCommandResponse > > { @@ -1766,7 +1785,7 @@ export class VirtualMachinesImpl implements VirtualMachines { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1799,15 +1818,18 @@ export class VirtualMachinesImpl implements VirtualMachines { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmName, parameters, options }, - runCommandOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmName, parameters, options }, + spec: runCommandOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachinesRunCommandResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/capacityReservations.ts b/sdk/compute/arm-compute/src/operationsInterfaces/capacityReservations.ts index fee299cef1fa..0e7e2b65566f 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/capacityReservations.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/capacityReservations.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 { CapacityReservation, CapacityReservationsListByCapacityReservationGroupOptionalParams, @@ -53,8 +53,8 @@ export interface CapacityReservations { parameters: CapacityReservation, options?: CapacityReservationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CapacityReservationsCreateOrUpdateResponse > >; @@ -90,8 +90,8 @@ export interface CapacityReservations { parameters: CapacityReservationUpdate, options?: CapacityReservationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CapacityReservationsUpdateResponse > >; @@ -124,7 +124,7 @@ export interface CapacityReservations { capacityReservationGroupName: string, capacityReservationName: string, options?: CapacityReservationsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete a capacity reservation. This operation is allowed only when all the * associated resources are disassociated from the capacity reservation. Please refer to diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts index 0a6312599448..b34256942c98 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.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 { RoleInstance, CloudServiceRoleInstancesListOptionalParams, @@ -50,7 +50,7 @@ export interface CloudServiceRoleInstances { resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. @@ -103,7 +103,7 @@ export interface CloudServiceRoleInstances { resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud * service. @@ -131,7 +131,7 @@ export interface CloudServiceRoleInstances { resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles. @@ -160,7 +160,7 @@ export interface CloudServiceRoleInstances { resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles and initializes the storage resources that are used by them. If you do not diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts index cdd15a97ecf9..3e7f88d72e7a 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.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 { CloudService, CloudServicesListAllOptionalParams, @@ -63,8 +63,8 @@ export interface CloudServices { cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudServicesCreateOrUpdateResponse > >; @@ -91,8 +91,8 @@ export interface CloudServices { cloudServiceName: string, options?: CloudServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudServicesUpdateResponse > >; @@ -117,7 +117,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a cloud service. * @param resourceGroupName Name of the resource group. @@ -161,7 +161,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts the cloud service. * @param resourceGroupName Name of the resource group. @@ -184,7 +184,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Power off the cloud service. Note that resources are still attached and you are getting charged for * the resources. @@ -207,7 +207,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restarts one or more role instances in a cloud service. * @param resourceGroupName Name of the resource group. @@ -230,7 +230,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker * roles. @@ -255,7 +255,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and * initializes the storage resources that are used by them. If you do not want to initialize storage @@ -279,7 +279,7 @@ export interface CloudServices { resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes role instances in a cloud service. * @param resourceGroupName Name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts index ef8d282899f7..88848d085687 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.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 { UpdateDomain, CloudServicesUpdateDomainListUpdateDomainsOptionalParams, @@ -44,7 +44,7 @@ export interface CloudServicesUpdateDomain { cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Updates the role instances in the specified update domain. * @param resourceGroupName Name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts index 74adf52cb1df..006f872d6aba 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.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 { DedicatedHost, DedicatedHostsListByHostGroupOptionalParams, @@ -52,8 +52,8 @@ export interface DedicatedHosts { parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsCreateOrUpdateResponse > >; @@ -87,8 +87,8 @@ export interface DedicatedHosts { parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsUpdateResponse > >; @@ -119,7 +119,7 @@ export interface DedicatedHosts { hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a dedicated host. * @param resourceGroupName The name of the resource group. @@ -161,7 +161,7 @@ export interface DedicatedHosts { hostGroupName: string, hostName: string, options?: DedicatedHostsRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restart the dedicated host. The operation will complete successfully once the dedicated host has * restarted and is running. To determine the health of VMs deployed on the dedicated host after the diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts index b443314ae9ae..b3f40067e821 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.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 { DiskAccess, DiskAccessesListByResourceGroupOptionalParams, @@ -78,8 +78,8 @@ export interface DiskAccesses { diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesCreateOrUpdateResponse > >; @@ -113,8 +113,8 @@ export interface DiskAccesses { diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesUpdateResponse > >; @@ -158,7 +158,7 @@ export interface DiskAccesses { resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a disk access resource. * @param resourceGroupName The name of the resource group. @@ -204,8 +204,8 @@ export interface DiskAccesses { privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskAccessesUpdateAPrivateEndpointConnectionResponse > >; @@ -257,7 +257,7 @@ export interface DiskAccesses { diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a private endpoint connection under a disk access resource. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts index 08ec1aec15f4..081a6b26d905 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.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 { DiskEncryptionSet, DiskEncryptionSetsListByResourceGroupOptionalParams, @@ -71,8 +71,8 @@ export interface DiskEncryptionSets { diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskEncryptionSetsCreateOrUpdateResponse > >; @@ -108,8 +108,8 @@ export interface DiskEncryptionSets { diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskEncryptionSetsUpdateResponse > >; @@ -154,7 +154,7 @@ export interface DiskEncryptionSets { resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a disk encryption set. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts index 3c0c927d99d4..2701737e062b 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.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 { DiskRestorePoint, DiskRestorePointListByRestorePointOptionalParams, @@ -70,8 +70,8 @@ export interface DiskRestorePointOperations { grantAccessData: GrantAccessData, options?: DiskRestorePointGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DiskRestorePointGrantAccessResponse > >; @@ -108,7 +108,7 @@ export interface DiskRestorePointOperations { vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointRevokeAccessOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Revokes access to a diskRestorePoint. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts b/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts index 45c95bbc1c2c..0dc932c7eb90 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/disks.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 { Disk, DisksListByResourceGroupOptionalParams, @@ -58,8 +58,8 @@ export interface Disks { disk: Disk, options?: DisksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DisksCreateOrUpdateResponse > >; @@ -93,7 +93,7 @@ export interface Disks { disk: DiskUpdate, options?: DisksUpdateOptionalParams ): Promise< - PollerLike, DisksUpdateResponse> + SimplePollerLike, DisksUpdateResponse> >; /** * Updates (patches) a disk. @@ -135,7 +135,7 @@ export interface Disks { resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a disk. * @param resourceGroupName The name of the resource group. @@ -164,8 +164,8 @@ export interface Disks { grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DisksGrantAccessResponse > >; @@ -196,7 +196,7 @@ export interface Disks { resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Revokes access to a disk. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts index 7b4bdba44e0b..b650db80e3d4 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleries.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 { Gallery, GalleriesListByResourceGroupOptionalParams, @@ -55,8 +55,8 @@ export interface Galleries { gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesCreateOrUpdateResponse > >; @@ -88,8 +88,8 @@ export interface Galleries { gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesUpdateResponse > >; @@ -128,7 +128,7 @@ export interface Galleries { resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Shared Image Gallery. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts index 0cbbb3f3374e..bf5b50c76d33 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.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 { GalleryApplicationVersion, GalleryApplicationVersionsListByGalleryApplicationOptionalParams, @@ -61,8 +61,8 @@ export interface GalleryApplicationVersions { galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationVersionsCreateOrUpdateResponse > >; @@ -110,8 +110,8 @@ export interface GalleryApplicationVersions { galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationVersionsUpdateResponse > >; @@ -170,7 +170,7 @@ export interface GalleryApplicationVersions { galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a gallery Application Version. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts index 2b54f24b2737..14c4d53d8e90 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.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 { GalleryApplication, GalleryApplicationsListByGalleryOptionalParams, @@ -54,8 +54,8 @@ export interface GalleryApplications { galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationsCreateOrUpdateResponse > >; @@ -95,8 +95,8 @@ export interface GalleryApplications { galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryApplicationsUpdateResponse > >; @@ -145,7 +145,7 @@ export interface GalleryApplications { galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a gallery Application. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts index 88568f152ebc..4b0460bc2156 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.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 { GalleryImageVersion, GalleryImageVersionsListByGalleryImageOptionalParams, @@ -59,8 +59,8 @@ export interface GalleryImageVersions { galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImageVersionsCreateOrUpdateResponse > >; @@ -105,8 +105,8 @@ export interface GalleryImageVersions { galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImageVersionsUpdateResponse > >; @@ -159,7 +159,7 @@ export interface GalleryImageVersions { galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a gallery image version. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts index 62814dbbee39..1e602f987fee 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.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 { GalleryImage, GalleryImagesListByGalleryOptionalParams, @@ -54,8 +54,8 @@ export interface GalleryImages { galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImagesCreateOrUpdateResponse > >; @@ -95,8 +95,8 @@ export interface GalleryImages { galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleryImagesUpdateResponse > >; @@ -145,7 +145,7 @@ export interface GalleryImages { galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a gallery image. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts b/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts index 7010d5dab95d..d3de32b681fc 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SharingUpdate, GallerySharingProfileUpdateOptionalParams, @@ -28,8 +28,8 @@ export interface GallerySharingProfile { sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GallerySharingProfileUpdateResponse > >; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/images.ts b/sdk/compute/arm-compute/src/operationsInterfaces/images.ts index fdf6a39efb2c..8996335436a7 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/images.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/images.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 { Image, ImagesListByResourceGroupOptionalParams, @@ -53,8 +53,8 @@ export interface Images { parameters: Image, options?: ImagesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ImagesCreateOrUpdateResponse > >; @@ -84,7 +84,7 @@ export interface Images { parameters: ImageUpdate, options?: ImagesUpdateOptionalParams ): Promise< - PollerLike, ImagesUpdateResponse> + SimplePollerLike, ImagesUpdateResponse> >; /** * Update an image. @@ -109,7 +109,7 @@ export interface Images { resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an Image. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts b/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts index bf6667d7628a..d6ffc9ae5ba0 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RequestRateByIntervalInput, LogAnalyticsExportRequestRateByIntervalOptionalParams, @@ -30,8 +30,8 @@ export interface LogAnalytics { parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LogAnalyticsExportRequestRateByIntervalResponse > >; @@ -58,8 +58,8 @@ export interface LogAnalytics { parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LogAnalyticsExportThrottledRequestsResponse > >; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts b/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts index 89be36d342ef..86bc3d4aa55a 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.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 { RestorePointCollection, RestorePointCollectionsListOptionalParams, @@ -82,7 +82,7 @@ export interface RestorePointCollections { resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the restore point collection. This operation will also delete all the * contained restore points. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts b/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts index 5eff03b299ae..4c46e1a8a161 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RestorePoint, RestorePointsCreateOptionalParams, @@ -34,8 +34,8 @@ export interface RestorePoints { parameters: RestorePoint, options?: RestorePointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RestorePointsCreateResponse > >; @@ -67,7 +67,7 @@ export interface RestorePoints { restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the restore point. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts b/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts index 21d2c58b6cb6..bcc82b28779e 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.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 { Snapshot, SnapshotsListByResourceGroupOptionalParams, @@ -60,8 +60,8 @@ export interface Snapshots { snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsCreateOrUpdateResponse > >; @@ -95,8 +95,8 @@ export interface Snapshots { snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsUpdateResponse > >; @@ -140,7 +140,7 @@ export interface Snapshots { resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a snapshot. * @param resourceGroupName The name of the resource group. @@ -169,8 +169,8 @@ export interface Snapshots { grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SnapshotsGrantAccessResponse > >; @@ -201,7 +201,7 @@ export interface Snapshots { resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Revokes access to a snapshot. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts index 7c4f884002ff..95731c5b27da 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineExtension, VirtualMachineExtensionsCreateOrUpdateOptionalParams, @@ -38,8 +38,8 @@ export interface VirtualMachineExtensions { extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineExtensionsCreateOrUpdateResponse > >; @@ -73,8 +73,8 @@ export interface VirtualMachineExtensions { extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineExtensionsUpdateResponse > >; @@ -105,7 +105,7 @@ export interface VirtualMachineExtensions { vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the extension. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts index 810b9e62aa00..8a16255431b6 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.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 { RunCommandDocumentBase, VirtualMachineRunCommandsListOptionalParams, @@ -74,8 +74,8 @@ export interface VirtualMachineRunCommands { runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineRunCommandsCreateOrUpdateResponse > >; @@ -109,8 +109,8 @@ export interface VirtualMachineRunCommands { runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineRunCommandsUpdateResponse > >; @@ -141,7 +141,7 @@ export interface VirtualMachineRunCommands { vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the run command. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts index f6fa2d40c19d..d286677fa2eb 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.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 { VirtualMachineScaleSetExtension, VirtualMachineScaleSetExtensionsListOptionalParams, @@ -50,10 +50,8 @@ export interface VirtualMachineScaleSetExtensions { extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetExtensionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetExtensionsCreateOrUpdateResponse > >; @@ -87,8 +85,8 @@ export interface VirtualMachineScaleSetExtensions { extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetExtensionsUpdateResponse > >; @@ -119,7 +117,7 @@ export interface VirtualMachineScaleSetExtensions { vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the extension. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts index a51bb8b45a0c..a1326e13e258 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineScaleSetRollingUpgradesCancelOptionalParams, VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams, @@ -27,7 +27,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Cancels the current virtual machine scale set rolling upgrade. * @param resourceGroupName The name of the resource group. @@ -51,7 +51,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available * Platform Image OS version. Instances which are already running the latest available OS version are @@ -77,7 +77,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the * latest available extension version. Instances which are already running the latest extension diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts index d54029f9a997..ecd3190015b1 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineScaleSetVMExtension, VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams, @@ -40,10 +40,8 @@ export interface VirtualMachineScaleSetVMExtensions { extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse > >; @@ -81,8 +79,8 @@ export interface VirtualMachineScaleSetVMExtensions { extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMExtensionsUpdateResponse > >; @@ -117,7 +115,7 @@ export interface VirtualMachineScaleSetVMExtensions { instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the VMSS VM extension. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts index 2722e0347945..12f69421b9ce 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.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 { VirtualMachineRunCommand, VirtualMachineScaleSetVMRunCommandsListOptionalParams, @@ -54,10 +54,8 @@ export interface VirtualMachineScaleSetVMRunCommands { runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse > >; @@ -95,8 +93,8 @@ export interface VirtualMachineScaleSetVMRunCommands { runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMRunCommandsUpdateResponse > >; @@ -131,7 +129,7 @@ export interface VirtualMachineScaleSetVMRunCommands { instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the VMSS VM run command. * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts index 4992cbb93f6d..5ddf9379316b 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.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 { VirtualMachineScaleSetVM, VirtualMachineScaleSetVMsListOptionalParams, @@ -60,7 +60,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -87,7 +87,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This * operation is only supported for managed disks. @@ -116,7 +116,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and * releases the compute resources it uses. You are not billed for the compute resources of this virtual @@ -147,8 +147,8 @@ export interface VirtualMachineScaleSetVMs { parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMsUpdateResponse > >; @@ -179,7 +179,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a virtual machine from a VM scale set. * @param resourceGroupName The name of the resource group. @@ -233,7 +233,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid @@ -261,7 +261,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restarts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -287,7 +287,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -314,7 +314,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers * it back on. @@ -354,7 +354,7 @@ export interface VirtualMachineScaleSetVMs { vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Performs maintenance on a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -396,8 +396,8 @@ export interface VirtualMachineScaleSetVMs { parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetVMsRunCommandResponse > >; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts index d27dfb19d234..15e0774b007e 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.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 { VirtualMachineScaleSet, VirtualMachineScaleSetsListByLocationOptionalParams, @@ -112,8 +112,8 @@ export interface VirtualMachineScaleSets { parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsCreateOrUpdateResponse > >; @@ -143,8 +143,8 @@ export interface VirtualMachineScaleSets { parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsUpdateResponse > >; @@ -171,7 +171,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a VM scale set. * @param resourceGroupName The name of the resource group. @@ -206,7 +206,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and * releases the compute resources. You are not billed for the compute resources that this virtual @@ -232,7 +232,7 @@ export interface VirtualMachineScaleSets { vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -269,7 +269,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release resources @@ -293,7 +293,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restarts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -315,7 +315,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. @@ -338,7 +338,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and * powers them back on. @@ -364,7 +364,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which * are not eligible for perform maintenance will be failed. Please refer to best practices for more @@ -391,7 +391,7 @@ export interface VirtualMachineScaleSets { vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * @param resourceGroupName The name of the resource group. @@ -417,7 +417,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't * have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is @@ -442,7 +442,7 @@ export interface VirtualMachineScaleSets { resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This * operation is only supported for managed disks. @@ -496,7 +496,7 @@ export interface VirtualMachineScaleSets { vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Changes ServiceState property for a given service * @param resourceGroupName The name of the resource group. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts index 774e862e2fe0..5f4e47450895 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.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 { VirtualMachine, VirtualMachinesListByLocationOptionalParams, @@ -106,8 +106,8 @@ export interface VirtualMachines { parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesCaptureResponse > >; @@ -139,8 +139,8 @@ export interface VirtualMachines { parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesCreateOrUpdateResponse > >; @@ -171,8 +171,8 @@ export interface VirtualMachines { parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesUpdateResponse > >; @@ -199,7 +199,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete a virtual machine. * @param resourceGroupName The name of the resource group. @@ -244,7 +244,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be * stop-deallocated before invoking this operation. @@ -268,7 +268,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Shuts down the virtual machine and releases the compute resources. You are not billed for the * compute resources that this virtual machine uses. @@ -308,7 +308,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the * same provisioned resources. You are still charged for this virtual machine. @@ -331,7 +331,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to reapply a virtual machine's state. * @param resourceGroupName The name of the resource group. @@ -353,7 +353,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to restart a virtual machine. * @param resourceGroupName The name of the resource group. @@ -375,7 +375,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to start a virtual machine. * @param resourceGroupName The name of the resource group. @@ -397,7 +397,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * @param resourceGroupName The name of the resource group. @@ -424,7 +424,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for * virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: @@ -462,7 +462,7 @@ export interface VirtualMachines { resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to perform maintenance on a virtual machine. * @param resourceGroupName The name of the resource group. @@ -496,8 +496,8 @@ export interface VirtualMachines { vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesAssessPatchesResponse > >; @@ -525,8 +525,8 @@ export interface VirtualMachines { installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesInstallPatchesResponse > >; @@ -556,8 +556,8 @@ export interface VirtualMachines { parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachinesRunCommandResponse > >; diff --git a/sdk/compute/arm-compute/test/sampleTest.ts b/sdk/compute/arm-compute/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/compute/arm-compute/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index b84abc8423ab..3e6ae96443f3 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-compute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"