From b0e1d53a7a72493d45e64576d10c36cc18f1a4be Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 19 Apr 2023 02:29:37 +0000 Subject: [PATCH] CodeGen from PR 23621 in Azure/azure-rest-api-specs Merge 0fa9393e0fa006b4c52ece6915712dc9344cf100 into cb300dbe61c2fc39362d543318cbc7e974481cbd --- common/config/rush/pnpm-lock.yaml | 6 +- sdk/compute/arm-compute/CHANGELOG.md | 62 +- sdk/compute/arm-compute/_meta.json | 8 +- sdk/compute/arm-compute/package.json | 25 +- .../arm-compute/review/arm-compute.api.md | 404 ++-- .../src/computeManagementClient.ts | 2 +- sdk/compute/arm-compute/src/lroImpl.ts | 54 +- sdk/compute/arm-compute/src/models/index.ts | 1099 ++++++----- sdk/compute/arm-compute/src/models/mappers.ts | 1719 ++++++++++------- .../arm-compute/src/models/parameters.ts | 72 +- .../operations/capacityReservationGroups.ts | 6 +- .../src/operations/capacityReservations.ts | 74 +- .../operations/cloudServiceRoleInstances.ts | 80 +- .../src/operations/cloudServices.ts | 180 +- .../operations/cloudServicesUpdateDomain.ts | 26 +- .../src/operations/dedicatedHosts.ts | 214 +- .../src/operations/diskAccesses.ts | 113 +- .../src/operations/diskEncryptionSets.ts | 82 +- .../operations/diskRestorePointOperations.ts | 53 +- .../arm-compute/src/operations/disks.ts | 115 +- .../arm-compute/src/operations/galleries.ts | 74 +- .../operations/galleryApplicationVersions.ts | 74 +- .../src/operations/galleryApplications.ts | 72 +- .../src/operations/galleryImageVersions.ts | 74 +- .../src/operations/galleryImages.ts | 72 +- .../src/operations/gallerySharingProfile.ts | 31 +- .../arm-compute/src/operations/images.ts | 70 +- .../src/operations/logAnalytics.ts | 58 +- .../src/operations/restorePointCollections.ts | 28 +- .../src/operations/restorePoints.ts | 51 +- .../arm-compute/src/operations/snapshots.ts | 117 +- .../operations/virtualMachineExtensions.ts | 72 +- .../operations/virtualMachineRunCommands.ts | 72 +- .../virtualMachineScaleSetExtensions.ts | 74 +- .../virtualMachineScaleSetRollingUpgrades.ts | 62 +- .../virtualMachineScaleSetVMExtensions.ts | 74 +- .../virtualMachineScaleSetVMRunCommands.ts | 74 +- .../operations/virtualMachineScaleSetVMs.ts | 230 ++- .../src/operations/virtualMachineScaleSets.ts | 379 ++-- .../src/operations/virtualMachines.ts | 351 ++-- .../capacityReservations.ts | 12 +- .../cloudServiceRoleInstances.ts | 10 +- .../src/operationsInterfaces/cloudServices.ts | 24 +- .../cloudServicesUpdateDomain.ts | 4 +- .../operationsInterfaces/dedicatedHosts.ts | 33 +- .../src/operationsInterfaces/diskAccesses.ts | 18 +- .../diskEncryptionSets.ts | 12 +- .../diskRestorePointOperations.ts | 8 +- .../src/operationsInterfaces/disks.ts | 16 +- .../src/operationsInterfaces/galleries.ts | 12 +- .../galleryApplicationVersions.ts | 12 +- .../galleryApplications.ts | 12 +- .../galleryImageVersions.ts | 12 +- .../src/operationsInterfaces/galleryImages.ts | 12 +- .../gallerySharingProfile.ts | 6 +- .../src/operationsInterfaces/images.ts | 10 +- .../src/operationsInterfaces/logAnalytics.ts | 10 +- .../restorePointCollections.ts | 4 +- .../src/operationsInterfaces/restorePoints.ts | 8 +- .../src/operationsInterfaces/snapshots.ts | 18 +- .../virtualMachineExtensions.ts | 12 +- .../virtualMachineRunCommands.ts | 12 +- .../virtualMachineScaleSetExtensions.ts | 14 +- .../virtualMachineScaleSetRollingUpgrades.ts | 8 +- .../virtualMachineScaleSetVMExtensions.ts | 14 +- .../virtualMachineScaleSetVMRunCommands.ts | 14 +- .../virtualMachineScaleSetVMs.ts | 28 +- .../virtualMachineScaleSets.ts | 57 +- .../operationsInterfaces/virtualMachines.ts | 54 +- sdk/compute/arm-compute/test/sampleTest.ts | 43 + sdk/compute/arm-compute/tsconfig.json | 10 +- 71 files changed, 4166 insertions(+), 2856 deletions(-) create mode 100644 sdk/compute/arm-compute/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1aff4d8559d1..658e90f31b9c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10984,7 +10984,7 @@ packages: dev: false file:projects/arm-compute-1.tgz: - resolution: {integrity: sha512-zrrx9+8z5HrJsgov5cnZHrdmbo1dGaFESx8ZgvU3XtKaXPt91C7gODYbc12mZDiiQeur7l9jCwgm3VYa+nff+w==, tarball: file:projects/arm-compute-1.tgz} + resolution: {integrity: sha512-usDapy5bugy1wEZbGyM9czPanvc40ENzlJFYlgYTid1mXl755OWJTKdVMthKsPDL4rAvxljMO80cFkeCIGF76w==, tarball: file:projects/arm-compute-1.tgz} name: '@rush-temp/arm-compute-1' version: 0.0.0 dependencies: @@ -11000,13 +11000,13 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index 59f4dac04a27..04c82db161e4 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,61 @@ # Release History + +## 21.0.0 (2023-04-19) + +**Features** -## 20.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation DedicatedHosts.listAvailableSizes + - Added operation VirtualMachineScaleSets.beginReapply + - Added operation VirtualMachineScaleSets.beginReapplyAndWait + - Added Interface DedicatedHostSizeListResult + - Added Interface DedicatedHostsListAvailableSizesOptionalParams + - Added Interface DiskRestorePointAttributes + - Added Interface RestorePointEncryption + - Added Interface RunCommandManagedIdentity + - Added Interface SecurityPostureReference + - Added Interface VirtualMachineScaleSetsReapplyHeaders + - Added Interface VirtualMachineScaleSetsReapplyOptionalParams + - Added Type Alias DedicatedHostsListAvailableSizesResponse + - Added Type Alias ExpandTypeForListVMs + - Added Type Alias ExpandTypesForListVMs + - Added Type Alias RestorePointEncryptionType + - Interface DedicatedHostUpdate has a new optional parameter sku + - Interface LinuxVMGuestPatchAutomaticByPlatformSettings has a new optional parameter bypassPlatformSafetyChecksOnUserSchedule + - Interface RestorePointSourceMetadata has a new optional parameter hyperVGeneration + - Interface RestorePointSourceVMDataDisk has a new optional parameter writeAcceleratorEnabled + - Interface RestorePointSourceVmosDisk has a new optional parameter writeAcceleratorEnabled + - Interface VirtualMachineExtension has a new optional parameter provisionAfterExtensions + - Interface VirtualMachineRunCommand has a new optional parameter errorBlobManagedIdentity + - Interface VirtualMachineRunCommand has a new optional parameter outputBlobManagedIdentity + - Interface VirtualMachineRunCommand has a new optional parameter treatFailureAsDeploymentFailure + - Interface VirtualMachineRunCommandScriptSource has a new optional parameter scriptUriManagedIdentity + - Interface VirtualMachineRunCommandUpdate has a new optional parameter errorBlobManagedIdentity + - Interface VirtualMachineRunCommandUpdate has a new optional parameter outputBlobManagedIdentity + - Interface VirtualMachineRunCommandUpdate has a new optional parameter treatFailureAsDeploymentFailure + - Interface VirtualMachineScaleSetsDeallocateOptionalParams has a new optional parameter hibernate + - Interface VirtualMachineScaleSetUpdate has a new optional parameter priorityMixPolicy + - Interface VirtualMachineScaleSetUpdate has a new optional parameter spotRestorePolicy + - Interface VirtualMachineScaleSetVMExtension has a new optional parameter location + - Interface VirtualMachineScaleSetVMExtension has a new optional parameter provisionAfterExtensions + - 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 + - Interface VirtualMachineScaleSetVMProfile has a new optional parameter securityPostureReference + - Interface VirtualMachinesListAllOptionalParams has a new optional parameter expand + - Interface VirtualMachinesListOptionalParams has a new optional parameter expand + - Interface WindowsVMGuestPatchAutomaticByPlatformSettings has a new optional parameter bypassPlatformSafetyChecksOnUserSchedule + - Added Enum KnownExpandTypeForListVMs + - Added Enum KnownExpandTypesForListVMs + - Added Enum KnownRestorePointEncryptionType + - Enum KnownStorageAccountType has a new value StandardSSDLRS -### Other Changes +**Breaking Changes** + - Type of parameter diskRestorePoint of interface RestorePointSourceVMDataDisk is changed from ApiEntityReference to DiskRestorePointAttributes + - Type of parameter diskRestorePoint of interface RestorePointSourceVmosDisk is changed from ApiEntityReference to DiskRestorePointAttributes + + ## 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..20457331cf0f 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3dae9445631a0e27d743c1355f8cb82391d1634f", + "commit": "27fa0cb959cb284c8b0f61a2c6801f3077bfeabf", "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.10", "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.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index eb2f2b710434..346624c78390 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": "21.0.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,10 +33,10 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -48,8 +48,7 @@ "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..c85fcd387063 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,15 +1370,16 @@ 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; + listAvailableSizes(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsListAvailableSizesOptionalParams): PagedAsyncIterableIterator; listByHostGroup(resourceGroupName: string, hostGroupName: string, options?: DedicatedHostsListByHostGroupOptionalParams): PagedAsyncIterableIterator; } @@ -1405,6 +1406,18 @@ export interface DedicatedHostsGetOptionalParams extends coreClient.OperationOpt // @public export type DedicatedHostsGetResponse = DedicatedHost; +// @public +export interface DedicatedHostSizeListResult { + value?: string[]; +} + +// @public +export interface DedicatedHostsListAvailableSizesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostsListAvailableSizesResponse = DedicatedHostSizeListResult; + // @public export interface DedicatedHostsListByHostGroupNextOptionalParams extends coreClient.OperationOptions { } @@ -1443,6 +1456,7 @@ export interface DedicatedHostUpdate extends UpdateResource { platformFaultDomain?: number; readonly provisioningState?: string; readonly provisioningTime?: Date; + sku?: Sku; readonly timeCreated?: Date; readonly virtualMachines?: SubResourceReadOnly[]; } @@ -1527,15 +1541,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 +1717,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; @@ -1849,6 +1863,12 @@ export interface DiskRestorePoint extends ProxyOnlyResource { readonly timeCreated?: Date; } +// @public +export interface DiskRestorePointAttributes extends SubResourceReadOnly { + encryption?: RestorePointEncryption; + sourceDiskRestorePoint?: ApiEntityReference; +} + // @public export interface DiskRestorePointGetOptionalParams extends coreClient.OperationOptions { } @@ -1893,9 +1913,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 +1935,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; @@ -2094,12 +2114,18 @@ export type EncryptionType = string; // @public export type ExecutionState = string; +// @public +export type ExpandTypeForListVMs = string; + // @public export type ExpandTypesForGetCapacityReservationGroups = string; // @public export type ExpandTypesForGetVMScaleSets = string; +// @public +export type ExpandTypesForListVMs = string; + // @public export interface ExtendedLocation { name?: string; @@ -2120,11 +2146,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 +2267,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 +2362,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 +2538,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 +2633,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 +2729,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 +2863,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; @@ -3201,6 +3227,11 @@ export enum KnownExecutionState { Unknown = "Unknown" } +// @public +export enum KnownExpandTypeForListVMs { + InstanceView = "instanceView" +} + // @public export enum KnownExpandTypesForGetCapacityReservationGroups { VirtualMachineScaleSetVMsRef = "virtualMachineScaleSetVMs/$ref", @@ -3212,6 +3243,11 @@ export enum KnownExpandTypesForGetVMScaleSets { UserData = "userData" } +// @public +export enum KnownExpandTypesForListVMs { + InstanceView = "instanceView" +} + // @public export enum KnownExtendedLocationType { EdgeZone = "EdgeZone" @@ -3459,6 +3495,13 @@ export enum KnownRestorePointCollectionExpandOptions { RestorePoints = "restorePoints" } +// @public +export enum KnownRestorePointEncryptionType { + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys", + EncryptionAtRestWithPlatformKey = "EncryptionAtRestWithPlatformKey" +} + // @public export enum KnownRestorePointExpandOptions { InstanceView = "instanceView" @@ -3526,6 +3569,7 @@ export enum KnownSnapshotStorageAccountTypes { export enum KnownStorageAccountType { PremiumLRS = "Premium_LRS", StandardLRS = "Standard_LRS", + StandardSSDLRS = "StandardSSD_LRS", StandardZRS = "Standard_ZRS" } @@ -3854,6 +3898,7 @@ export type LinuxVMGuestPatchAutomaticByPlatformRebootSetting = string; // @public export interface LinuxVMGuestPatchAutomaticByPlatformSettings { + bypassPlatformSafetyChecksOnUserSchedule?: boolean; rebootSetting?: LinuxVMGuestPatchAutomaticByPlatformRebootSetting; } @@ -3893,9 +3938,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; } @@ -4612,7 +4657,7 @@ export interface RestorePoint extends ProxyResource { excludeDisks?: ApiEntityReference[]; readonly instanceView?: RestorePointInstanceView; readonly provisioningState?: string; - readonly sourceMetadata?: RestorePointSourceMetadata; + sourceMetadata?: RestorePointSourceMetadata; sourceRestorePoint?: ApiEntityReference; timeCreated?: Date; } @@ -4636,7 +4681,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; @@ -4715,6 +4760,15 @@ export interface RestorePointCollectionUpdate extends UpdateResource { source?: RestorePointCollectionSourceProperties; } +// @public +export interface RestorePointEncryption { + diskEncryptionSet?: DiskEncryptionSetParameters; + type?: RestorePointEncryptionType; +} + +// @public +export type RestorePointEncryptionType = string; + // @public export type RestorePointExpandOptions = string; @@ -4726,9 +4780,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; } @@ -4758,36 +4812,39 @@ export type RestorePointsGetResponse = RestorePoint; // @public export interface RestorePointSourceMetadata { - diagnosticsProfile?: DiagnosticsProfile; - hardwareProfile?: HardwareProfile; - licenseType?: string; - location?: string; - osProfile?: OSProfile; - securityProfile?: SecurityProfile; + readonly diagnosticsProfile?: DiagnosticsProfile; + readonly hardwareProfile?: HardwareProfile; + readonly hyperVGeneration?: HyperVGenerationTypes; + readonly licenseType?: string; + readonly location?: string; + readonly osProfile?: OSProfile; + readonly securityProfile?: SecurityProfile; storageProfile?: RestorePointSourceVMStorageProfile; - userData?: string; - vmId?: string; + readonly userData?: string; + readonly vmId?: string; } // @public export interface RestorePointSourceVMDataDisk { - caching?: CachingTypes; - diskRestorePoint?: ApiEntityReference; - diskSizeGB?: number; - lun?: number; + readonly caching?: CachingTypes; + diskRestorePoint?: DiskRestorePointAttributes; + readonly diskSizeGB?: number; + readonly lun?: number; managedDisk?: ManagedDiskParameters; - name?: string; + readonly name?: string; + readonly writeAcceleratorEnabled?: boolean; } // @public export interface RestorePointSourceVmosDisk { - caching?: CachingTypes; - diskRestorePoint?: ApiEntityReference; - diskSizeGB?: number; - encryptionSettings?: DiskEncryptionSettings; + readonly caching?: CachingTypes; + diskRestorePoint?: DiskRestorePointAttributes; + readonly diskSizeGB?: number; + readonly encryptionSettings?: DiskEncryptionSettings; managedDisk?: ManagedDiskParameters; - name?: string; - osType?: OperatingSystemType; + readonly name?: string; + readonly osType?: OperatingSystemType; + readonly writeAcceleratorEnabled?: boolean; } // @public @@ -4928,6 +4985,12 @@ export interface RunCommandListResult { value: RunCommandDocumentBase[]; } +// @public +export interface RunCommandManagedIdentity { + clientId?: string; + objectId?: string; +} + // @public export interface RunCommandParameterDefinition { defaultValue?: string; @@ -4956,6 +5019,12 @@ export interface ScheduledEventsProfile { // @public export type SecurityEncryptionTypes = string; +// @public +export interface SecurityPostureReference { + excludeExtensions?: VirtualMachineExtension[]; + id?: string; +} + // @public export interface SecurityProfile { encryptionAtHost?: boolean; @@ -5218,15 +5287,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; @@ -5755,6 +5824,7 @@ export interface VirtualMachineExtension extends ResourceWithOptionalLocation { instanceView?: VirtualMachineExtensionInstanceView; protectedSettings?: any; protectedSettingsFromKeyVault?: KeyVaultSecretReference; + provisionAfterExtensions?: string[]; readonly provisioningState?: string; publisher?: string; settings?: any; @@ -5823,11 +5893,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; @@ -6169,8 +6239,10 @@ export interface VirtualMachineReimageParameters { // @public export interface VirtualMachineRunCommand extends Resource { asyncExecution?: boolean; + errorBlobManagedIdentity?: RunCommandManagedIdentity; errorBlobUri?: string; readonly instanceView?: VirtualMachineRunCommandInstanceView; + outputBlobManagedIdentity?: RunCommandManagedIdentity; outputBlobUri?: string; parameters?: RunCommandInputParameter[]; protectedParameters?: RunCommandInputParameter[]; @@ -6179,6 +6251,7 @@ export interface VirtualMachineRunCommand extends Resource { runAsUser?: string; source?: VirtualMachineRunCommandScriptSource; timeoutInSeconds?: number; + treatFailureAsDeploymentFailure?: boolean; } // @public @@ -6195,11 +6268,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; @@ -6221,6 +6294,7 @@ export interface VirtualMachineRunCommandScriptSource { commandId?: string; script?: string; scriptUri?: string; + scriptUriManagedIdentity?: RunCommandManagedIdentity; } // @public @@ -6291,8 +6365,10 @@ export type VirtualMachineRunCommandsUpdateResponse = VirtualMachineRunCommand; // @public export interface VirtualMachineRunCommandUpdate extends UpdateResource { asyncExecution?: boolean; + errorBlobManagedIdentity?: RunCommandManagedIdentity; errorBlobUri?: string; readonly instanceView?: VirtualMachineRunCommandInstanceView; + outputBlobManagedIdentity?: RunCommandManagedIdentity; outputBlobUri?: string; parameters?: RunCommandInputParameter[]; protectedParameters?: RunCommandInputParameter[]; @@ -6301,41 +6377,42 @@ export interface VirtualMachineRunCommandUpdate extends UpdateResource { runAsUser?: string; source?: VirtualMachineRunCommandScriptSource; timeoutInSeconds?: number; + treatFailureAsDeploymentFailure?: boolean; } // @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 +6508,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 +6611,7 @@ export interface VirtualMachineScaleSetInstanceViewStatusesSummary { } // @public -export interface VirtualMachineScaleSetIPConfiguration extends SubResource { +export interface VirtualMachineScaleSetIPConfiguration { applicationGatewayBackendAddressPools?: SubResource[]; applicationSecurityGroups?: SubResource[]; loadBalancerBackendAddressPools?: SubResource[]; @@ -6584,7 +6661,7 @@ export interface VirtualMachineScaleSetManagedDiskParameters { } // @public -export interface VirtualMachineScaleSetNetworkConfiguration extends SubResource { +export interface VirtualMachineScaleSetNetworkConfiguration { deleteOption?: DeleteOptions; disableTcpStateTracking?: boolean; dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; @@ -6661,11 +6738,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 +6774,35 @@ 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>>; + beginReapply(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReapplyOptionalParams): Promise, void>>; + beginReapplyAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReapplyOptionalParams): Promise; + 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; @@ -6754,6 +6833,7 @@ export type VirtualMachineScaleSetsCreateOrUpdateResponse = VirtualMachineScaleS // @public export interface VirtualMachineScaleSetsDeallocateOptionalParams extends coreClient.OperationOptions { + hibernate?: boolean; resumeFrom?: string; updateIntervalInMs?: number; vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; @@ -6900,6 +6980,18 @@ export interface VirtualMachineScaleSetsPowerOffOptionalParams extends coreClien vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; } +// @public +export interface VirtualMachineScaleSetsReapplyHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineScaleSetsReapplyOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface VirtualMachineScaleSetsRedeployOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -6973,16 +7065,18 @@ export interface VirtualMachineScaleSetUpdate extends UpdateResource { identity?: VirtualMachineScaleSetIdentity; overprovision?: boolean; plan?: Plan; + priorityMixPolicy?: PriorityMixPolicy; proximityPlacementGroup?: SubResource; scaleInPolicy?: ScaleInPolicy; singlePlacementGroup?: boolean; sku?: Sku; + spotRestorePolicy?: SpotRestorePolicy; upgradePolicy?: UpgradePolicy; virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; } // @public -export interface VirtualMachineScaleSetUpdateIPConfiguration extends SubResource { +export interface VirtualMachineScaleSetUpdateIPConfiguration { applicationGatewayBackendAddressPools?: SubResource[]; applicationSecurityGroups?: SubResource[]; loadBalancerBackendAddressPools?: SubResource[]; @@ -6995,7 +7089,7 @@ export interface VirtualMachineScaleSetUpdateIPConfiguration extends SubResource } // @public -export interface VirtualMachineScaleSetUpdateNetworkConfiguration extends SubResource { +export interface VirtualMachineScaleSetUpdateNetworkConfiguration { deleteOption?: DeleteOptions; disableTcpStateTracking?: boolean; dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; @@ -7100,9 +7194,11 @@ export interface VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; instanceView?: VirtualMachineExtensionInstanceView; + location?: string; readonly name?: string; protectedSettings?: any; protectedSettingsFromKeyVault?: KeyVaultSecretReference; + provisionAfterExtensions?: string[]; readonly provisioningState?: string; publisher?: string; settings?: any; @@ -7114,11 +7210,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 +7301,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; @@ -7242,6 +7342,7 @@ export interface VirtualMachineScaleSetVMProfile { osProfile?: VirtualMachineScaleSetOSProfile; priority?: VirtualMachinePriorityTypes; scheduledEventsProfile?: ScheduledEventsProfile; + securityPostureReference?: SecurityPostureReference; securityProfile?: SecurityProfile; serviceArtifactReference?: ServiceArtifactReference; storageProfile?: VirtualMachineScaleSetStorageProfile; @@ -7260,11 +7361,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 +7420,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; @@ -7572,6 +7673,7 @@ export type VirtualMachinesListAllNextResponse = VirtualMachineListResult; // @public export interface VirtualMachinesListAllOptionalParams extends coreClient.OperationOptions { + expand?: ExpandTypesForListVMs; filter?: string; statusOnly?: string; } @@ -7609,6 +7711,7 @@ export type VirtualMachinesListNextResponse = VirtualMachineListResult; // @public export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { + expand?: ExpandTypeForListVMs; filter?: string; } @@ -7821,6 +7924,7 @@ export type WindowsVMGuestPatchAutomaticByPlatformRebootSetting = string; // @public export interface WindowsVMGuestPatchAutomaticByPlatformSettings { + bypassPlatformSafetyChecksOnUserSchedule?: boolean; rebootSetting?: WindowsVMGuestPatchAutomaticByPlatformRebootSetting; } diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 17bdc7369edb..c4da3dbe4af3 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/21.0.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..dd03e7a76d6c 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -201,7 +201,7 @@ export interface RollingUpgradePolicy { /** The configuration parameters used for performing automatic OS upgrade. */ export interface AutomaticOSUpgradePolicy { - /** Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. */ + /** Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. */ enableAutomaticOSUpgrade?: boolean; /** Whether OS image rollback feature should be disabled. Default value is false. */ disableAutomaticRollback?: boolean; @@ -229,30 +229,32 @@ export interface VirtualMachineScaleSetVMProfile { networkProfile?: VirtualMachineScaleSetNetworkProfile; /** Specifies the Security related profile settings for the virtual machines in the scale set. */ securityProfile?: SecurityProfile; - /** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ + /** Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. */ diagnosticsProfile?: DiagnosticsProfile; /** Specifies a collection of settings for extensions installed on virtual machines in the scale set. */ extensionProfile?: VirtualMachineScaleSetExtensionProfile; /** Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 */ licenseType?: string; - /** Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview */ + /** Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview. */ priority?: VirtualMachinePriorityTypes; - /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ evictionPolicy?: VirtualMachineEvictionPolicyTypes; - /** Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. */ + /** Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. */ billingProfile?: BillingProfile; /** Specifies Scheduled Event related configurations. */ scheduledEventsProfile?: ScheduledEventsProfile; - /** UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 */ + /** UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. */ userData?: string; - /** Specifies the capacity reservation related details of a scale set.

Minimum api-version: 2021-04-01. */ + /** Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01. */ capacityReservation?: CapacityReservationProfile; /** Specifies the gallery applications that should be made available to the VM/VMSS */ applicationProfile?: ApplicationProfile; - /** Specifies the hardware profile related details of a scale set.

Minimum api-version: 2021-11-01. */ + /** Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. */ hardwareProfile?: VirtualMachineScaleSetHardwareProfile; /** Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01 */ serviceArtifactReference?: ServiceArtifactReference; + /** Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01 */ + securityPostureReference?: SecurityPostureReference; } /** Describes a virtual machine scale set OS profile. */ @@ -263,15 +265,15 @@ export interface VirtualMachineScaleSetOSProfile { adminUsername?: string; /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

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

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ adminPassword?: string; - /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ + /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ customData?: string; /** Specifies Windows operating system settings on the virtual machine. */ windowsConfiguration?: WindowsConfiguration; - /** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ + /** Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ linuxConfiguration?: LinuxConfiguration; /** Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). */ secrets?: VaultSecretGroup[]; - /** Specifies whether extension operations should be allowed on the virtual machine scale set.

This may only be set to False when no extensions are present on the virtual machine scale set. */ + /** Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set. */ allowExtensionOperations?: boolean; /** Optional property which must either be set to True or omitted. */ requireGuestProvisionSignal?: boolean; @@ -279,11 +281,11 @@ export interface VirtualMachineScaleSetOSProfile { /** Specifies Windows operating system settings on the virtual machine. */ export interface WindowsConfiguration { - /** Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ + /** Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ provisionVMAgent?: boolean; - /** Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.

For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. */ + /** Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. */ enableAutomaticUpdates?: boolean; - /** Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). */ + /** Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). */ timeZone?: string; /** Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. */ additionalUnattendContent?: AdditionalUnattendContent[]; @@ -323,6 +325,8 @@ export interface PatchSettings { export interface WindowsVMGuestPatchAutomaticByPlatformSettings { /** Specifies the reboot setting for all AutomaticByPlatform patch installation operations. */ rebootSetting?: WindowsVMGuestPatchAutomaticByPlatformRebootSetting; + /** Enables customer to schedule patching without accidental upgrades */ + bypassPlatformSafetyChecksOnUserSchedule?: boolean; } /** Describes Windows Remote Management configuration of the VM */ @@ -333,19 +337,19 @@ export interface WinRMConfiguration { /** Describes Protocol and thumbprint of Windows Remote Management listener */ export interface WinRMListener { - /** Specifies the protocol of WinRM listener.

Possible values are:
**http**

**https** */ + /** Specifies the protocol of WinRM listener. Possible values are: **http,** **https.** */ protocol?: ProtocolTypes; - /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). */ + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). */ certificateUrl?: string; } -/** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ +/** Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ export interface LinuxConfiguration { /** Specifies whether password authentication should be disabled. */ disablePasswordAuthentication?: boolean; /** Specifies the ssh key configuration for a Linux OS. */ ssh?: SshConfiguration; - /** Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ + /** Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ provisionVMAgent?: boolean; /** [Preview Feature] Specifies settings related to VM Guest Patching on Linux. */ patchSettings?: LinuxPatchSettings; @@ -363,7 +367,7 @@ export interface SshConfiguration { export interface SshPublicKey { /** Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys */ path?: string; - /** SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ + /** SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ keyData?: string; } @@ -381,6 +385,8 @@ export interface LinuxPatchSettings { export interface LinuxVMGuestPatchAutomaticByPlatformSettings { /** Specifies the reboot setting for all AutomaticByPlatform patch installation operations. */ rebootSetting?: LinuxVMGuestPatchAutomaticByPlatformRebootSetting; + /** Enables customer to schedule patching without accidental upgrades */ + bypassPlatformSafetyChecksOnUserSchedule?: boolean; } /** Describes a set of certificates which are all in the same Key Vault. */ @@ -400,7 +406,7 @@ export interface SubResource { export interface VaultCertificate { /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). */ certificateUrl?: string; - /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. */ + /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. */ certificateStore?: string; } @@ -408,9 +414,9 @@ export interface VaultCertificate { export interface VirtualMachineScaleSetStorageProfile { /** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. */ imageReference?: ImageReference; - /** Specifies information about the operating system disk used by the virtual machines in the scale set.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + /** Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ osDisk?: VirtualMachineScaleSetOSDisk; - /** Specifies the parameters that are used to add data disks to the virtual machines in the scale set.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + /** Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ dataDisks?: VirtualMachineScaleSetDataDisk[]; diskControllerType?: string; } @@ -419,17 +425,17 @@ export interface VirtualMachineScaleSetStorageProfile { export interface VirtualMachineScaleSetOSDisk { /** The disk name. */ name?: string; - /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + /** Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** */ caching?: CachingTypes; /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ writeAcceleratorEnabled?: boolean; - /** Specifies how the virtual machines in the scale set should be created.

The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + /** Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ createOption: DiskCreateOptionTypes; /** Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. */ diffDiskSettings?: DiffDiskSettings; - /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023 */ + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ diskSizeGB?: number; - /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ osType?: OperatingSystemTypes; /** Specifies information about the unmanaged user image to base the scale set on. */ image?: VirtualHardDisk; @@ -441,11 +447,11 @@ export interface VirtualMachineScaleSetOSDisk { deleteOption?: DiskDeleteOptionTypes; } -/** Describes the parameters of ephemeral disk settings that can be specified for operating system disk.

NOTE: The ephemeral disk settings can only be specified for managed disk. */ +/** Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk. */ export interface DiffDiskSettings { /** Specifies the ephemeral disk settings for operating system disk. */ option?: DiffDiskOptions; - /** Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. */ + /** Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. */ placement?: DiffDiskPlacement; } @@ -465,9 +471,9 @@ export interface VirtualMachineScaleSetManagedDiskParameters { securityProfile?: VMDiskSecurityProfile; } -/** Specifies the security profile settings for the managed disk.

NOTE: It can only be set for Confidential VMs */ +/** Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. */ export interface VMDiskSecurityProfile { - /** Specifies the EncryptionType of the managed disk.
It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob.

NOTE: It can be set for only Confidential VMs. */ + /** Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. */ securityEncryptionType?: SecurityEncryptionTypes; /** Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. */ diskEncryptionSet?: DiskEncryptionSetParameters; @@ -479,13 +485,13 @@ export interface VirtualMachineScaleSetDataDisk { name?: string; /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. */ lun: number; - /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + /** Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** */ caching?: CachingTypes; /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ writeAcceleratorEnabled?: boolean; /** The create option. */ createOption: DiskCreateOptionTypes; - /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023 */ + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ diskSizeGB?: number; /** The managed disk parameters. */ managedDisk?: VirtualMachineScaleSetManagedDiskParameters; @@ -513,12 +519,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. */ @@ -563,33 +615,33 @@ export interface PublicIPAddressSku { /** Specifies the Security profile settings for the virtual machine or virtual machine scale set. */ export interface SecurityProfile { - /** Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

Minimum api-version: 2020-12-01 */ + /** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. */ uefiSettings?: UefiSettings; - /** This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself.

Default: The Encryption at host will be disabled unless this property is set to true for the resource. */ + /** This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource. */ encryptionAtHost?: boolean; - /** Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.

Default: UefiSettings will not be enabled unless this property is set. */ + /** Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. */ securityType?: SecurityTypes; } -/** Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

Minimum api-version: 2020-12-01 */ +/** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. */ export interface UefiSettings { - /** Specifies whether secure boot should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 */ + /** Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01. */ secureBootEnabled?: boolean; - /** Specifies whether vTPM should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 */ + /** Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01. */ vTpmEnabled?: boolean; } -/** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ +/** Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. */ export interface DiagnosticsProfile { - /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. */ bootDiagnostics?: BootDiagnostics; } -/** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ +/** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. */ export interface BootDiagnostics { /** Whether boot diagnostics should be enabled on the Virtual Machine. */ enabled?: boolean; - /** Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. */ + /** Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used. */ storageUri?: string; } @@ -597,7 +649,7 @@ export interface BootDiagnostics { export interface VirtualMachineScaleSetExtensionProfile { /** The virtual machine scale set child extension resources. */ extensions?: VirtualMachineScaleSetExtension[]; - /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 */ + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. */ extensionsTimeBudget?: string; } @@ -617,7 +669,7 @@ export interface SubResourceReadOnly { readonly id?: string; } -/** Specifies the billing related details of a Azure Spot VM or VMSS.

Minimum api-version: 2019-03-01. */ +/** Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01. */ export interface BillingProfile { /** Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. */ maxPrice?: number; @@ -638,7 +690,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; @@ -674,15 +726,15 @@ export interface VMGalleryApplication { /** Specifies the hardware settings for the virtual machine scale set. */ export interface VirtualMachineScaleSetHardwareProfile { - /** Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01.

Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. */ + /** Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. */ vmSizeProperties?: VMSizeProperties; } /** Specifies VM Size Property settings on the virtual machine. */ export interface VMSizeProperties { - /** Specifies the number of vCPUs available for the VM.

When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . */ + /** Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). */ vCPUsAvailable?: number; - /** Specifies the vCPU to physical core ratio.

When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)

Setting this property to 1 also means that hyper-threading is disabled. */ + /** Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.** */ vCPUsPerCore?: number; } @@ -692,6 +744,65 @@ export interface ServiceArtifactReference { id?: string; } +/** Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01 */ +export interface SecurityPostureReference { + /** The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest */ + id?: string; + /** List of virtual machine extensions to exclude when applying the Security Posture. */ + excludeExtensions?: VirtualMachineExtension[]; +} + +/** The instance view of a virtual machine extension. */ +export interface VirtualMachineExtensionInstanceView { + /** The virtual machine extension name. */ + name?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** The resource status information. */ + substatuses?: InstanceViewStatus[]; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; +} + +/** Instance view status. */ +export interface InstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** The Resource model definition with location property as optional. */ +export interface ResourceWithOptionalLocation { + /** Resource location */ + location?: string; + /** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + /** Enables or disables a capability on the virtual machine or virtual machine scale set. */ export interface AdditionalCapabilities { /** The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. */ @@ -708,7 +819,7 @@ export interface ScaleInPolicy { forceDeletion?: boolean; } -/** Specifies the Spot-Try-Restore properties for the virtual machine scale set.

With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. */ +/** Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. */ export interface SpotRestorePolicy { /** Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints */ enabled?: boolean; @@ -716,7 +827,7 @@ export interface SpotRestorePolicy { restoreTimeout?: string; } -/** Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode.

With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached. */ +/** Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached. */ export interface PriorityMixPolicy { /** The base number of regular priority VMs that will be created in this scale set as it scales out. */ baseRegularPriorityCount?: number; @@ -804,13 +915,13 @@ export interface VirtualMachineScaleSetUpdateVMProfile { extensionProfile?: VirtualMachineScaleSetExtensionProfile; /** The license type, which is for bring your own license scenario. */ licenseType?: string; - /** Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. */ + /** Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. */ billingProfile?: BillingProfile; /** Specifies Scheduled Event related configurations. */ scheduledEventsProfile?: ScheduledEventsProfile; /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 */ userData?: string; - /** Specifies the hardware profile related details of a scale set.

Minimum api-version: 2021-11-01. */ + /** Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. */ hardwareProfile?: VirtualMachineScaleSetHardwareProfile; } @@ -865,6 +976,52 @@ export interface VirtualMachineScaleSetUpdateNetworkProfile { networkApiVersion?: NetworkApiVersion; } +/** Describes a virtual machine scale set network profile's network configurations. */ +export interface VirtualMachineScaleSetUpdateNetworkConfiguration { + /** The network configuration name. */ + name?: string; + /** Whether this is a primary NIC on a virtual machine. */ + 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; + /** The virtual machine scale set IP Configuration. */ + ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; + /** 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 { + /** The IP configuration name. */ + name?: string; + /** The subnet. */ + subnet?: ApiEntityReference; + /** Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. */ + primary?: boolean; + /** The publicIPAddressConfiguration. */ + publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; + /** 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; + /** The application gateway backend address pools. */ + applicationGatewayBackendAddressPools?: SubResource[]; + /** Specifies an array of references to application security group. */ + applicationSecurityGroups?: SubResource[]; + /** The load balancer backend address pools. */ + loadBalancerBackendAddressPools?: SubResource[]; + /** The load balancer inbound nat pools. */ + loadBalancerInboundNatPools?: SubResource[]; +} + /** Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { /** The publicIP address configuration name. */ @@ -955,20 +1112,6 @@ export interface VirtualMachineScaleSetVMExtensionsSummary { readonly statusesSummary?: VirtualMachineStatusCodeCount[]; } -/** Instance view status. */ -export interface InstanceViewStatus { - /** The status code. */ - code?: string; - /** The level code. */ - level?: StatusLevelTypes; - /** The short localizable label for the status. */ - displayStatus?: string; - /** The detailed status message, including for alerts and error messages. */ - message?: string; - /** The time of the status. */ - time?: Date; -} - /** Summary for an orchestration service of a virtual machine scale set. */ export interface OrchestrationServiceSummary { /** @@ -1187,7 +1330,7 @@ export interface VirtualMachineReimageParameters { export interface OSProfileProvisioningData { /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

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

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ adminPassword?: string; - /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ + /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). */ customData?: string; } @@ -1242,20 +1385,6 @@ export interface OrchestrationServiceStateInput { action: OrchestrationServiceStateAction; } -/** The instance view of a virtual machine extension. */ -export interface VirtualMachineExtensionInstanceView { - /** The virtual machine extension name. */ - name?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** The resource status information. */ - substatuses?: InstanceViewStatus[]; - /** The resource status information. */ - statuses?: InstanceViewStatus[]; -} - /** The List VMSS VM Extension operation response */ export interface VirtualMachineScaleSetVMExtensionsListResult { /** The list of VMSS VM extensions */ @@ -1283,17 +1412,25 @@ export interface VirtualMachineScaleSetVMInstanceView { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vmHealth?: VirtualMachineHealthStatus; - /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. */ bootDiagnostics?: BootDiagnosticsInstanceView; /** The resource status information. */ statuses?: InstanceViewStatus[]; /** - * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ 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. */ @@ -1374,17 +1511,17 @@ export interface VirtualMachineHealthStatus { /** The instance view of a virtual machine boot diagnostics. */ export interface BootDiagnosticsInstanceView { /** - * The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + * The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly consoleScreenshotBlobUri?: string; /** - * The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + * The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serialConsoleLogBlobUri?: string; /** - * The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + * The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: InstanceViewStatus; @@ -1392,9 +1529,9 @@ export interface BootDiagnosticsInstanceView { /** Specifies the hardware settings for the virtual machine. */ export interface HardwareProfile { - /** Specifies the size of the virtual machine.

The enum data type is currently deprecated and will be removed by December 23rd 2023.

Recommended way to get the list of available sizes is using these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. */ + /** Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. */ vmSize?: VirtualMachineSizeTypes; - /** Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet.

Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. */ + /** Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. */ vmSizeProperties?: VMSizeProperties; } @@ -1402,19 +1539,19 @@ export interface HardwareProfile { export interface StorageProfile { /** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. */ imageReference?: ImageReference; - /** Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + /** Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ osDisk?: OSDisk; - /** Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + /** Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ dataDisks?: DataDisk[]; - /** Specifies the disk controller type configured for the VM.

NOTE: This property will be set to the default disk controller type if not specified provided virtual machine is being created as a hyperVGeneration: V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version.
You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM.

Minimum api-version: 2022-08-01 */ + /** Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. */ diskControllerType?: DiskControllerTypes; } -/** Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ +/** Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ export interface OSDisk { - /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ osType?: OperatingSystemTypes; - /** Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 */ + /** Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15. */ encryptionSettings?: DiskEncryptionSettings; /** The disk name. */ name?: string; @@ -1422,19 +1559,19 @@ export interface OSDisk { vhd?: VirtualHardDisk; /** The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ image?: VirtualHardDisk; - /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. **ReadOnly** for Premium storage. */ + /** Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.** */ caching?: CachingTypes; /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ writeAcceleratorEnabled?: boolean; /** Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. */ diffDiskSettings?: DiffDiskSettings; - /** Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + /** Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. */ createOption: DiskCreateOptionTypes; - /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023 */ + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ diskSizeGB?: number; /** The managed disk parameters. */ managedDisk?: ManagedDiskParameters; - /** Specifies whether OS Disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the OS disk is deleted when VM is deleted.

**Detach** If this value is used, the os disk is retained after VM is deleted.

The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. */ + /** Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk. */ deleteOption?: DiskDeleteOptionTypes; } @@ -1448,13 +1585,13 @@ export interface DataDisk { vhd?: VirtualHardDisk; /** The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ image?: VirtualHardDisk; - /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + /** Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.** */ caching?: CachingTypes; /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ writeAcceleratorEnabled?: boolean; - /** Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + /** Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. */ createOption: DiskCreateOptionTypes; - /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023 */ + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ diskSizeGB?: number; /** The managed disk parameters. */ managedDisk?: ManagedDiskParameters; @@ -1470,29 +1607,29 @@ export interface DataDisk { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly diskMBpsReadWrite?: number; - /** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.

detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ + /** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ detachOption?: DiskDetachOptionTypes; - /** Specifies whether data disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the data disk is deleted when VM is deleted.

**Detach** If this value is used, the data disk is retained after VM is deleted.

The default value is set to **detach** */ + /** Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. */ deleteOption?: DiskDeleteOptionTypes; } /** Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. */ export interface OSProfile { - /** 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/azure-resource-manager/management/resource-name-rules). */ + /** 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/azure-resource-manager/management/resource-name-rules). */ computerName?: string; /** Specifies the name of the administrator account.

This property cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

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

**Max-length (Windows):** 20 characters. */ adminUsername?: string; /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

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

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ adminPassword?: string; - /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ + /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). */ customData?: string; /** Specifies Windows operating system settings on the virtual machine. */ windowsConfiguration?: WindowsConfiguration; - /** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ + /** Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ linuxConfiguration?: LinuxConfiguration; /** Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). */ secrets?: VaultSecretGroup[]; - /** Specifies whether extension operations should be allowed on the virtual machine.

This may only be set to False when no extensions are present on the virtual machine. */ + /** Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. */ allowExtensionOperations?: boolean; /** Optional property which must either be set to True or omitted. */ requireGuestProvisionSignal?: boolean; @@ -1609,29 +1746,6 @@ export interface VirtualMachineScaleSetVMProtectionPolicy { protectFromScaleSetActions?: boolean; } -/** The Resource model definition with location property as optional. */ -export interface ResourceWithOptionalLocation { - /** Resource location */ - location?: string; - /** - * Resource Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - /** Identity for the virtual machine. */ export interface VirtualMachineIdentity { /** @@ -1717,10 +1831,10 @@ export interface VirtualMachineInstanceView { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vmHealth?: VirtualMachineHealthStatus; - /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. */ bootDiagnostics?: BootDiagnosticsInstanceView; /** - * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly assignedHost?: string; @@ -2215,9 +2329,9 @@ export interface DedicatedHostAllocatableVM { count?: number; } -/** Enables or disables a capability on the dedicated host group.

Minimum api-version: 2022-03-01. */ +/** Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. */ export interface DedicatedHostGroupPropertiesAdditionalCapabilities { - /** The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature.

NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal.

Minimum api-version: 2022-03-01. */ + /** The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. */ ultraSSDEnabled?: boolean; } @@ -2237,6 +2351,12 @@ export interface DedicatedHostListResult { nextLink?: string; } +/** The List Dedicated Host sizes operation response. */ +export interface DedicatedHostSizeListResult { + /** The list of dedicated host sizes. */ + value?: string[]; +} + /** The list SSH public keys operation response. */ export interface SshPublicKeysGroupListResult { /** The list of SSH public keys */ @@ -2273,9 +2393,9 @@ export interface ImageDisk { managedDisk?: SubResource; /** The Virtual Hard Disk. */ blobUri?: string; - /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + /** Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** */ caching?: CachingTypes; - /** Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + /** Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. */ diskSizeGB?: number; /** Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. */ storageAccountType?: StorageAccountTypes; @@ -2304,24 +2424,53 @@ export interface RestorePointCollectionSourceProperties { /** Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation. */ export interface RestorePointSourceMetadata { - /** Gets the hardware profile. */ - hardwareProfile?: HardwareProfile; + /** + * Gets the hardware profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hardwareProfile?: HardwareProfile; /** Gets the storage profile. */ storageProfile?: RestorePointSourceVMStorageProfile; - /** Gets the OS profile. */ - osProfile?: OSProfile; - /** Gets the diagnostics profile. */ - diagnosticsProfile?: DiagnosticsProfile; - /** Gets the license type, which is for bring your own license scenario. */ - licenseType?: string; - /** Gets the virtual machine unique id. */ - vmId?: string; - /** Gets the security profile. */ - securityProfile?: SecurityProfile; - /** Location of the VM from which the restore point was created. */ - location?: string; - /** UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. */ - userData?: string; + /** + * Gets the OS profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osProfile?: OSProfile; + /** + * Gets the diagnostics profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diagnosticsProfile?: DiagnosticsProfile; + /** + * Gets the license type, which is for bring your own license scenario. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly licenseType?: string; + /** + * Gets the virtual machine unique id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmId?: string; + /** + * Gets the security profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly securityProfile?: SecurityProfile; + /** + * Location of the VM from which the restore point was created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userData?: string; + /** + * HyperVGeneration of the source VM for which restore point is captured. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hyperVGeneration?: HyperVGenerationTypes; } /** Describes the storage profile. */ @@ -2334,36 +2483,81 @@ export interface RestorePointSourceVMStorageProfile { /** Describes an Operating System disk. */ export interface RestorePointSourceVmosDisk { - /** Gets the Operating System type. */ - osType?: OperatingSystemType; - /** Gets the disk encryption settings. */ - encryptionSettings?: DiskEncryptionSettings; - /** Gets the disk name. */ - name?: string; - /** Gets the caching type. */ - caching?: CachingTypes; - /** Gets the disk size in GB. */ - diskSizeGB?: number; + /** + * Gets the Operating System type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: OperatingSystemType; + /** + * Gets the disk encryption settings. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly encryptionSettings?: DiskEncryptionSettings; + /** + * Gets the disk name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets the caching type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly caching?: CachingTypes; + /** + * Gets the disk size in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diskSizeGB?: number; /** Gets the managed disk details */ managedDisk?: ManagedDiskParameters; - /** Gets the disk restore point Id. */ - diskRestorePoint?: ApiEntityReference; + /** Contains Disk Restore Point properties. */ + diskRestorePoint?: DiskRestorePointAttributes; + /** + * Shows true if the disk is write-accelerator enabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly writeAcceleratorEnabled?: boolean; +} + +/** Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. */ +export interface RestorePointEncryption { + /** 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. */ + diskEncryptionSet?: DiskEncryptionSetParameters; + /** The type of key used to encrypt the data of the disk restore point. */ + type?: RestorePointEncryptionType; } /** Describes a data disk. */ export interface RestorePointSourceVMDataDisk { - /** Gets the logical unit number. */ - lun?: number; - /** Gets the disk name. */ - name?: string; - /** Gets the caching type. */ - caching?: CachingTypes; - /** Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. */ - diskSizeGB?: number; - /** Gets the managed disk details */ + /** + * Gets the logical unit number. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lun?: number; + /** + * Gets the disk name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets the caching type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly caching?: CachingTypes; + /** + * Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diskSizeGB?: number; + /** Contains the managed disk details. */ managedDisk?: ManagedDiskParameters; - /** Gets the disk restore point Id. */ - diskRestorePoint?: ApiEntityReference; + /** Contains Disk Restore Point properties. */ + diskRestorePoint?: DiskRestorePointAttributes; + /** + * Shows true if the disk is write-accelerator enabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly writeAcceleratorEnabled?: boolean; } /** The instance view of a restore point. */ @@ -2436,7 +2630,7 @@ export interface CapacityReservationInstanceView { /** Represents the capacity reservation utilization in terms of resources allocated. */ export interface CapacityReservationUtilization { /** - * The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed.

Minimum api-version: 2022-08-01. + * The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentCapacity?: number; @@ -2558,14 +2752,24 @@ export interface RunCommandResult { value?: InstanceViewStatus[]; } -/** Describes the script sources for run command. */ +/** Describes the script sources for run command. Use only one of script, scriptUri, commandId. */ export interface VirtualMachineRunCommandScriptSource { /** Specifies the script content to be executed on the VM. */ script?: string; - /** Specifies the script download location. */ + /** Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. */ scriptUri?: string; /** Specifies a commandId of predefined built-in script. */ commandId?: string; + /** User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +/** Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ +export interface RunCommandManagedIdentity { + /** Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. */ + clientId?: string; + /** Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. */ + objectId?: string; } /** The instance view of a virtual machine run command. */ @@ -4422,148 +4626,53 @@ export interface OSFamilyListResult { /** The list of resources. */ value: OSFamily[]; /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ - nextLink?: string; -} - -/** The source image from which the Image Version is going to be created. */ -export interface GalleryArtifactSource { - /** The managed artifact. */ - managedImage: ManagedArtifact; -} - -/** The managed artifact. */ -export interface ManagedArtifact { - /** The managed artifact id. */ - id: string; -} - -/** The gallery image version with latest version in a particular region. */ -export interface LatestGalleryImageVersion { - /** The name of the latest version in the region. */ - latestVersionName?: string; - /** region of the Gallery Image Version. */ - location?: string; -} - -/** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. */ -export interface ImageReference extends SubResource { - /** The image publisher. */ - publisher?: string; - /** Specifies the offer of the platform image or marketplace image used to create the virtual machine. */ - offer?: string; - /** The image SKU. */ - sku?: string; - /** Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input. */ - version?: string; - /** - * Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly exactVersion?: string; - /** Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. */ - sharedGalleryImageId?: string; - /** Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call. */ - communityGalleryImageId?: string; -} - -/** 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; + nextLink?: string; } -/** 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 { - /** The IP configuration name. */ - name?: string; - /** The subnet. */ - subnet?: ApiEntityReference; - /** Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. */ - primary?: boolean; - /** The publicIPAddressConfiguration. */ - publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; - /** 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; - /** The application gateway backend address pools. */ - applicationGatewayBackendAddressPools?: SubResource[]; - /** Specifies an array of references to application security group. */ - applicationSecurityGroups?: SubResource[]; - /** The load balancer backend address pools. */ - loadBalancerBackendAddressPools?: SubResource[]; - /** The load balancer inbound nat pools. */ - loadBalancerInboundNatPools?: SubResource[]; +/** The source image from which the Image Version is going to be created. */ +export interface GalleryArtifactSource { + /** The managed artifact. */ + managedImage: ManagedArtifact; } -/** Describes a virtual machine scale set network profile's network configurations. */ -export interface VirtualMachineScaleSetUpdateNetworkConfiguration - extends SubResource { - /** The network configuration name. */ - name?: string; - /** Whether this is a primary NIC on a virtual machine. */ - 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; - /** The virtual machine scale set IP Configuration. */ - ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; - /** Whether IP forwarding enabled on this NIC. */ - enableIPForwarding?: boolean; - /** Specify what happens to the network interface when the VM is deleted */ - deleteOption?: DeleteOptions; +/** The managed artifact. */ +export interface ManagedArtifact { + /** The managed artifact id. */ + id: string; +} + +/** The gallery image version with latest version in a particular region. */ +export interface LatestGalleryImageVersion { + /** The name of the latest version in the region. */ + latestVersionName?: string; + /** region of the Gallery Image Version. */ + location?: string; +} + +/** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. */ +export interface ImageReference extends SubResource { + /** The image publisher. */ + publisher?: string; + /** Specifies the offer of the platform image or marketplace image used to create the virtual machine. */ + offer?: string; + /** The image SKU. */ + sku?: string; + /** Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input. */ + version?: string; + /** + * Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly exactVersion?: string; + /** Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. */ + sharedGalleryImageId?: string; + /** Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call. */ + communityGalleryImageId?: string; } +/** 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 {} + /** The parameters of a managed disk. */ export interface ManagedDiskParameters extends SubResource { /** Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. */ @@ -4715,6 +4824,8 @@ export interface VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** The location of the extension. */ + location?: string; /** How the extension handler should be forced to update even if the extension configuration has not changed. */ forceUpdateTag?: string; /** The name of the extension handler publisher. */ @@ -4742,6 +4853,8 @@ export interface VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { suppressFailures?: boolean; /** The extensions protected settings that are passed by reference, and consumed from key vault */ protectedSettingsFromKeyVault?: KeyVaultSecretReference; + /** Collection of extension names after which this extension needs to be provisioned. */ + provisionAfterExtensions?: string[]; } /** Describes a VMSS VM Extension. */ @@ -4779,6 +4892,47 @@ export interface VirtualMachineScaleSetVMExtensionUpdate protectedSettingsFromKeyVault?: KeyVaultSecretReference; } +/** Disk Restore Point details. */ +export interface DiskRestorePointAttributes extends SubResourceReadOnly { + /** Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. */ + encryption?: RestorePointEncryption; + /** Resource Id of the source disk restore point. */ + sourceDiskRestorePoint?: ApiEntityReference; +} + +/** Describes a Virtual Machine Extension. */ +export interface VirtualMachineExtension extends ResourceWithOptionalLocation { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: any; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: any; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The virtual machine extension instance view. */ + instanceView?: VirtualMachineExtensionInstanceView; + /** Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. */ + suppressFailures?: boolean; + /** The extensions protected settings that are passed by reference, and consumed from key vault */ + protectedSettingsFromKeyVault?: KeyVaultSecretReference; + /** Collection of extension names after which this extension needs to be provisioned. */ + provisionAfterExtensions?: string[]; +} + /** Describes a Virtual Machine Scale Set. */ export interface VirtualMachineScaleSet extends Resource { /** The virtual machine scale set sku. */ @@ -4817,9 +4971,9 @@ export interface VirtualMachineScaleSet extends Resource { zoneBalance?: boolean; /** Fault Domain count for each placement group. */ platformFaultDomainCount?: number; - /** Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. */ + /** Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; - /** Specifies information about the dedicated host group that the virtual machine scale set resides in.

Minimum api-version: 2020-06-01. */ + /** Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01. */ hostGroup?: SubResource; /** Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. */ additionalCapabilities?: AdditionalCapabilities; @@ -4832,7 +4986,7 @@ export interface VirtualMachineScaleSet extends Resource { /** Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. */ priorityMixPolicy?: PriorityMixPolicy; /** - * Specifies the time at which the Virtual Machine Scale Set resource was created.

Minimum api-version: 2021-11-01. + * Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -4919,9 +5073,9 @@ export interface VirtualMachineScaleSetVM extends Resource { networkProfile?: NetworkProfile; /** Specifies the network profile configuration of the virtual machine. */ networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; - /** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ + /** Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. */ diagnosticsProfile?: DiagnosticsProfile; - /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. */ + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. */ availabilitySet?: SubResource; /** * The provisioning state, which only appears in the response. @@ -4968,23 +5122,23 @@ export interface VirtualMachine extends Resource { networkProfile?: NetworkProfile; /** Specifies the Security related profile settings for the virtual machine. */ securityProfile?: SecurityProfile; - /** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ + /** Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. */ diagnosticsProfile?: DiagnosticsProfile; - /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ availabilitySet?: SubResource; - /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

This property cannot exist along with a non-null properties.availabilitySet reference.

Minimum api‐version: 2019‐03‐01 */ + /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. */ virtualMachineScaleSet?: SubResource; - /** Specifies information about the proximity placement group that the virtual machine should be assigned to.

Minimum api-version: 2018-04-01. */ + /** Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; - /** Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01 */ + /** Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01 */ priority?: VirtualMachinePriorityTypes; - /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ evictionPolicy?: VirtualMachineEvictionPolicyTypes; - /** Specifies the billing related details of a Azure Spot virtual machine.

Minimum api-version: 2019-03-01. */ + /** Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. */ billingProfile?: BillingProfile; - /** Specifies information about the dedicated host that the virtual machine resides in.

Minimum api-version: 2018-10-01. */ + /** Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. */ host?: SubResource; - /** Specifies information about the dedicated host group that the virtual machine resides in.

Minimum api-version: 2020-06-01.

NOTE: User cannot specify both host and hostGroup properties. */ + /** Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. */ hostGroup?: SubResource; /** * The provisioning state, which only appears in the response. @@ -5003,20 +5157,20 @@ export interface VirtualMachine extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vmId?: string; - /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 */ + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. */ extensionsTimeBudget?: string; - /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
  • This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 */ + /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. */ platformFaultDomain?: number; /** Specifies Scheduled Event related configurations. */ scheduledEventsProfile?: ScheduledEventsProfile; - /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 */ + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. */ userData?: string; - /** Specifies information about the capacity reservation that is used to allocate virtual machine.

    Minimum api-version: 2021-04-01. */ + /** Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. */ capacityReservation?: CapacityReservationProfile; - /** Specifies the gallery applications that should be made available to the VM/VMSS */ + /** Specifies the gallery applications that should be made available to the VM/VMSS. */ applicationProfile?: ApplicationProfile; /** - * Specifies the time at which the Virtual Machine resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5036,7 +5190,7 @@ export interface VirtualMachineExtensionImage extends Resource { supportsMultipleExtensions?: boolean; } -/** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. */ +/** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set. */ export interface AvailabilitySet extends Resource { /** Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. */ sku?: Sku; @@ -5046,7 +5200,7 @@ export interface AvailabilitySet extends Resource { platformFaultDomainCount?: number; /** A list of references to all virtual machines in the availability set. */ virtualMachines?: SubResource[]; - /** Specifies information about the proximity placement group that the availability set should be assigned to.

    Minimum api-version: 2018-04-01. */ + /** Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; /** * The resource status information. @@ -5059,7 +5213,7 @@ export interface AvailabilitySet extends Resource { export interface ProximityPlacementGroup extends Resource { /** Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. */ zones?: string[]; - /** Specifies the type of the proximity placement group.

    Possible values are:

    **Standard** : Co-locate resources within an Azure region or Availability Zone.

    **Ultra** : For future use. */ + /** Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. */ proximityPlacementGroupType?: ProximityPlacementGroupType; /** * A list of references to all virtual machines in the proximity placement group. @@ -5082,7 +5236,7 @@ export interface ProximityPlacementGroup extends Resource { intent?: ProximityPlacementGroupPropertiesIntent; } -/** Specifies information about the dedicated host group that the dedicated hosts should be assigned to.

    Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. */ +/** Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. */ export interface DedicatedHostGroup extends Resource { /** Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. */ zones?: string[]; @@ -5098,9 +5252,9 @@ export interface DedicatedHostGroup extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instanceView?: DedicatedHostGroupInstanceView; - /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

    Minimum api-version: 2020-06-01. */ + /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. */ supportAutomaticPlacement?: boolean; - /** Enables or disables a capability on the dedicated host group.

    Minimum api-version: 2022-03-01. */ + /** Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. */ additionalCapabilities?: DedicatedHostGroupPropertiesAdditionalCapabilities; } @@ -5113,7 +5267,7 @@ export interface DedicatedHost extends Resource { /** Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. */ autoReplaceOnFailure?: boolean; /** - * A unique id generated and assigned to the dedicated host by the platform.

    Does not change throughout the lifetime of the host. + * A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly hostId?: string; @@ -5122,7 +5276,7 @@ export interface DedicatedHost extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly virtualMachines?: SubResourceReadOnly[]; - /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

    Possible values are:

    **None**

    **Windows_Server_Hybrid**

    **Windows_Server_Perpetual**

    Default: **None** */ + /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.** */ licenseType?: DedicatedHostLicenseTypes; /** * The date when the host was first provisioned. @@ -5140,7 +5294,7 @@ export interface DedicatedHost extends Resource { */ readonly instanceView?: DedicatedHostInstanceView; /** - * Specifies the time at which the Dedicated Host resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5190,7 +5344,7 @@ export interface RestorePointCollection extends Resource { readonly restorePoints?: RestorePoint[]; } -/** Specifies information about the capacity reservation group that the capacity reservations should be assigned to.

    Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. */ +/** Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. */ export interface CapacityReservationGroup extends Resource { /** Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. */ zones?: string[]; @@ -5223,7 +5377,7 @@ export interface CapacityReservation extends Resource { */ readonly reservationId?: string; /** - * Specifies the value of fault domain count that Capacity Reservation supports for requested VM size.
    NOTE: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation.

    Minimum api-version: 2022-08-01. + * Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly platformFaultDomainCount?: number; @@ -5248,7 +5402,7 @@ export interface CapacityReservation extends Resource { */ readonly instanceView?: CapacityReservationInstanceView; /** - * Specifies the time at which the Capacity Reservation resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5270,12 +5424,16 @@ export interface VirtualMachineRunCommand extends Resource { runAsPassword?: string; /** The timeout in seconds to execute the run command. */ timeoutInSeconds?: number; - /** Specifies the Azure storage blob where script output stream will be uploaded. */ + /** Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. */ outputBlobUri?: string; - /** Specifies the Azure storage blob where script error stream will be uploaded. */ + /** Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. */ errorBlobUri?: string; + /** User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + outputBlobManagedIdentity?: RunCommandManagedIdentity; + /** User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + errorBlobManagedIdentity?: RunCommandManagedIdentity; /** - * The provisioning state, which only appears in the response. + * The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; @@ -5284,6 +5442,8 @@ export interface VirtualMachineRunCommand extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instanceView?: VirtualMachineRunCommandInstanceView; + /** Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results */ + treatFailureAsDeploymentFailure?: boolean; } /** Disk resource. */ @@ -5665,6 +5825,10 @@ export interface VirtualMachineScaleSetUpdate extends UpdateResource { scaleInPolicy?: ScaleInPolicy; /** Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; + /** Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. */ + priorityMixPolicy?: PriorityMixPolicy; + /** Specifies the Spot Restore properties for the virtual machine scale set. */ + spotRestorePolicy?: SpotRestorePolicy; } /** Describes a Virtual Machine Extension. */ @@ -5711,23 +5875,23 @@ export interface VirtualMachineUpdate extends UpdateResource { networkProfile?: NetworkProfile; /** Specifies the Security related profile settings for the virtual machine. */ securityProfile?: SecurityProfile; - /** Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. */ + /** Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. */ diagnosticsProfile?: DiagnosticsProfile; - /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

    This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ availabilitySet?: SubResource; - /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

    This property cannot exist along with a non-null properties.availabilitySet reference.

    Minimum api‐version: 2019‐03‐01 */ + /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. */ virtualMachineScaleSet?: SubResource; - /** Specifies information about the proximity placement group that the virtual machine should be assigned to.

    Minimum api-version: 2018-04-01. */ + /** Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; - /** Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01 */ + /** Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01 */ priority?: VirtualMachinePriorityTypes; - /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ evictionPolicy?: VirtualMachineEvictionPolicyTypes; - /** Specifies the billing related details of a Azure Spot virtual machine.

    Minimum api-version: 2019-03-01. */ + /** Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. */ billingProfile?: BillingProfile; - /** Specifies information about the dedicated host that the virtual machine resides in.

    Minimum api-version: 2018-10-01. */ + /** Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. */ host?: SubResource; - /** Specifies information about the dedicated host group that the virtual machine resides in.

    Minimum api-version: 2020-06-01.

    NOTE: User cannot specify both host and hostGroup properties. */ + /** Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. */ hostGroup?: SubResource; /** * The provisioning state, which only appears in the response. @@ -5746,20 +5910,20 @@ export interface VirtualMachineUpdate extends UpdateResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vmId?: string; - /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 */ + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. */ extensionsTimeBudget?: string; - /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
  • This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 */ + /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. */ platformFaultDomain?: number; /** Specifies Scheduled Event related configurations. */ scheduledEventsProfile?: ScheduledEventsProfile; - /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 */ + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. */ userData?: string; - /** Specifies information about the capacity reservation that is used to allocate virtual machine.

    Minimum api-version: 2021-04-01. */ + /** Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. */ capacityReservation?: CapacityReservationProfile; - /** Specifies the gallery applications that should be made available to the VM/VMSS */ + /** Specifies the gallery applications that should be made available to the VM/VMSS. */ applicationProfile?: ApplicationProfile; /** - * Specifies the time at which the Virtual Machine resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5775,7 +5939,7 @@ export interface AvailabilitySetUpdate extends UpdateResource { platformFaultDomainCount?: number; /** A list of references to all virtual machines in the availability set. */ virtualMachines?: SubResource[]; - /** Specifies information about the proximity placement group that the availability set should be assigned to.

    Minimum api-version: 2018-04-01. */ + /** Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. */ proximityPlacementGroup?: SubResource; /** * The resource status information. @@ -5803,20 +5967,22 @@ export interface DedicatedHostGroupUpdate extends UpdateResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instanceView?: DedicatedHostGroupInstanceView; - /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

    Minimum api-version: 2020-06-01. */ + /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. */ supportAutomaticPlacement?: boolean; - /** Enables or disables a capability on the dedicated host group.

    Minimum api-version: 2022-03-01. */ + /** Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. */ additionalCapabilities?: DedicatedHostGroupPropertiesAdditionalCapabilities; } /** Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. */ export interface DedicatedHostUpdate extends UpdateResource { + /** [List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. */ + sku?: Sku; /** Fault domain of the dedicated host within a dedicated host group. */ platformFaultDomain?: number; /** Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. */ autoReplaceOnFailure?: boolean; /** - * A unique id generated and assigned to the dedicated host by the platform.

    Does not change throughout the lifetime of the host. + * A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly hostId?: string; @@ -5825,7 +5991,7 @@ export interface DedicatedHostUpdate extends UpdateResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly virtualMachines?: SubResourceReadOnly[]; - /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

    Possible values are:

    **None**

    **Windows_Server_Hybrid**

    **Windows_Server_Perpetual**

    Default: **None** */ + /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.** */ licenseType?: DedicatedHostLicenseTypes; /** * The date when the host was first provisioned. @@ -5843,7 +6009,7 @@ export interface DedicatedHostUpdate extends UpdateResource { */ readonly instanceView?: DedicatedHostInstanceView; /** - * Specifies the time at which the Dedicated Host resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5920,7 +6086,7 @@ export interface CapacityReservationUpdate extends UpdateResource { */ readonly reservationId?: string; /** - * Specifies the value of fault domain count that Capacity Reservation supports for requested VM size.
    NOTE: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation.

    Minimum api-version: 2022-08-01. + * Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly platformFaultDomainCount?: number; @@ -5945,7 +6111,7 @@ export interface CapacityReservationUpdate extends UpdateResource { */ readonly instanceView?: CapacityReservationInstanceView; /** - * Specifies the time at which the Capacity Reservation resource was created.

    Minimum api-version: 2021-11-01. + * Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: Date; @@ -5967,12 +6133,16 @@ export interface VirtualMachineRunCommandUpdate extends UpdateResource { runAsPassword?: string; /** The timeout in seconds to execute the run command. */ timeoutInSeconds?: number; - /** Specifies the Azure storage blob where script output stream will be uploaded. */ + /** Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. */ outputBlobUri?: string; - /** Specifies the Azure storage blob where script error stream will be uploaded. */ + /** Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. */ errorBlobUri?: string; + /** User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + outputBlobManagedIdentity?: RunCommandManagedIdentity; + /** User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + errorBlobManagedIdentity?: RunCommandManagedIdentity; /** - * The provisioning state, which only appears in the response. + * The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; @@ -5981,43 +6151,14 @@ export interface VirtualMachineRunCommandUpdate extends UpdateResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instanceView?: VirtualMachineRunCommandInstanceView; + /** Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results */ + treatFailureAsDeploymentFailure?: boolean; } /** Describes a Virtual Machine Scale Set VM Reimage Parameters. */ export interface VirtualMachineScaleSetVMReimageParameters extends VirtualMachineReimageParameters {} -/** Describes a Virtual Machine Extension. */ -export interface VirtualMachineExtension extends ResourceWithOptionalLocation { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - typePropertiesType?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ - enableAutomaticUpgrade?: boolean; - /** Json formatted public settings for the extension. */ - settings?: any; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: any; - /** - * The provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The virtual machine extension instance view. */ - instanceView?: VirtualMachineExtensionInstanceView; - /** Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. */ - suppressFailures?: boolean; - /** The extensions protected settings that are passed by reference, and consumed from key vault */ - protectedSettingsFromKeyVault?: KeyVaultSecretReference; -} - /** The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group. */ export interface DedicatedHostInstanceViewWithName extends DedicatedHostInstanceView { @@ -6030,7 +6171,7 @@ export interface DedicatedHostInstanceViewWithName /** Describes an Operating System disk. */ export interface ImageOSDisk extends ImageDisk { - /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.

    Possible values are:

    **Windows**

    **Linux** */ + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.** */ osType: OperatingSystemTypes; /** The OS State. For managed images, use Generalized. */ osState: OperatingSystemStateTypes; @@ -6046,11 +6187,8 @@ export interface ImageDataDisk extends ImageDisk { export interface RestorePoint extends ProxyResource { /** List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. */ excludeDisks?: ApiEntityReference[]; - /** - * Gets the details of the VM captured at the time of the restore point creation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourceMetadata?: RestorePointSourceMetadata; + /** Gets the details of the VM captured at the time of the restore point creation. */ + sourceMetadata?: RestorePointSourceMetadata; /** * Gets the provisioning state of the restore point. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6478,6 +6616,11 @@ export interface SharedGalleryImageVersion extends PirSharedGalleryResource { storageProfile?: SharedGalleryImageVersionStorageProfile; } +/** Defines headers for VirtualMachineScaleSets_reapply operation. */ +export interface VirtualMachineScaleSetsReapplyHeaders { + location?: string; +} + /** Known values of {@link RepairAction} that the service accepts. */ export enum KnownRepairAction { /** Replace */ @@ -7015,6 +7158,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 */ @@ -7639,6 +7800,36 @@ export enum KnownPatchOperationStatus { */ export type PatchOperationStatus = string; +/** Known values of {@link ExpandTypeForListVMs} that the service accepts. */ +export enum KnownExpandTypeForListVMs { + /** InstanceView */ + InstanceView = "instanceView" +} + +/** + * Defines values for ExpandTypeForListVMs. \ + * {@link KnownExpandTypeForListVMs} can be used interchangeably with ExpandTypeForListVMs, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **instanceView** + */ +export type ExpandTypeForListVMs = string; + +/** Known values of {@link ExpandTypesForListVMs} that the service accepts. */ +export enum KnownExpandTypesForListVMs { + /** InstanceView */ + InstanceView = "instanceView" +} + +/** + * Defines values for ExpandTypesForListVMs. \ + * {@link KnownExpandTypesForListVMs} can be used interchangeably with ExpandTypesForListVMs, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **instanceView** + */ +export type ExpandTypesForListVMs = string; + /** Known values of {@link VMGuestPatchRebootBehavior} that the service accepts. */ export enum KnownVMGuestPatchRebootBehavior { /** Unknown */ @@ -7951,6 +8142,27 @@ export enum KnownOperatingSystemType { */ export type OperatingSystemType = string; +/** Known values of {@link RestorePointEncryptionType} that the service accepts. */ +export enum KnownRestorePointEncryptionType { + /** Disk Restore Point is encrypted at rest with Platform managed key. */ + EncryptionAtRestWithPlatformKey = "EncryptionAtRestWithPlatformKey", + /** Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer. */ + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + /** Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. */ + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys" +} + +/** + * Defines values for RestorePointEncryptionType. \ + * {@link KnownRestorePointEncryptionType} can be used interchangeably with RestorePointEncryptionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EncryptionAtRestWithPlatformKey**: Disk Restore Point is encrypted at rest with Platform managed key. \ + * **EncryptionAtRestWithCustomerKey**: Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer. \ + * **EncryptionAtRestWithPlatformAndCustomerKeys**: Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + */ +export type RestorePointEncryptionType = string; + /** Known values of {@link ConsistencyModeTypes} that the service accepts. */ export enum KnownConsistencyModeTypes { /** CrashConsistent */ @@ -8089,13 +8301,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 +8328,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 +8510,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 +8818,9 @@ export enum KnownStorageAccountType { /** StandardZRS */ StandardZRS = "Standard_ZRS", /** PremiumLRS */ - PremiumLRS = "Premium_LRS" + PremiumLRS = "Premium_LRS", + /** StandardSSDLRS */ + StandardSSDLRS = "StandardSSD_LRS" } /** @@ -8634,7 +8830,8 @@ export enum KnownStorageAccountType { * ### Known values supported by the service * **Standard_LRS** \ * **Standard_ZRS** \ - * **Premium_LRS** + * **Premium_LRS** \ + * **StandardSSD_LRS** */ export type StorageAccountType = string; @@ -8908,14 +9105,14 @@ export type ProtocolTypes = "Http" | "Https"; export type CachingTypes = "None" | "ReadOnly" | "ReadWrite"; /** Defines values for OperatingSystemTypes. */ export type OperatingSystemTypes = "Windows" | "Linux"; +/** Defines values for StatusLevelTypes. */ +export type StatusLevelTypes = "Info" | "Warning" | "Error"; /** Defines values for ResourceIdentityType. */ export type ResourceIdentityType = | "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; -/** Defines values for StatusLevelTypes. */ -export type StatusLevelTypes = "Info" | "Warning" | "Error"; /** Defines values for VirtualMachineScaleSetSkuScaleType. */ export type VirtualMachineScaleSetSkuScaleType = "Automatic" | "None"; /** Defines values for UpgradeState. */ @@ -9055,6 +9252,8 @@ export interface VirtualMachineScaleSetsDeallocateOptionalParams extends coreClient.OperationOptions { /** A list of virtual machine instance IDs from the VM scale set. */ vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only) */ + hibernate?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -9142,6 +9341,15 @@ export interface VirtualMachineScaleSetsStartOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface VirtualMachineScaleSetsReapplyOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface VirtualMachineScaleSetsRedeployOptionalParams extends coreClient.OperationOptions { @@ -9523,7 +9731,7 @@ export interface VirtualMachineScaleSetVMsRedeployOptionalParams /** Optional parameters. */ export interface VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams extends coreClient.OperationOptions { - /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ + /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ sasUriExpirationTimeInMinutes?: number; } @@ -9715,6 +9923,8 @@ export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { /** The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' */ filter?: string; + /** The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified */ + expand?: ExpandTypeForListVMs; } /** Contains response data for the list operation. */ @@ -9727,6 +9937,8 @@ export interface VirtualMachinesListAllOptionalParams filter?: string; /** statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. */ statusOnly?: string; + /** The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified */ + expand?: ExpandTypesForListVMs; } /** Contains response data for the listAll operation. */ @@ -9800,7 +10012,7 @@ export interface VirtualMachinesReimageOptionalParams /** Optional parameters. */ export interface VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams extends coreClient.OperationOptions { - /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ + /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ sasUriExpirationTimeInMinutes?: number; } @@ -10226,6 +10438,13 @@ export interface DedicatedHostsRestartOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface DedicatedHostsListAvailableSizesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAvailableSizes operation. */ +export type DedicatedHostsListAvailableSizesResponse = DedicatedHostSizeListResult; + /** Optional parameters. */ export interface DedicatedHostsListByHostGroupNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index d52741bcda2e..9c23d1e4f938 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -697,6 +697,13 @@ export const VirtualMachineScaleSetVMProfile: coreClient.CompositeMapper = { name: "Composite", className: "ServiceArtifactReference" } + }, + securityPostureReference: { + serializedName: "securityPostureReference", + type: { + name: "Composite", + className: "SecurityPostureReference" + } } } } @@ -914,6 +921,12 @@ export const WindowsVMGuestPatchAutomaticByPlatformSettings: coreClient.Composit type: { name: "String" } + }, + bypassPlatformSafetyChecksOnUserSchedule: { + serializedName: "bypassPlatformSafetyChecksOnUserSchedule", + type: { + name: "Boolean" + } } } } @@ -1083,6 +1096,12 @@ export const LinuxVMGuestPatchAutomaticByPlatformSettings: coreClient.CompositeM type: { name: "String" } + }, + bypassPlatformSafetyChecksOnUserSchedule: { + serializedName: "bypassPlatformSafetyChecksOnUserSchedule", + type: { + name: "Boolean" + } } } } @@ -1488,6 +1507,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 +1605,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", @@ -2001,68 +2188,229 @@ export const ServiceArtifactReference: coreClient.CompositeMapper = { } }; -export const AdditionalCapabilities: coreClient.CompositeMapper = { +export const SecurityPostureReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdditionalCapabilities", + className: "SecurityPostureReference", modelProperties: { - ultraSSDEnabled: { - serializedName: "ultraSSDEnabled", + id: { + serializedName: "id", type: { - name: "Boolean" + name: "String" } }, - hibernationEnabled: { - serializedName: "hibernationEnabled", + excludeExtensions: { + serializedName: "excludeExtensions", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineExtension" + } + } } } } } }; -export const ScaleInPolicy: coreClient.CompositeMapper = { +export const VirtualMachineExtensionInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleInPolicy", + className: "VirtualMachineExtensionInstanceView", modelProperties: { - rules: { - serializedName: "rules", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "typeHandlerVersion", + type: { + name: "String" + } + }, + substatuses: { + serializedName: "substatuses", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "InstanceViewStatus" } } } }, - forceDeletion: { - serializedName: "forceDeletion", + statuses: { + serializedName: "statuses", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } } } } }; -export const SpotRestorePolicy: coreClient.CompositeMapper = { +export const InstanceViewStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SpotRestorePolicy", + className: "InstanceViewStatus", modelProperties: { - enabled: { - serializedName: "enabled", + code: { + serializedName: "code", type: { - name: "Boolean" + name: "String" } }, - restoreTimeout: { - serializedName: "restoreTimeout", + level: { + serializedName: "level", type: { - name: "String" + name: "Enum", + allowedValues: ["Info", "Warning", "Error"] + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ResourceWithOptionalLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceWithOptionalLocation", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const AdditionalCapabilities: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdditionalCapabilities", + modelProperties: { + ultraSSDEnabled: { + serializedName: "ultraSSDEnabled", + type: { + name: "Boolean" + } + }, + hibernationEnabled: { + serializedName: "hibernationEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ScaleInPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleInPolicy", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + forceDeletion: { + serializedName: "forceDeletion", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SpotRestorePolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SpotRestorePolicy", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + restoreTimeout: { + serializedName: "restoreTimeout", + type: { + name: "String" } } } @@ -2491,10 +2839,10 @@ export const VirtualMachineScaleSetUpdateNetworkProfile: coreClient.CompositeMap } }; -export const VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetUpdateNetworkConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration", + className: "VirtualMachineScaleSetUpdateNetworkConfiguration", modelProperties: { name: { serializedName: "name", @@ -2502,112 +2850,278 @@ export const VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: coreClien name: "String" } }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", + primary: { + serializedName: "properties.primary", type: { - name: "Number" + name: "Boolean" } }, - dnsSettings: { - serializedName: "properties.dnsSettings", + enableAcceleratedNetworking: { + serializedName: "properties.enableAcceleratedNetworking", type: { - name: "Composite", - className: - "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" + name: "Boolean" } }, - publicIPPrefix: { - serializedName: "properties.publicIPPrefix", + disableTcpStateTracking: { + serializedName: "properties.disableTcpStateTracking", type: { - name: "Composite", - className: "SubResource" + name: "Boolean" } }, - deleteOption: { - serializedName: "properties.deleteOption", + enableFpga: { + serializedName: "properties.enableFpga", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const UpdateResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateResource", - modelProperties: { - tags: { - serializedName: "tags", + }, + networkSecurityGroup: { + serializedName: "properties.networkSecurityGroup", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "SubResource" } - } - } - } -}; - -export const VirtualMachineScaleSetVMInstanceIDs: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMInstanceIDs", - modelProperties: { - instanceIds: { - serializedName: "instanceIds", + }, + dnsSettings: { + serializedName: "properties.dnsSettings", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" } - } - } - } -}; - -export const VirtualMachineScaleSetVMInstanceRequiredIDs: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMInstanceRequiredIDs", - modelProperties: { - instanceIds: { - serializedName: "instanceIds", - required: true, + }, + ipConfigurations: { + serializedName: "properties.ipConfigurations", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetUpdateIPConfiguration" } } } + }, + enableIPForwarding: { + serializedName: "properties.enableIPForwarding", + type: { + name: "Boolean" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", + type: { + name: "String" + } } } } }; -export const VirtualMachineScaleSetInstanceView: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetUpdateIPConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetInstanceView", + className: "VirtualMachineScaleSetUpdateIPConfiguration", modelProperties: { - virtualMachine: { - serializedName: "virtualMachine", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + subnet: { + serializedName: "properties.subnet", type: { name: "Composite", - className: "VirtualMachineScaleSetInstanceViewStatusesSummary" + className: "ApiEntityReference" } }, - extensions: { - serializedName: "extensions", - readOnly: true, + primary: { + serializedName: "properties.primary", type: { - name: "Sequence", - element: { + name: "Boolean" + } + }, + publicIPAddressConfiguration: { + serializedName: "properties.publicIPAddressConfiguration", + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration" + } + }, + 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 VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + idleTimeoutInMinutes: { + serializedName: "properties.idleTimeoutInMinutes", + type: { + name: "Number" + } + }, + dnsSettings: { + serializedName: "properties.dnsSettings", + type: { + name: "Composite", + className: + "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" + } + }, + publicIPPrefix: { + serializedName: "properties.publicIPPrefix", + type: { + name: "Composite", + className: "SubResource" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const VirtualMachineScaleSetVMInstanceIDs: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMInstanceIDs", + modelProperties: { + instanceIds: { + serializedName: "instanceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualMachineScaleSetVMInstanceRequiredIDs: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMInstanceRequiredIDs", + modelProperties: { + instanceIds: { + serializedName: "instanceIds", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualMachineScaleSetInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetInstanceView", + modelProperties: { + virtualMachine: { + serializedName: "virtualMachine", + type: { + name: "Composite", + className: "VirtualMachineScaleSetInstanceViewStatusesSummary" + } + }, + extensions: { + serializedName: "extensions", + readOnly: true, + type: { + name: "Sequence", + element: { type: { name: "Composite", className: "VirtualMachineScaleSetVMExtensionsSummary" @@ -2718,46 +3232,6 @@ export const VirtualMachineScaleSetVMExtensionsSummary: coreClient.CompositeMapp } }; -export const InstanceViewStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstanceViewStatus", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - level: { - serializedName: "level", - type: { - name: "Enum", - allowedValues: ["Info", "Warning", "Error"] - } - }, - displayStatus: { - serializedName: "displayStatus", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - time: { - serializedName: "time", - type: { - name: "DateTime" - } - } - } - } -}; - export const OrchestrationServiceSummary: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3290,70 +3764,19 @@ export const OrchestrationServiceStateInput: coreClient.CompositeMapper = { } }; -export const VirtualMachineExtensionInstanceView: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetVMExtensionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionInstanceView", + className: "VirtualMachineScaleSetVMExtensionsListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", - type: { - name: "String" - } - }, - substatuses: { - serializedName: "substatuses", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" - } - } - } - }, - statuses: { - serializedName: "statuses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } - } - } - } - } -}; - -export const VirtualMachineScaleSetVMExtensionsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMExtensionsListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMExtension" + className: "VirtualMachineScaleSetVMExtension" } } } @@ -3461,6 +3884,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" + } } } } @@ -4425,49 +4872,6 @@ export const VirtualMachineScaleSetVMProtectionPolicy: coreClient.CompositeMappe } }; -export const ResourceWithOptionalLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceWithOptionalLocation", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - export const VirtualMachineIdentity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5845,6 +6249,26 @@ export const DedicatedHostListResult: coreClient.CompositeMapper = { } }; +export const DedicatedHostSizeListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DedicatedHostSizeListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const SshPublicKeysGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6077,12 +6501,14 @@ export const RestorePointSourceMetadata: coreClient.CompositeMapper = { }, licenseType: { serializedName: "licenseType", + readOnly: true, type: { name: "String" } }, vmId: { serializedName: "vmId", + readOnly: true, type: { name: "String" } @@ -6096,12 +6522,21 @@ export const RestorePointSourceMetadata: coreClient.CompositeMapper = { }, location: { serializedName: "location", + readOnly: true, type: { name: "String" } }, userData: { serializedName: "userData", + readOnly: true, + type: { + name: "String" + } + }, + hyperVGeneration: { + serializedName: "hyperVGeneration", + readOnly: true, type: { name: "String" } @@ -6145,6 +6580,7 @@ export const RestorePointSourceVmosDisk: coreClient.CompositeMapper = { modelProperties: { osType: { serializedName: "osType", + readOnly: true, type: { name: "String" } @@ -6158,12 +6594,14 @@ export const RestorePointSourceVmosDisk: coreClient.CompositeMapper = { }, name: { serializedName: "name", + readOnly: true, type: { name: "String" } }, caching: { serializedName: "caching", + readOnly: true, type: { name: "Enum", allowedValues: ["None", "ReadOnly", "ReadWrite"] @@ -6171,6 +6609,7 @@ export const RestorePointSourceVmosDisk: coreClient.CompositeMapper = { }, diskSizeGB: { serializedName: "diskSizeGB", + readOnly: true, type: { name: "Number" } @@ -6186,7 +6625,36 @@ export const RestorePointSourceVmosDisk: coreClient.CompositeMapper = { serializedName: "diskRestorePoint", type: { name: "Composite", - className: "ApiEntityReference" + className: "DiskRestorePointAttributes" + } + }, + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const RestorePointEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorePointEncryption", + modelProperties: { + diskEncryptionSet: { + serializedName: "diskEncryptionSet", + type: { + name: "Composite", + className: "DiskEncryptionSetParameters" + } + }, + type: { + serializedName: "type", + type: { + name: "String" } } } @@ -6200,18 +6668,21 @@ export const RestorePointSourceVMDataDisk: coreClient.CompositeMapper = { modelProperties: { lun: { serializedName: "lun", + readOnly: true, type: { name: "Number" } }, name: { serializedName: "name", + readOnly: true, type: { name: "String" } }, caching: { serializedName: "caching", + readOnly: true, type: { name: "Enum", allowedValues: ["None", "ReadOnly", "ReadWrite"] @@ -6219,6 +6690,7 @@ export const RestorePointSourceVMDataDisk: coreClient.CompositeMapper = { }, diskSizeGB: { serializedName: "diskSizeGB", + readOnly: true, type: { name: "Number" } @@ -6234,7 +6706,14 @@ export const RestorePointSourceVMDataDisk: coreClient.CompositeMapper = { serializedName: "diskRestorePoint", type: { name: "Composite", - className: "ApiEntityReference" + className: "DiskRestorePointAttributes" + } + }, + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", + readOnly: true, + type: { + name: "Boolean" } } } @@ -6816,6 +7295,34 @@ export const VirtualMachineRunCommandScriptSource: coreClient.CompositeMapper = type: { name: "String" } + }, + scriptUriManagedIdentity: { + serializedName: "scriptUriManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } + } + } + } +}; + +export const RunCommandManagedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + objectId: { + serializedName: "objectId", + type: { + name: "String" + } } } } @@ -11474,89 +11981,93 @@ export const DiskEncryptionSetParameters: coreClient.CompositeMapper = { } }; -export const VirtualMachineScaleSetIPConfiguration: coreClient.CompositeMapper = { +export const ManagedDiskParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetIPConfiguration", + className: "ManagedDiskParameters", modelProperties: { ...SubResource.type.modelProperties, - name: { - serializedName: "name", - required: true, + storageAccountType: { + serializedName: "storageAccountType", type: { name: "String" } }, - subnet: { - serializedName: "properties.subnet", + diskEncryptionSet: { + serializedName: "diskEncryptionSet", type: { name: "Composite", - className: "ApiEntityReference" + className: "DiskEncryptionSetParameters" } }, + securityProfile: { + serializedName: "securityProfile", + type: { + name: "Composite", + className: "VMDiskSecurityProfile" + } + } + } + } +}; + +export const NetworkInterfaceReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaceReference", + modelProperties: { + ...SubResource.type.modelProperties, primary: { serializedName: "properties.primary", type: { name: "Boolean" } }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", + deleteOption: { + serializedName: "properties.deleteOption", type: { - name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfiguration" + name: "String" } - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", + } + } + } +}; + +export const VirtualMachineCaptureResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineCaptureResult", + modelProperties: { + ...SubResource.type.modelProperties, + schema: { + serializedName: "$schema", + readOnly: true, type: { name: "String" } }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", + contentVersion: { + serializedName: "contentVersion", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", + parameters: { + serializedName: "parameters", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "any" } }, - loadBalancerInboundNatPools: { - serializedName: "properties.loadBalancerInboundNatPools", + resources: { + serializedName: "resources", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SubResource" + name: "any" } } } @@ -11565,10 +12076,10 @@ export const VirtualMachineScaleSetIPConfiguration: coreClient.CompositeMapper = } }; -export const VirtualMachineScaleSetNetworkConfiguration: coreClient.CompositeMapper = { +export const VirtualMachineImageResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkConfiguration", + className: "VirtualMachineImageResource", modelProperties: { ...SubResource.type.modelProperties, name: { @@ -11578,398 +12089,159 @@ export const VirtualMachineScaleSetNetworkConfiguration: coreClient.CompositeMap 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", + location: { + serializedName: "location", + required: true, type: { - name: "Boolean" + name: "String" } }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "SubResource" + name: "Dictionary", + value: { type: { name: "String" } } } }, - dnsSettings: { - serializedName: "properties.dnsSettings", + extendedLocation: { + serializedName: "extendedLocation", 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" + className: "ExtendedLocation" } } } } }; -export const VirtualMachineScaleSetUpdateIPConfiguration: coreClient.CompositeMapper = { +export const SubResourceWithColocationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateIPConfiguration", + className: "SubResourceWithColocationStatus", modelProperties: { ...SubResource.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "ApiEntityReference" - } - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", + colocationStatus: { + serializedName: "colocationStatus", type: { name: "Composite", - className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration" - } - }, - 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" - } - } + className: "InstanceViewStatus" } } } } }; -export const VirtualMachineScaleSetUpdateNetworkConfiguration: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetExtension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateNetworkConfiguration", + className: "VirtualMachineScaleSetExtension", modelProperties: { - ...SubResource.type.modelProperties, + ...SubResourceReadOnly.type.modelProperties, name: { serializedName: "name", 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: { + serializedName: "type", + readOnly: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" + name: "String" } }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateIPConfiguration" - } - } + name: "String" } }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", + publisher: { + serializedName: "properties.publisher", type: { - name: "Boolean" + name: "String" } }, - deleteOption: { - serializedName: "properties.deleteOption", + typePropertiesType: { + serializedName: "properties.type", type: { name: "String" } - } - } - } -}; - -export const ManagedDiskParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedDiskParameters", - modelProperties: { - ...SubResource.type.modelProperties, - storageAccountType: { - serializedName: "storageAccountType", + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { name: "String" } }, - diskEncryptionSet: { - serializedName: "diskEncryptionSet", + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Composite", - className: "DiskEncryptionSetParameters" + name: "Boolean" } }, - securityProfile: { - serializedName: "securityProfile", - type: { - name: "Composite", - className: "VMDiskSecurityProfile" - } - } - } - } -}; - -export const NetworkInterfaceReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceReference", - modelProperties: { - ...SubResource.type.modelProperties, - primary: { - serializedName: "properties.primary", + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { name: "Boolean" } }, - deleteOption: { - serializedName: "properties.deleteOption", - type: { - name: "String" - } - } - } - } -}; - -export const VirtualMachineCaptureResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineCaptureResult", - modelProperties: { - ...SubResource.type.modelProperties, - schema: { - serializedName: "$schema", - readOnly: true, + settings: { + serializedName: "properties.settings", type: { - name: "String" + name: "any" } }, - contentVersion: { - serializedName: "contentVersion", - readOnly: true, + protectedSettings: { + serializedName: "properties.protectedSettings", type: { - name: "String" + name: "any" } }, - parameters: { - serializedName: "parameters", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "any" + name: "String" } }, - resources: { - serializedName: "resources", - readOnly: true, + provisionAfterExtensions: { + serializedName: "properties.provisionAfterExtensions", type: { name: "Sequence", element: { type: { - name: "any" + name: "String" } } } - } - } - } -}; - -export const VirtualMachineImageResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineImageResource", - modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", + suppressFailures: { + serializedName: "properties.suppressFailures", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Boolean" } }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - } - } - } -}; - -export const SubResourceWithColocationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubResourceWithColocationStatus", - modelProperties: { - ...SubResource.type.modelProperties, - colocationStatus: { - serializedName: "colocationStatus", + protectedSettingsFromKeyVault: { + serializedName: "properties.protectedSettingsFromKeyVault", type: { name: "Composite", - className: "InstanceViewStatus" + className: "KeyVaultSecretReference" } } } } }; -export const VirtualMachineScaleSetExtension: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtension", + className: "VirtualMachineScaleSetExtensionUpdate", modelProperties: { ...SubResourceReadOnly.type.modelProperties, name: { serializedName: "name", + readOnly: true, type: { name: "String" } @@ -12064,10 +12336,10 @@ export const VirtualMachineScaleSetExtension: coreClient.CompositeMapper = { } }; -export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetVMExtension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtensionUpdate", + className: "VirtualMachineScaleSetVMExtension", modelProperties: { ...SubResourceReadOnly.type.modelProperties, name: { @@ -12084,6 +12356,12 @@ export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = name: "String" } }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, forceUpdateTag: { serializedName: "properties.forceUpdateTag", type: { @@ -12139,15 +12417,11 @@ export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = name: "String" } }, - provisionAfterExtensions: { - serializedName: "properties.provisionAfterExtensions", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "VirtualMachineExtensionInstanceView" } }, suppressFailures: { @@ -12162,15 +12436,26 @@ export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = name: "Composite", className: "KeyVaultSecretReference" } + }, + provisionAfterExtensions: { + serializedName: "properties.provisionAfterExtensions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const VirtualMachineScaleSetVMExtension: coreClient.CompositeMapper = { +export const VirtualMachineScaleSetVMExtensionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtension", + className: "VirtualMachineScaleSetVMExtensionUpdate", modelProperties: { ...SubResourceReadOnly.type.modelProperties, name: { @@ -12235,20 +12520,6 @@ export const VirtualMachineScaleSetVMExtension: coreClient.CompositeMapper = { name: "any" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - instanceView: { - serializedName: "properties.instanceView", - type: { - name: "Composite", - className: "VirtualMachineExtensionInstanceView" - } - }, suppressFailures: { serializedName: "properties.suppressFailures", type: { @@ -12266,26 +12537,36 @@ export const VirtualMachineScaleSetVMExtension: coreClient.CompositeMapper = { } }; -export const VirtualMachineScaleSetVMExtensionUpdate: coreClient.CompositeMapper = { +export const DiskRestorePointAttributes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtensionUpdate", + className: "DiskRestorePointAttributes", modelProperties: { ...SubResourceReadOnly.type.modelProperties, - name: { - serializedName: "name", - readOnly: true, + encryption: { + serializedName: "encryption", type: { - name: "String" + name: "Composite", + className: "RestorePointEncryption" } }, - type: { - serializedName: "type", - readOnly: true, + sourceDiskRestorePoint: { + serializedName: "sourceDiskRestorePoint", type: { - name: "String" + name: "Composite", + className: "ApiEntityReference" } - }, + } + } + } +}; + +export const VirtualMachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineExtension", + modelProperties: { + ...ResourceWithOptionalLocation.type.modelProperties, forceUpdateTag: { serializedName: "properties.forceUpdateTag", type: { @@ -12334,6 +12615,20 @@ export const VirtualMachineScaleSetVMExtensionUpdate: coreClient.CompositeMapper name: "any" } }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "VirtualMachineExtensionInstanceView" + } + }, suppressFailures: { serializedName: "properties.suppressFailures", type: { @@ -12346,6 +12641,17 @@ export const VirtualMachineScaleSetVMExtensionUpdate: coreClient.CompositeMapper name: "Composite", className: "KeyVaultSecretReference" } + }, + provisionAfterExtensions: { + serializedName: "properties.provisionAfterExtensions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -13625,6 +13931,20 @@ export const VirtualMachineRunCommand: coreClient.CompositeMapper = { name: "String" } }, + outputBlobManagedIdentity: { + serializedName: "properties.outputBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } + }, + errorBlobManagedIdentity: { + serializedName: "properties.errorBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -13638,6 +13958,13 @@ export const VirtualMachineRunCommand: coreClient.CompositeMapper = { name: "Composite", className: "VirtualMachineRunCommandInstanceView" } + }, + treatFailureAsDeploymentFailure: { + defaultValue: false, + serializedName: "properties.treatFailureAsDeploymentFailure", + type: { + name: "Boolean" + } } } } @@ -14599,6 +14926,20 @@ export const VirtualMachineScaleSetUpdate: coreClient.CompositeMapper = { name: "Composite", className: "SubResource" } + }, + priorityMixPolicy: { + serializedName: "properties.priorityMixPolicy", + type: { + name: "Composite", + className: "PriorityMixPolicy" + } + }, + spotRestorePolicy: { + serializedName: "properties.spotRestorePolicy", + type: { + name: "Composite", + className: "SpotRestorePolicy" + } } } } @@ -15026,6 +15367,13 @@ export const DedicatedHostUpdate: coreClient.CompositeMapper = { className: "DedicatedHostUpdate", modelProperties: { ...UpdateResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, platformFaultDomain: { constraints: { InclusiveMinimum: 0 @@ -15390,86 +15738,18 @@ export const VirtualMachineRunCommandUpdate: coreClient.CompositeMapper = { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - instanceView: { - serializedName: "properties.instanceView", + outputBlobManagedIdentity: { + serializedName: "properties.outputBlobManagedIdentity", type: { name: "Composite", - className: "VirtualMachineRunCommandInstanceView" - } - } - } - } -}; - -export const VirtualMachineScaleSetVMReimageParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMReimageParameters", - modelProperties: { - ...VirtualMachineReimageParameters.type.modelProperties - } - } -}; - -export const VirtualMachineExtension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineExtension", - modelProperties: { - ...ResourceWithOptionalLocation.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.publisher", - type: { - name: "String" - } - }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "String" + className: "RunCommandManagedIdentity" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", - type: { - name: "String" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "properties.settings", - type: { - name: "any" - } - }, - protectedSettings: { - serializedName: "properties.protectedSettings", + errorBlobManagedIdentity: { + serializedName: "properties.errorBlobManagedIdentity", type: { - name: "any" + name: "Composite", + className: "RunCommandManagedIdentity" } }, provisioningState: { @@ -15483,26 +15763,30 @@ export const VirtualMachineExtension: coreClient.CompositeMapper = { serializedName: "properties.instanceView", type: { name: "Composite", - className: "VirtualMachineExtensionInstanceView" + className: "VirtualMachineRunCommandInstanceView" } }, - suppressFailures: { - serializedName: "properties.suppressFailures", + treatFailureAsDeploymentFailure: { + defaultValue: false, + serializedName: "properties.treatFailureAsDeploymentFailure", type: { name: "Boolean" } - }, - protectedSettingsFromKeyVault: { - serializedName: "properties.protectedSettingsFromKeyVault", - type: { - name: "Composite", - className: "KeyVaultSecretReference" - } } } } }; +export const VirtualMachineScaleSetVMReimageParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMReimageParameters", + modelProperties: { + ...VirtualMachineReimageParameters.type.modelProperties + } + } +}; + export const DedicatedHostInstanceViewWithName: coreClient.CompositeMapper = { type: { name: "Composite", @@ -16761,3 +17045,18 @@ export const SharedGalleryImageVersion: coreClient.CompositeMapper = { } } }; + +export const VirtualMachineScaleSetsReapplyHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetsReapplyHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index 39a727868c15..cd45c7e60b2a 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -110,7 +110,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01", + defaultValue: "2023-03-01", isConstant: true, serializedName: "api-version", type: { @@ -225,6 +225,16 @@ export const vmInstanceIDs: OperationParameter = { mapper: VirtualMachineScaleSetVMInstanceIDsMapper }; +export const hibernate: OperationQueryParameter = { + parameterPath: ["options", "hibernate"], + mapper: { + serializedName: "hibernate", + type: { + name: "Boolean" + } + } +}; + export const vmInstanceIDs1: OperationParameter = { parameterPath: "vmInstanceIDs", mapper: VirtualMachineScaleSetVMInstanceRequiredIDsMapper @@ -465,12 +475,12 @@ export const parameters8: OperationParameter = { mapper: VirtualMachineUpdateMapper }; -export const hibernate: OperationQueryParameter = { - parameterPath: ["options", "hibernate"], +export const expand3: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - serializedName: "hibernate", + serializedName: "$expand", type: { - name: "Boolean" + name: "String" } } }; @@ -485,6 +495,16 @@ export const statusOnly: OperationQueryParameter = { } }; +export const expand4: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + export const parameters9: OperationParameter = { parameterPath: ["options", "parameters"], mapper: VirtualMachineReimageParametersMapper @@ -686,6 +706,34 @@ export const parameters17: OperationParameter = { mapper: DedicatedHostUpdateMapper }; +export const hostGroupName1: OperationURLParameter = { + parameterPath: "hostGroupName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._]+$") + }, + serializedName: "hostGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const hostName1: OperationURLParameter = { + parameterPath: "hostName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._]+$") + }, + serializedName: "hostName", + required: true, + type: { + name: "String" + } + } +}; + export const parameters18: OperationParameter = { parameterPath: "parameters", mapper: SshPublicKeyResourceMapper @@ -749,7 +797,7 @@ export const parameters23: OperationParameter = { mapper: RestorePointCollectionUpdateMapper }; -export const expand3: OperationQueryParameter = { +export const expand5: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -775,7 +823,7 @@ export const restorePointName: OperationURLParameter = { } }; -export const expand4: OperationQueryParameter = { +export const expand6: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -806,7 +854,7 @@ export const parameters26: OperationParameter = { mapper: CapacityReservationGroupUpdateMapper }; -export const expand5: OperationQueryParameter = { +export const expand7: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -816,7 +864,7 @@ export const expand5: OperationQueryParameter = { } }; -export const expand6: OperationQueryParameter = { +export const expand8: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -847,7 +895,7 @@ export const parameters28: OperationParameter = { mapper: CapacityReservationUpdateMapper }; -export const expand7: OperationQueryParameter = { +export const expand9: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -1103,7 +1151,7 @@ export const select1: OperationQueryParameter = { } }; -export const expand8: OperationQueryParameter = { +export const expand10: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -1155,7 +1203,7 @@ export const galleryImageVersion1: OperationParameter = { mapper: GalleryImageVersionUpdateMapper }; -export const expand9: OperationQueryParameter = { +export const expand11: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", diff --git a/sdk/compute/arm-compute/src/operations/capacityReservationGroups.ts b/sdk/compute/arm-compute/src/operations/capacityReservationGroups.ts index 83e4a5f2e5bc..dd348128ffd6 100644 --- a/sdk/compute/arm-compute/src/operations/capacityReservationGroups.ts +++ b/sdk/compute/arm-compute/src/operations/capacityReservationGroups.ts @@ -399,7 +399,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand5], + queryParameters: [Parameters.apiVersion, Parameters.expand7], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -421,7 +421,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand6], + queryParameters: [Parameters.apiVersion, Parameters.expand8], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -442,7 +442,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand6], + queryParameters: [Parameters.apiVersion, Parameters.expand8], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/compute/arm-compute/src/operations/capacityReservations.ts b/sdk/compute/arm-compute/src/operations/capacityReservations.ts index afa2242d0a9c..1f44d46446ad 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(); @@ -604,7 +614,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand7], + queryParameters: [Parameters.apiVersion, Parameters.expand9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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..683fcb2572bb 100644 --- a/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts +++ b/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts @@ -13,13 +13,19 @@ 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, DedicatedHostsListByHostGroupOptionalParams, DedicatedHostsListByHostGroupResponse, + DedicatedHostsListAvailableSizesOptionalParams, + DedicatedHostsListAvailableSizesResponse, DedicatedHostsCreateOrUpdateOptionalParams, DedicatedHostsCreateOrUpdateResponse, DedicatedHostUpdate, @@ -130,6 +136,81 @@ export class DedicatedHostsImpl implements DedicatedHosts { } } + /** + * Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: + * The dedicated host sizes provided can be used to only scale up the existing dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + public listAvailableSizes( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableSizesPagingAll( + resourceGroupName, + hostGroupName, + hostName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAvailableSizesPagingPage( + resourceGroupName, + hostGroupName, + hostName, + options, + settings + ); + } + }; + } + + private async *listAvailableSizesPagingPage( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsListAvailableSizesOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: DedicatedHostsListAvailableSizesResponse; + result = await this._listAvailableSizes( + resourceGroupName, + hostGroupName, + hostName, + options + ); + yield result.value || []; + } + + private async *listAvailableSizesPagingAll( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsListAvailableSizesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableSizesPagingPage( + resourceGroupName, + hostGroupName, + hostName, + options + )) { + yield* page; + } + } + /** * Create or update a dedicated host . * @param resourceGroupName The name of the resource group. @@ -145,8 +226,8 @@ export class DedicatedHostsImpl implements DedicatedHosts { parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsCreateOrUpdateResponse > > { @@ -156,7 +237,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 +270,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(); @@ -228,7 +312,7 @@ export class DedicatedHostsImpl implements DedicatedHosts { } /** - * Update an dedicated host . + * Update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host . @@ -242,8 +326,8 @@ export class DedicatedHostsImpl implements DedicatedHosts { parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsUpdateResponse > > { @@ -253,7 +337,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 +370,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(); @@ -300,7 +387,7 @@ export class DedicatedHostsImpl implements DedicatedHosts { } /** - * Update an dedicated host . + * Update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host . @@ -336,14 +423,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 +463,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 +550,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 +590,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(); @@ -541,6 +628,26 @@ export class DedicatedHostsImpl implements DedicatedHosts { return poller.pollUntilDone(); } + /** + * Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: + * The dedicated host sizes provided can be used to only scale up the existing dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + private _listAvailableSizes( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsListAvailableSizesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostGroupName, hostName, options }, + listAvailableSizesOperationSpec + ); + } + /** * ListByHostGroupNext * @param resourceGroupName The name of the resource group. @@ -724,6 +831,29 @@ const restartOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listAvailableSizesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DedicatedHostSizeListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostGroupName1, + Parameters.hostName1 + ], + headerParameters: [Parameters.accept], + serializer +}; const listByHostGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", 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..7271bc6a0d0f 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(); @@ -599,7 +609,7 @@ const getOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion3, Parameters.select1, - Parameters.expand8 + Parameters.expand10 ], urlParameters: [ Parameters.$host, diff --git a/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts b/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts index 9f77fc30bddb..db2c30c71f9a 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(); @@ -645,7 +655,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion3, Parameters.expand9], + queryParameters: [Parameters.apiVersion3, Parameters.expand11], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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..c271b859db0b 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(); @@ -622,7 +632,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion3, Parameters.expand9], + queryParameters: [Parameters.apiVersion3, Parameters.expand11], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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..f08ccb1c3f68 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(); @@ -455,7 +459,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand3], + queryParameters: [Parameters.apiVersion, Parameters.expand5], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/compute/arm-compute/src/operations/restorePoints.ts b/sdk/compute/arm-compute/src/operations/restorePoints.ts index 85cbcbafb20b..27bc381911ce 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(); @@ -328,7 +335,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand4], + queryParameters: [Parameters.apiVersion, Parameters.expand6], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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..09a163751fbe 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, @@ -50,6 +54,7 @@ import { VirtualMachineScaleSetsPowerOffOptionalParams, VirtualMachineScaleSetsRestartOptionalParams, VirtualMachineScaleSetsStartOptionalParams, + VirtualMachineScaleSetsReapplyOptionalParams, VirtualMachineScaleSetsRedeployOptionalParams, VirtualMachineScaleSetsPerformMaintenanceOptionalParams, VirtualMachineScaleSetsUpdateInstancesOptionalParams, @@ -454,8 +459,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsCreateOrUpdateResponse > > { @@ -465,7 +470,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 +503,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 +554,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsUpdateResponse > > { @@ -557,7 +565,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 +598,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 +646,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 +686,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 +747,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 +787,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 +833,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 +873,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 +999,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 +1039,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 +1083,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 +1123,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 +1165,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 +1205,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(); @@ -1226,6 +1237,89 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { return poller.pollUntilDone(); } + /** + * Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + async beginReapply( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReapplyOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmScaleSetName, options }, + spec: reapplyOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + async beginReapplyAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReapplyOptionalParams + ): Promise { + const poller = await this.beginReapply( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); + } + /** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and * powers them back on. @@ -1237,14 +1331,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 +1371,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 +1417,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 +1457,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 +1504,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 +1544,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 +1591,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 +1631,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 +1676,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 +1716,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 +1802,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 +1842,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(); @@ -2019,7 +2113,7 @@ const deallocateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.vmInstanceIDs, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.hibernate], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -2234,6 +2328,29 @@ const startOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const reapplyOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reapply", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], + serializer +}; const redeployOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", diff --git a/sdk/compute/arm-compute/src/operations/virtualMachines.ts b/sdk/compute/arm-compute/src/operations/virtualMachines.ts index 0eac9c874844..5775db9e8ca8 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(); @@ -901,10 +914,10 @@ export class VirtualMachinesImpl implements VirtualMachines { /** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual - * machine before performing this operation.
    For Windows, please refer to [Create a managed image - * of a generalized VM in - * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For - * Linux, please refer to [How to create an image of a virtual machine or + * machine before performing this operation. For Windows, please refer to [Create a managed image of a + * generalized VM in + * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, + * please refer to [How to create an image of a virtual machine or * VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -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; @@ -2152,7 +2174,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.expand3 + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -2176,7 +2202,8 @@ const listAllOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.statusOnly + Parameters.statusOnly, + Parameters.expand4 ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], 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..6f8b65adf57c 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts @@ -7,10 +7,11 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DedicatedHost, DedicatedHostsListByHostGroupOptionalParams, + DedicatedHostsListAvailableSizesOptionalParams, DedicatedHostsCreateOrUpdateOptionalParams, DedicatedHostsCreateOrUpdateResponse, DedicatedHostUpdate, @@ -37,6 +38,20 @@ export interface DedicatedHosts { hostGroupName: string, options?: DedicatedHostsListByHostGroupOptionalParams ): PagedAsyncIterableIterator; + /** + * Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: + * The dedicated host sizes provided can be used to only scale up the existing dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + listAvailableSizes( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator; /** * Create or update a dedicated host . * @param resourceGroupName The name of the resource group. @@ -52,8 +67,8 @@ export interface DedicatedHosts { parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsCreateOrUpdateResponse > >; @@ -73,7 +88,7 @@ export interface DedicatedHosts { options?: DedicatedHostsCreateOrUpdateOptionalParams ): Promise; /** - * Update an dedicated host . + * Update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host . @@ -87,13 +102,13 @@ export interface DedicatedHosts { parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DedicatedHostsUpdateResponse > >; /** - * Update an dedicated host . + * Update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host . @@ -119,7 +134,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 +176,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..7fd91293bcbb 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, @@ -33,6 +33,7 @@ import { VirtualMachineScaleSetsPowerOffOptionalParams, VirtualMachineScaleSetsRestartOptionalParams, VirtualMachineScaleSetsStartOptionalParams, + VirtualMachineScaleSetsReapplyOptionalParams, VirtualMachineScaleSetsRedeployOptionalParams, VirtualMachineScaleSetsPerformMaintenanceOptionalParams, VirtualMachineScaleSetsUpdateInstancesOptionalParams, @@ -112,8 +113,8 @@ export interface VirtualMachineScaleSets { parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsCreateOrUpdateResponse > >; @@ -143,8 +144,8 @@ export interface VirtualMachineScaleSets { parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineScaleSetsUpdateResponse > >; @@ -171,7 +172,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 +207,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 +233,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 +270,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 +294,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 +316,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. @@ -327,6 +328,28 @@ export interface VirtualMachineScaleSets { vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams ): Promise; + /** + * Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReapply( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReapplyOptionalParams + ): Promise, void>>; + /** + * Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReapplyAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReapplyOptionalParams + ): Promise; /** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and * powers them back on. @@ -338,7 +361,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 +387,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 +414,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 +440,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 +465,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 +519,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..e38c7c25ba0f 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. @@ -283,10 +283,10 @@ export interface VirtualMachines { ): Promise; /** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual - * machine before performing this operation.
    For Windows, please refer to [Create a managed image - * of a generalized VM in - * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For - * Linux, please refer to [How to create an image of a virtual machine or + * machine before performing this operation. For Windows, please refer to [Create a managed image of a + * generalized VM in + * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, + * please refer to [How to create an image of a virtual machine or * VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -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"