@azure/arm-devtestlabs 3.2.0 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/{LICENSE.txt → LICENSE} +21 -21
- package/README.md +98 -96
- package/dist/index.js +14125 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/devTestLabsClient.d.ts +42 -0
- package/dist-esm/src/devTestLabsClient.d.ts.map +1 -0
- package/dist-esm/src/devTestLabsClient.js +75 -0
- package/dist-esm/src/devTestLabsClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +3339 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +210 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +133 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +2058 -4107
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +65 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +376 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/armTemplates.d.ts +50 -0
- package/dist-esm/src/operations/armTemplates.d.ts.map +1 -0
- package/dist-esm/src/operations/armTemplates.js +188 -0
- package/dist-esm/src/operations/armTemplates.js.map +1 -0
- package/dist-esm/src/operations/artifactSources.d.ts +72 -0
- package/dist-esm/src/operations/artifactSources.d.ts.map +1 -0
- package/dist-esm/src/operations/artifactSources.js +285 -0
- package/dist-esm/src/operations/artifactSources.js.map +1 -0
- package/dist-esm/src/operations/artifacts.d.ts +61 -0
- package/dist-esm/src/operations/artifacts.d.ts.map +1 -0
- package/dist-esm/src/operations/artifacts.js +233 -0
- package/dist-esm/src/operations/artifacts.js.map +1 -0
- package/dist-esm/src/operations/costs.d.ts +30 -0
- package/dist-esm/src/operations/costs.d.ts.map +1 -0
- package/dist-esm/src/operations/costs.js +93 -0
- package/dist-esm/src/operations/costs.js.map +1 -0
- package/dist-esm/src/operations/customImages.d.ts +90 -0
- package/dist-esm/src/operations/customImages.d.ts.map +1 -0
- package/dist-esm/src/operations/customImages.js +378 -0
- package/dist-esm/src/operations/customImages.js.map +1 -0
- package/dist-esm/src/operations/disks.d.ts +143 -0
- package/dist-esm/src/operations/disks.d.ts.map +1 -0
- package/dist-esm/src/operations/disks.js +573 -0
- package/dist-esm/src/operations/disks.js.map +1 -0
- package/dist-esm/src/operations/environments.d.ts +99 -0
- package/dist-esm/src/operations/environments.d.ts.map +1 -0
- package/dist-esm/src/operations/environments.js +393 -0
- package/dist-esm/src/operations/environments.js.map +1 -0
- package/dist-esm/src/operations/formulas.d.ts +82 -0
- package/dist-esm/src/operations/formulas.d.ts.map +1 -0
- package/dist-esm/src/operations/formulas.js +335 -0
- package/dist-esm/src/operations/formulas.js.map +1 -0
- package/dist-esm/src/operations/galleryImages.d.ts +38 -0
- package/dist-esm/src/operations/galleryImages.d.ts.map +1 -0
- package/dist-esm/src/operations/galleryImages.js +149 -0
- package/dist-esm/src/operations/galleryImages.js.map +1 -0
- package/dist-esm/src/operations/globalSchedules.d.ts +114 -0
- package/dist-esm/src/operations/globalSchedules.d.ts.map +1 -0
- package/dist-esm/src/operations/globalSchedules.js +531 -0
- package/dist-esm/src/operations/globalSchedules.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +3 -5
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/labs.d.ts +195 -0
- package/dist-esm/src/operations/labs.d.ts.map +1 -0
- package/dist-esm/src/operations/labs.js +917 -0
- package/dist-esm/src/operations/labs.js.map +1 -0
- package/dist-esm/src/operations/notificationChannels.d.ts +81 -0
- package/dist-esm/src/operations/notificationChannels.d.ts.map +1 -0
- package/dist-esm/src/operations/notificationChannels.js +318 -0
- package/dist-esm/src/operations/notificationChannels.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +20 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +56 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/policies.d.ts +79 -0
- package/dist-esm/src/operations/policies.d.ts.map +1 -0
- package/dist-esm/src/operations/policies.js +298 -0
- package/dist-esm/src/operations/policies.js.map +1 -0
- package/dist-esm/src/operations/policySets.d.ts +22 -0
- package/dist-esm/src/operations/policySets.d.ts.map +1 -0
- package/dist-esm/src/operations/policySets.js +58 -0
- package/dist-esm/src/operations/policySets.js.map +1 -0
- package/dist-esm/src/operations/providerOperations.d.ts +32 -0
- package/dist-esm/src/operations/providerOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/providerOperations.js +120 -0
- package/dist-esm/src/operations/providerOperations.js.map +1 -0
- package/dist-esm/src/operations/schedules.d.ts +116 -0
- package/dist-esm/src/operations/schedules.d.ts.map +1 -0
- package/dist-esm/src/operations/schedules.js +478 -0
- package/dist-esm/src/operations/schedules.js.map +1 -0
- package/dist-esm/src/operations/secrets.d.ts +90 -0
- package/dist-esm/src/operations/secrets.d.ts.map +1 -0
- package/dist-esm/src/operations/secrets.js +349 -0
- package/dist-esm/src/operations/secrets.js.map +1 -0
- package/dist-esm/src/operations/serviceFabricSchedules.d.ts +107 -0
- package/dist-esm/src/operations/serviceFabricSchedules.d.ts.map +1 -0
- package/dist-esm/src/operations/serviceFabricSchedules.js +437 -0
- package/dist-esm/src/operations/serviceFabricSchedules.js.map +1 -0
- package/dist-esm/src/operations/serviceFabrics.d.ts +144 -0
- package/dist-esm/src/operations/serviceFabrics.d.ts.map +1 -0
- package/dist-esm/src/operations/serviceFabrics.js +581 -0
- package/dist-esm/src/operations/serviceFabrics.js.map +1 -0
- package/dist-esm/src/operations/serviceRunners.d.ts +38 -0
- package/dist-esm/src/operations/serviceRunners.d.ts.map +1 -0
- package/dist-esm/src/operations/serviceRunners.js +124 -0
- package/dist-esm/src/operations/serviceRunners.js.map +1 -0
- package/dist-esm/src/operations/users.d.ts +90 -0
- package/dist-esm/src/operations/users.d.ts.map +1 -0
- package/dist-esm/src/operations/users.js +378 -0
- package/dist-esm/src/operations/users.js.map +1 -0
- package/dist-esm/src/operations/virtualMachineSchedules.d.ts +98 -0
- package/dist-esm/src/operations/virtualMachineSchedules.d.ts.map +1 -0
- package/dist-esm/src/operations/virtualMachineSchedules.js +391 -0
- package/dist-esm/src/operations/virtualMachineSchedules.js.map +1 -0
- package/dist-esm/src/operations/virtualMachines.d.ts +292 -0
- package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
- package/dist-esm/src/operations/virtualMachines.js +1280 -0
- package/dist-esm/src/operations/virtualMachines.js.map +1 -0
- package/dist-esm/src/operations/virtualNetworks.d.ts +90 -0
- package/dist-esm/src/operations/virtualNetworks.d.ts.map +1 -0
- package/dist-esm/src/operations/virtualNetworks.js +378 -0
- package/dist-esm/src/operations/virtualNetworks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/armTemplates.d.ts +23 -0
- package/dist-esm/src/operationsInterfaces/armTemplates.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/armTemplates.js +9 -0
- package/dist-esm/src/operationsInterfaces/armTemplates.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/artifactSources.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/artifactSources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/artifactSources.js +9 -0
- package/dist-esm/src/operationsInterfaces/artifactSources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/artifacts.d.ts +34 -0
- package/dist-esm/src/operationsInterfaces/artifacts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/artifacts.js +9 -0
- package/dist-esm/src/operationsInterfaces/artifacts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/costs.d.ts +22 -0
- package/dist-esm/src/operationsInterfaces/costs.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/costs.js +9 -0
- package/dist-esm/src/operationsInterfaces/costs.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/customImages.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/customImages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/customImages.js +9 -0
- package/dist-esm/src/operationsInterfaces/customImages.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/disks.d.ts +116 -0
- package/dist-esm/src/operationsInterfaces/disks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/disks.js +9 -0
- package/dist-esm/src/operationsInterfaces/disks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/environments.d.ts +72 -0
- package/dist-esm/src/operationsInterfaces/environments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/environments.js +9 -0
- package/dist-esm/src/operationsInterfaces/environments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/formulas.d.ts +57 -0
- package/dist-esm/src/operationsInterfaces/formulas.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/formulas.js +9 -0
- package/dist-esm/src/operationsInterfaces/formulas.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/galleryImages.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/galleryImages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/galleryImages.js +9 -0
- package/dist-esm/src/operationsInterfaces/galleryImages.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/globalSchedules.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/globalSchedules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/globalSchedules.js +9 -0
- package/dist-esm/src/operationsInterfaces/globalSchedules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +26 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +33 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/labs.d.ts +142 -0
- package/dist-esm/src/operationsInterfaces/labs.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/labs.js +9 -0
- package/dist-esm/src/operationsInterfaces/labs.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/notificationChannels.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/notificationChannels.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/notificationChannels.js +9 -0
- package/dist-esm/src/operationsInterfaces/notificationChannels.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts +52 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.js +9 -0
- package/dist-esm/src/operationsInterfaces/policies.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/policySets.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/policySets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/policySets.js +9 -0
- package/dist-esm/src/operationsInterfaces/policySets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/providerOperations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/providerOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/providerOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/providerOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/schedules.d.ts +72 -0
- package/dist-esm/src/operationsInterfaces/schedules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/schedules.js +9 -0
- package/dist-esm/src/operationsInterfaces/schedules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/secrets.d.ts +63 -0
- package/dist-esm/src/operationsInterfaces/secrets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/secrets.js +9 -0
- package/dist-esm/src/operationsInterfaces/secrets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceFabricSchedules.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/serviceFabricSchedules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceFabricSchedules.js +9 -0
- package/dist-esm/src/operationsInterfaces/serviceFabricSchedules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceFabrics.d.ts +117 -0
- package/dist-esm/src/operationsInterfaces/serviceFabrics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceFabrics.js +9 -0
- package/dist-esm/src/operationsInterfaces/serviceFabrics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceRunners.d.ts +30 -0
- package/dist-esm/src/operationsInterfaces/serviceRunners.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/serviceRunners.js +9 -0
- package/dist-esm/src/operationsInterfaces/serviceRunners.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/users.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/users.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/users.js +9 -0
- package/dist-esm/src/operationsInterfaces/users.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineSchedules.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineSchedules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineSchedules.js +9 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineSchedules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +267 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualNetworks.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/virtualNetworks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualNetworks.js +9 -0
- package/dist-esm/src/operationsInterfaces/virtualNetworks.js.map +1 -0
- package/dist-esm/test/devtestlabs_examples.d.ts +4 -0
- package/dist-esm/test/devtestlabs_examples.d.ts.map +1 -0
- package/dist-esm/test/devtestlabs_examples.js +116 -0
- package/dist-esm/test/devtestlabs_examples.js.map +1 -0
- package/package.json +67 -33
- package/review/arm-devtestlabs.api.md +2985 -0
- package/rollup.config.js +181 -30
- package/src/devTestLabsClient.ts +175 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +3876 -0
- package/{lib → src}/models/mappers.ts +2171 -4355
- package/src/models/parameters.ts +489 -0
- package/src/operations/armTemplates.ts +263 -0
- package/src/operations/artifactSources.ts +375 -0
- package/src/operations/artifacts.ts +323 -0
- package/src/operations/costs.ts +127 -0
- package/src/operations/customImages.ts +525 -0
- package/src/operations/disks.ts +836 -0
- package/src/operations/environments.ts +570 -0
- package/src/operations/formulas.ts +457 -0
- package/src/operations/galleryImages.ts +189 -0
- package/src/operations/globalSchedules.ts +688 -0
- package/{lib → src}/operations/index.ts +3 -5
- package/src/operations/labs.ts +1241 -0
- package/src/operations/notificationChannels.ts +421 -0
- package/src/operations/operations.ts +72 -0
- package/src/operations/policies.ts +414 -0
- package/src/operations/policySets.ts +80 -0
- package/src/operations/providerOperations.ts +137 -0
- package/src/operations/schedules.ts +657 -0
- package/src/operations/secrets.ts +499 -0
- package/src/operations/serviceFabricSchedules.ts +609 -0
- package/src/operations/serviceFabrics.ts +849 -0
- package/src/operations/serviceRunners.ts +169 -0
- package/src/operations/users.ts +525 -0
- package/src/operations/virtualMachineSchedules.ts +546 -0
- package/src/operations/virtualMachines.ts +1863 -0
- package/src/operations/virtualNetworks.ts +525 -0
- package/src/operationsInterfaces/armTemplates.ts +48 -0
- package/src/operationsInterfaces/artifactSources.ts +93 -0
- package/src/operationsInterfaces/artifacts.ts +69 -0
- package/src/operationsInterfaces/costs.ts +47 -0
- package/src/operationsInterfaces/customImages.ts +127 -0
- package/src/operationsInterfaces/disks.ts +217 -0
- package/src/operationsInterfaces/environments.ts +141 -0
- package/src/operationsInterfaces/formulas.ts +114 -0
- package/src/operationsInterfaces/galleryImages.ts +26 -0
- package/src/operationsInterfaces/globalSchedules.ts +143 -0
- package/src/operationsInterfaces/index.ts +33 -0
- package/src/operationsInterfaces/labs.ts +259 -0
- package/src/operationsInterfaces/notificationChannels.ts +110 -0
- package/src/operationsInterfaces/operations.ts +24 -0
- package/src/operationsInterfaces/policies.ts +103 -0
- package/src/operationsInterfaces/policySets.ts +32 -0
- package/src/operationsInterfaces/providerOperations.ts +25 -0
- package/src/operationsInterfaces/schedules.ts +135 -0
- package/src/operationsInterfaces/secrets.ts +126 -0
- package/src/operationsInterfaces/serviceFabricSchedules.ts +149 -0
- package/src/operationsInterfaces/serviceFabrics.ts +220 -0
- package/src/operationsInterfaces/serviceRunners.ts +61 -0
- package/src/operationsInterfaces/users.ts +127 -0
- package/src/operationsInterfaces/virtualMachineSchedules.ts +135 -0
- package/src/operationsInterfaces/virtualMachines.ts +476 -0
- package/src/operationsInterfaces/virtualNetworks.ts +127 -0
- package/tsconfig.json +4 -4
- package/types/arm-devtestlabs.d.ts +5414 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-devtestlabs.js +0 -16392
- package/dist/arm-devtestlabs.js.map +0 -1
- package/dist/arm-devtestlabs.min.js +0 -1
- package/dist/arm-devtestlabs.min.js.map +0 -1
- package/esm/devTestLabsClient.d.ts +0 -42
- package/esm/devTestLabsClient.d.ts.map +0 -1
- package/esm/devTestLabsClient.js +0 -57
- package/esm/devTestLabsClient.js.map +0 -1
- package/esm/devTestLabsClientContext.d.ts +0 -16
- package/esm/devTestLabsClientContext.d.ts.map +0 -1
- package/esm/devTestLabsClientContext.js +0 -56
- package/esm/devTestLabsClientContext.js.map +0 -1
- package/esm/models/armTemplatesMappers.d.ts +0 -2
- package/esm/models/armTemplatesMappers.d.ts.map +0 -1
- package/esm/models/armTemplatesMappers.js +0 -9
- package/esm/models/armTemplatesMappers.js.map +0 -1
- package/esm/models/artifactSourcesMappers.d.ts +0 -2
- package/esm/models/artifactSourcesMappers.d.ts.map +0 -1
- package/esm/models/artifactSourcesMappers.js +0 -9
- package/esm/models/artifactSourcesMappers.js.map +0 -1
- package/esm/models/artifactsMappers.d.ts +0 -2
- package/esm/models/artifactsMappers.d.ts.map +0 -1
- package/esm/models/artifactsMappers.js +0 -9
- package/esm/models/artifactsMappers.js.map +0 -1
- package/esm/models/costsMappers.d.ts +0 -2
- package/esm/models/costsMappers.d.ts.map +0 -1
- package/esm/models/costsMappers.js +0 -9
- package/esm/models/costsMappers.js.map +0 -1
- package/esm/models/customImagesMappers.d.ts +0 -2
- package/esm/models/customImagesMappers.d.ts.map +0 -1
- package/esm/models/customImagesMappers.js +0 -9
- package/esm/models/customImagesMappers.js.map +0 -1
- package/esm/models/disksMappers.d.ts +0 -2
- package/esm/models/disksMappers.d.ts.map +0 -1
- package/esm/models/disksMappers.js +0 -9
- package/esm/models/disksMappers.js.map +0 -1
- package/esm/models/environmentsMappers.d.ts +0 -2
- package/esm/models/environmentsMappers.d.ts.map +0 -1
- package/esm/models/environmentsMappers.js +0 -9
- package/esm/models/environmentsMappers.js.map +0 -1
- package/esm/models/formulasMappers.d.ts +0 -2
- package/esm/models/formulasMappers.d.ts.map +0 -1
- package/esm/models/formulasMappers.js +0 -9
- package/esm/models/formulasMappers.js.map +0 -1
- package/esm/models/galleryImagesMappers.d.ts +0 -2
- package/esm/models/galleryImagesMappers.d.ts.map +0 -1
- package/esm/models/galleryImagesMappers.js +0 -9
- package/esm/models/galleryImagesMappers.js.map +0 -1
- package/esm/models/globalSchedulesMappers.d.ts +0 -2
- package/esm/models/globalSchedulesMappers.d.ts.map +0 -1
- package/esm/models/globalSchedulesMappers.js +0 -9
- package/esm/models/globalSchedulesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -7024
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/labsMappers.d.ts +0 -2
- package/esm/models/labsMappers.d.ts.map +0 -1
- package/esm/models/labsMappers.js +0 -9
- package/esm/models/labsMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -171
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/notificationChannelsMappers.d.ts +0 -2
- package/esm/models/notificationChannelsMappers.d.ts.map +0 -1
- package/esm/models/notificationChannelsMappers.js +0 -9
- package/esm/models/notificationChannelsMappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -19
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -190
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/policiesMappers.d.ts +0 -2
- package/esm/models/policiesMappers.d.ts.map +0 -1
- package/esm/models/policiesMappers.js +0 -9
- package/esm/models/policiesMappers.js.map +0 -1
- package/esm/models/policySetsMappers.d.ts +0 -2
- package/esm/models/policySetsMappers.d.ts.map +0 -1
- package/esm/models/policySetsMappers.js +0 -9
- package/esm/models/policySetsMappers.js.map +0 -1
- package/esm/models/providerOperationsMappers.d.ts +0 -2
- package/esm/models/providerOperationsMappers.d.ts.map +0 -1
- package/esm/models/providerOperationsMappers.js +0 -9
- package/esm/models/providerOperationsMappers.js.map +0 -1
- package/esm/models/schedulesMappers.d.ts +0 -2
- package/esm/models/schedulesMappers.d.ts.map +0 -1
- package/esm/models/schedulesMappers.js +0 -9
- package/esm/models/schedulesMappers.js.map +0 -1
- package/esm/models/secretsMappers.d.ts +0 -2
- package/esm/models/secretsMappers.d.ts.map +0 -1
- package/esm/models/secretsMappers.js +0 -9
- package/esm/models/secretsMappers.js.map +0 -1
- package/esm/models/serviceFabricSchedulesMappers.d.ts +0 -2
- package/esm/models/serviceFabricSchedulesMappers.d.ts.map +0 -1
- package/esm/models/serviceFabricSchedulesMappers.js +0 -9
- package/esm/models/serviceFabricSchedulesMappers.js.map +0 -1
- package/esm/models/serviceFabricsMappers.d.ts +0 -2
- package/esm/models/serviceFabricsMappers.d.ts.map +0 -1
- package/esm/models/serviceFabricsMappers.js +0 -9
- package/esm/models/serviceFabricsMappers.js.map +0 -1
- package/esm/models/serviceRunnersMappers.d.ts +0 -2
- package/esm/models/serviceRunnersMappers.d.ts.map +0 -1
- package/esm/models/serviceRunnersMappers.js +0 -9
- package/esm/models/serviceRunnersMappers.js.map +0 -1
- package/esm/models/usersMappers.d.ts +0 -2
- package/esm/models/usersMappers.d.ts.map +0 -1
- package/esm/models/usersMappers.js +0 -9
- package/esm/models/usersMappers.js.map +0 -1
- package/esm/models/virtualMachineSchedulesMappers.d.ts +0 -2
- package/esm/models/virtualMachineSchedulesMappers.d.ts.map +0 -1
- package/esm/models/virtualMachineSchedulesMappers.js +0 -9
- package/esm/models/virtualMachineSchedulesMappers.js.map +0 -1
- package/esm/models/virtualMachinesMappers.d.ts +0 -2
- package/esm/models/virtualMachinesMappers.d.ts.map +0 -1
- package/esm/models/virtualMachinesMappers.js +0 -9
- package/esm/models/virtualMachinesMappers.js.map +0 -1
- package/esm/models/virtualNetworksMappers.d.ts +0 -2
- package/esm/models/virtualNetworksMappers.d.ts.map +0 -1
- package/esm/models/virtualNetworksMappers.js +0 -9
- package/esm/models/virtualNetworksMappers.js.map +0 -1
- package/esm/operations/armTemplates.d.ts +0 -82
- package/esm/operations/armTemplates.d.ts.map +0 -1
- package/esm/operations/armTemplates.js +0 -126
- package/esm/operations/armTemplates.js.map +0 -1
- package/esm/operations/artifactSources.d.ts +0 -154
- package/esm/operations/artifactSources.d.ts.map +0 -1
- package/esm/operations/artifactSources.js +0 -234
- package/esm/operations/artifactSources.js.map +0 -1
- package/esm/operations/artifacts.d.ts +0 -116
- package/esm/operations/artifacts.d.ts.map +0 -1
- package/esm/operations/artifacts.js +0 -167
- package/esm/operations/artifacts.js.map +0 -1
- package/esm/operations/costs.d.ts +0 -64
- package/esm/operations/costs.d.ts.map +0 -1
- package/esm/operations/costs.js +0 -103
- package/esm/operations/costs.js.map +0 -1
- package/esm/operations/customImages.d.ts +0 -142
- package/esm/operations/customImages.d.ts.map +0 -1
- package/esm/operations/customImages.js +0 -277
- package/esm/operations/customImages.js.map +0 -1
- package/esm/operations/disks.d.ts +0 -203
- package/esm/operations/disks.d.ts.map +0 -1
- package/esm/operations/disks.js +0 -421
- package/esm/operations/disks.js.map +0 -1
- package/esm/operations/environments.d.ts +0 -155
- package/esm/operations/environments.d.ts.map +0 -1
- package/esm/operations/environments.js +0 -291
- package/esm/operations/environments.js.map +0 -1
- package/esm/operations/formulas.d.ts +0 -148
- package/esm/operations/formulas.d.ts.map +0 -1
- package/esm/operations/formulas.js +0 -256
- package/esm/operations/formulas.js.map +0 -1
- package/esm/operations/galleryImages.d.ts +0 -52
- package/esm/operations/galleryImages.d.ts.map +0 -1
- package/esm/operations/galleryImages.js +0 -88
- package/esm/operations/galleryImages.js.map +0 -1
- package/esm/operations/globalSchedules.d.ts +0 -207
- package/esm/operations/globalSchedules.d.ts.map +0 -1
- package/esm/operations/globalSchedules.js +0 -384
- package/esm/operations/globalSchedules.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/labs.d.ts +0 -301
- package/esm/operations/labs.d.ts.map +0 -1
- package/esm/operations/labs.js +0 -632
- package/esm/operations/labs.js.map +0 -1
- package/esm/operations/notificationChannels.d.ts +0 -181
- package/esm/operations/notificationChannels.d.ts.map +0 -1
- package/esm/operations/notificationChannels.js +0 -270
- package/esm/operations/notificationChannels.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -34
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -58
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/policies.d.ts +0 -169
- package/esm/operations/policies.d.ts.map +0 -1
- package/esm/operations/policies.js +0 -244
- package/esm/operations/policies.js.map +0 -1
- package/esm/operations/policySets.d.ts +0 -40
- package/esm/operations/policySets.d.ts.map +0 -1
- package/esm/operations/policySets.js +0 -66
- package/esm/operations/policySets.js.map +0 -1
- package/esm/operations/providerOperations.d.ts +0 -46
- package/esm/operations/providerOperations.d.ts.map +0 -1
- package/esm/operations/providerOperations.js +0 -77
- package/esm/operations/providerOperations.js.map +0 -1
- package/esm/operations/schedules.d.ts +0 -215
- package/esm/operations/schedules.d.ts.map +0 -1
- package/esm/operations/schedules.js +0 -345
- package/esm/operations/schedules.js.map +0 -1
- package/esm/operations/secrets.d.ts +0 -162
- package/esm/operations/secrets.d.ts.map +0 -1
- package/esm/operations/secrets.js +0 -268
- package/esm/operations/secrets.js.map +0 -1
- package/esm/operations/serviceFabricSchedules.d.ts +0 -207
- package/esm/operations/serviceFabricSchedules.d.ts.map +0 -1
- package/esm/operations/serviceFabricSchedules.js +0 -314
- package/esm/operations/serviceFabricSchedules.js.map +0 -1
- package/esm/operations/serviceFabrics.d.ts +0 -222
- package/esm/operations/serviceFabrics.d.ts.map +0 -1
- package/esm/operations/serviceFabrics.js +0 -438
- package/esm/operations/serviceFabrics.js.map +0 -1
- package/esm/operations/serviceRunners.d.ts +0 -127
- package/esm/operations/serviceRunners.d.ts.map +0 -1
- package/esm/operations/serviceRunners.js +0 -194
- package/esm/operations/serviceRunners.js.map +0 -1
- package/esm/operations/users.d.ts +0 -142
- package/esm/operations/users.d.ts.map +0 -1
- package/esm/operations/users.js +0 -277
- package/esm/operations/users.js.map +0 -1
- package/esm/operations/virtualMachineSchedules.d.ts +0 -190
- package/esm/operations/virtualMachineSchedules.d.ts.map +0 -1
- package/esm/operations/virtualMachineSchedules.js +0 -300
- package/esm/operations/virtualMachineSchedules.js.map +0 -1
- package/esm/operations/virtualMachines.d.ts +0 -402
- package/esm/operations/virtualMachines.d.ts.map +0 -1
- package/esm/operations/virtualMachines.js +0 -949
- package/esm/operations/virtualMachines.js.map +0 -1
- package/esm/operations/virtualNetworks.d.ts +0 -142
- package/esm/operations/virtualNetworks.d.ts.map +0 -1
- package/esm/operations/virtualNetworks.js +0 -277
- package/esm/operations/virtualNetworks.js.map +0 -1
- package/lib/devTestLabsClient.ts +0 -90
- package/lib/devTestLabsClientContext.ts +0 -62
- package/lib/models/armTemplatesMappers.ts +0 -80
- package/lib/models/artifactSourcesMappers.ts +0 -130
- package/lib/models/artifactsMappers.ts +0 -83
- package/lib/models/costsMappers.ts +0 -79
- package/lib/models/customImagesMappers.ts +0 -130
- package/lib/models/disksMappers.ts +0 -132
- package/lib/models/environmentsMappers.ts +0 -130
- package/lib/models/formulasMappers.ts +0 -130
- package/lib/models/galleryImagesMappers.ts +0 -80
- package/lib/models/globalSchedulesMappers.ts +0 -131
- package/lib/models/index.ts +0 -7501
- package/lib/models/labsMappers.ts +0 -136
- package/lib/models/notificationChannelsMappers.ts +0 -131
- package/lib/models/operationsMappers.ts +0 -13
- package/lib/models/parameters.ts +0 -192
- package/lib/models/policiesMappers.ts +0 -130
- package/lib/models/policySetsMappers.ts +0 -16
- package/lib/models/providerOperationsMappers.ts +0 -14
- package/lib/models/schedulesMappers.ts +0 -130
- package/lib/models/secretsMappers.ts +0 -130
- package/lib/models/serviceFabricSchedulesMappers.ts +0 -130
- package/lib/models/serviceFabricsMappers.ts +0 -130
- package/lib/models/serviceRunnersMappers.ts +0 -80
- package/lib/models/usersMappers.ts +0 -130
- package/lib/models/virtualMachineSchedulesMappers.ts +0 -130
- package/lib/models/virtualMachinesMappers.ts +0 -134
- package/lib/models/virtualNetworksMappers.ts +0 -130
- package/lib/operations/armTemplates.ts +0 -213
- package/lib/operations/artifactSources.ts +0 -413
- package/lib/operations/artifacts.ts +0 -295
- package/lib/operations/costs.ts +0 -169
- package/lib/operations/customImages.ts +0 -408
- package/lib/operations/disks.ts +0 -579
- package/lib/operations/environments.ts +0 -431
- package/lib/operations/formulas.ts +0 -410
- package/lib/operations/galleryImages.ts +0 -140
- package/lib/operations/globalSchedules.ts +0 -607
- package/lib/operations/labs.ts +0 -911
- package/lib/operations/notificationChannels.ts +0 -484
- package/lib/operations/operations.ts +0 -87
- package/lib/operations/policies.ts +0 -438
- package/lib/operations/policySets.ts +0 -103
- package/lib/operations/providerOperations.ts +0 -123
- package/lib/operations/schedules.ts +0 -583
- package/lib/operations/secrets.ts +0 -434
- package/lib/operations/serviceFabricSchedules.ts +0 -530
- package/lib/operations/serviceFabrics.ts +0 -622
- package/lib/operations/serviceRunners.ts +0 -338
- package/lib/operations/users.ts +0 -408
- package/lib/operations/virtualMachineSchedules.ts +0 -501
- package/lib/operations/virtualMachines.ts +0 -1216
- package/lib/operations/virtualNetworks.ts +0 -408
|
@@ -0,0 +1,1863 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { VirtualMachines } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { DevTestLabsClient } from "../devTestLabsClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
LabVirtualMachine,
|
|
19
|
+
VirtualMachinesListNextOptionalParams,
|
|
20
|
+
VirtualMachinesListOptionalParams,
|
|
21
|
+
VirtualMachinesListResponse,
|
|
22
|
+
VirtualMachinesGetOptionalParams,
|
|
23
|
+
VirtualMachinesGetResponse,
|
|
24
|
+
VirtualMachinesCreateOrUpdateOptionalParams,
|
|
25
|
+
VirtualMachinesCreateOrUpdateResponse,
|
|
26
|
+
VirtualMachinesDeleteOptionalParams,
|
|
27
|
+
LabVirtualMachineFragment,
|
|
28
|
+
VirtualMachinesUpdateOptionalParams,
|
|
29
|
+
VirtualMachinesUpdateResponse,
|
|
30
|
+
DataDiskProperties,
|
|
31
|
+
VirtualMachinesAddDataDiskOptionalParams,
|
|
32
|
+
ApplyArtifactsRequest,
|
|
33
|
+
VirtualMachinesApplyArtifactsOptionalParams,
|
|
34
|
+
VirtualMachinesClaimOptionalParams,
|
|
35
|
+
DetachDataDiskProperties,
|
|
36
|
+
VirtualMachinesDetachDataDiskOptionalParams,
|
|
37
|
+
VirtualMachinesGetRdpFileContentsOptionalParams,
|
|
38
|
+
VirtualMachinesGetRdpFileContentsResponse,
|
|
39
|
+
VirtualMachinesListApplicableSchedulesOptionalParams,
|
|
40
|
+
VirtualMachinesListApplicableSchedulesResponse,
|
|
41
|
+
VirtualMachinesRedeployOptionalParams,
|
|
42
|
+
ResizeLabVirtualMachineProperties,
|
|
43
|
+
VirtualMachinesResizeOptionalParams,
|
|
44
|
+
VirtualMachinesRestartOptionalParams,
|
|
45
|
+
VirtualMachinesStartOptionalParams,
|
|
46
|
+
VirtualMachinesStopOptionalParams,
|
|
47
|
+
VirtualMachinesTransferDisksOptionalParams,
|
|
48
|
+
VirtualMachinesUnClaimOptionalParams,
|
|
49
|
+
VirtualMachinesListNextResponse
|
|
50
|
+
} from "../models";
|
|
51
|
+
|
|
52
|
+
/// <reference lib="esnext.asynciterable" />
|
|
53
|
+
/** Class containing VirtualMachines operations. */
|
|
54
|
+
export class VirtualMachinesImpl implements VirtualMachines {
|
|
55
|
+
private readonly client: DevTestLabsClient;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Initialize a new instance of the class VirtualMachines class.
|
|
59
|
+
* @param client Reference to the service client
|
|
60
|
+
*/
|
|
61
|
+
constructor(client: DevTestLabsClient) {
|
|
62
|
+
this.client = client;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* List virtual machines in a given lab.
|
|
67
|
+
* @param resourceGroupName The name of the resource group.
|
|
68
|
+
* @param labName The name of the lab.
|
|
69
|
+
* @param options The options parameters.
|
|
70
|
+
*/
|
|
71
|
+
public list(
|
|
72
|
+
resourceGroupName: string,
|
|
73
|
+
labName: string,
|
|
74
|
+
options?: VirtualMachinesListOptionalParams
|
|
75
|
+
): PagedAsyncIterableIterator<LabVirtualMachine> {
|
|
76
|
+
const iter = this.listPagingAll(resourceGroupName, labName, options);
|
|
77
|
+
return {
|
|
78
|
+
next() {
|
|
79
|
+
return iter.next();
|
|
80
|
+
},
|
|
81
|
+
[Symbol.asyncIterator]() {
|
|
82
|
+
return this;
|
|
83
|
+
},
|
|
84
|
+
byPage: () => {
|
|
85
|
+
return this.listPagingPage(resourceGroupName, labName, options);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private async *listPagingPage(
|
|
91
|
+
resourceGroupName: string,
|
|
92
|
+
labName: string,
|
|
93
|
+
options?: VirtualMachinesListOptionalParams
|
|
94
|
+
): AsyncIterableIterator<LabVirtualMachine[]> {
|
|
95
|
+
let result = await this._list(resourceGroupName, labName, options);
|
|
96
|
+
yield result.value || [];
|
|
97
|
+
let continuationToken = result.nextLink;
|
|
98
|
+
while (continuationToken) {
|
|
99
|
+
result = await this._listNext(
|
|
100
|
+
resourceGroupName,
|
|
101
|
+
labName,
|
|
102
|
+
continuationToken,
|
|
103
|
+
options
|
|
104
|
+
);
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
yield result.value || [];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private async *listPagingAll(
|
|
111
|
+
resourceGroupName: string,
|
|
112
|
+
labName: string,
|
|
113
|
+
options?: VirtualMachinesListOptionalParams
|
|
114
|
+
): AsyncIterableIterator<LabVirtualMachine> {
|
|
115
|
+
for await (const page of this.listPagingPage(
|
|
116
|
+
resourceGroupName,
|
|
117
|
+
labName,
|
|
118
|
+
options
|
|
119
|
+
)) {
|
|
120
|
+
yield* page;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* List virtual machines in a given lab.
|
|
126
|
+
* @param resourceGroupName The name of the resource group.
|
|
127
|
+
* @param labName The name of the lab.
|
|
128
|
+
* @param options The options parameters.
|
|
129
|
+
*/
|
|
130
|
+
private _list(
|
|
131
|
+
resourceGroupName: string,
|
|
132
|
+
labName: string,
|
|
133
|
+
options?: VirtualMachinesListOptionalParams
|
|
134
|
+
): Promise<VirtualMachinesListResponse> {
|
|
135
|
+
return this.client.sendOperationRequest(
|
|
136
|
+
{ resourceGroupName, labName, options },
|
|
137
|
+
listOperationSpec
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get virtual machine.
|
|
143
|
+
* @param resourceGroupName The name of the resource group.
|
|
144
|
+
* @param labName The name of the lab.
|
|
145
|
+
* @param name The name of the virtual machine.
|
|
146
|
+
* @param options The options parameters.
|
|
147
|
+
*/
|
|
148
|
+
get(
|
|
149
|
+
resourceGroupName: string,
|
|
150
|
+
labName: string,
|
|
151
|
+
name: string,
|
|
152
|
+
options?: VirtualMachinesGetOptionalParams
|
|
153
|
+
): Promise<VirtualMachinesGetResponse> {
|
|
154
|
+
return this.client.sendOperationRequest(
|
|
155
|
+
{ resourceGroupName, labName, name, options },
|
|
156
|
+
getOperationSpec
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Create or replace an existing virtual machine. This operation can take a while to complete.
|
|
162
|
+
* @param resourceGroupName The name of the resource group.
|
|
163
|
+
* @param labName The name of the lab.
|
|
164
|
+
* @param name The name of the virtual machine.
|
|
165
|
+
* @param labVirtualMachine A virtual machine.
|
|
166
|
+
* @param options The options parameters.
|
|
167
|
+
*/
|
|
168
|
+
async beginCreateOrUpdate(
|
|
169
|
+
resourceGroupName: string,
|
|
170
|
+
labName: string,
|
|
171
|
+
name: string,
|
|
172
|
+
labVirtualMachine: LabVirtualMachine,
|
|
173
|
+
options?: VirtualMachinesCreateOrUpdateOptionalParams
|
|
174
|
+
): Promise<
|
|
175
|
+
PollerLike<
|
|
176
|
+
PollOperationState<VirtualMachinesCreateOrUpdateResponse>,
|
|
177
|
+
VirtualMachinesCreateOrUpdateResponse
|
|
178
|
+
>
|
|
179
|
+
> {
|
|
180
|
+
const directSendOperation = async (
|
|
181
|
+
args: coreClient.OperationArguments,
|
|
182
|
+
spec: coreClient.OperationSpec
|
|
183
|
+
): Promise<VirtualMachinesCreateOrUpdateResponse> => {
|
|
184
|
+
return this.client.sendOperationRequest(args, spec);
|
|
185
|
+
};
|
|
186
|
+
const sendOperation = async (
|
|
187
|
+
args: coreClient.OperationArguments,
|
|
188
|
+
spec: coreClient.OperationSpec
|
|
189
|
+
) => {
|
|
190
|
+
let currentRawResponse:
|
|
191
|
+
| coreClient.FullOperationResponse
|
|
192
|
+
| undefined = undefined;
|
|
193
|
+
const providedCallback = args.options?.onResponse;
|
|
194
|
+
const callback: coreClient.RawResponseCallback = (
|
|
195
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
196
|
+
flatResponse: unknown
|
|
197
|
+
) => {
|
|
198
|
+
currentRawResponse = rawResponse;
|
|
199
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
200
|
+
};
|
|
201
|
+
const updatedArgs = {
|
|
202
|
+
...args,
|
|
203
|
+
options: {
|
|
204
|
+
...args.options,
|
|
205
|
+
onResponse: callback
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
209
|
+
return {
|
|
210
|
+
flatResponse,
|
|
211
|
+
rawResponse: {
|
|
212
|
+
statusCode: currentRawResponse!.status,
|
|
213
|
+
body: currentRawResponse!.parsedBody,
|
|
214
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const lro = new LroImpl(
|
|
220
|
+
sendOperation,
|
|
221
|
+
{ resourceGroupName, labName, name, labVirtualMachine, options },
|
|
222
|
+
createOrUpdateOperationSpec
|
|
223
|
+
);
|
|
224
|
+
return new LroEngine(lro, {
|
|
225
|
+
resumeFrom: options?.resumeFrom,
|
|
226
|
+
intervalInMs: options?.updateIntervalInMs
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Create or replace an existing virtual machine. This operation can take a while to complete.
|
|
232
|
+
* @param resourceGroupName The name of the resource group.
|
|
233
|
+
* @param labName The name of the lab.
|
|
234
|
+
* @param name The name of the virtual machine.
|
|
235
|
+
* @param labVirtualMachine A virtual machine.
|
|
236
|
+
* @param options The options parameters.
|
|
237
|
+
*/
|
|
238
|
+
async beginCreateOrUpdateAndWait(
|
|
239
|
+
resourceGroupName: string,
|
|
240
|
+
labName: string,
|
|
241
|
+
name: string,
|
|
242
|
+
labVirtualMachine: LabVirtualMachine,
|
|
243
|
+
options?: VirtualMachinesCreateOrUpdateOptionalParams
|
|
244
|
+
): Promise<VirtualMachinesCreateOrUpdateResponse> {
|
|
245
|
+
const poller = await this.beginCreateOrUpdate(
|
|
246
|
+
resourceGroupName,
|
|
247
|
+
labName,
|
|
248
|
+
name,
|
|
249
|
+
labVirtualMachine,
|
|
250
|
+
options
|
|
251
|
+
);
|
|
252
|
+
return poller.pollUntilDone();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Delete virtual machine. This operation can take a while to complete.
|
|
257
|
+
* @param resourceGroupName The name of the resource group.
|
|
258
|
+
* @param labName The name of the lab.
|
|
259
|
+
* @param name The name of the virtual machine.
|
|
260
|
+
* @param options The options parameters.
|
|
261
|
+
*/
|
|
262
|
+
async beginDelete(
|
|
263
|
+
resourceGroupName: string,
|
|
264
|
+
labName: string,
|
|
265
|
+
name: string,
|
|
266
|
+
options?: VirtualMachinesDeleteOptionalParams
|
|
267
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
268
|
+
const directSendOperation = async (
|
|
269
|
+
args: coreClient.OperationArguments,
|
|
270
|
+
spec: coreClient.OperationSpec
|
|
271
|
+
): Promise<void> => {
|
|
272
|
+
return this.client.sendOperationRequest(args, spec);
|
|
273
|
+
};
|
|
274
|
+
const sendOperation = async (
|
|
275
|
+
args: coreClient.OperationArguments,
|
|
276
|
+
spec: coreClient.OperationSpec
|
|
277
|
+
) => {
|
|
278
|
+
let currentRawResponse:
|
|
279
|
+
| coreClient.FullOperationResponse
|
|
280
|
+
| undefined = undefined;
|
|
281
|
+
const providedCallback = args.options?.onResponse;
|
|
282
|
+
const callback: coreClient.RawResponseCallback = (
|
|
283
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
284
|
+
flatResponse: unknown
|
|
285
|
+
) => {
|
|
286
|
+
currentRawResponse = rawResponse;
|
|
287
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
288
|
+
};
|
|
289
|
+
const updatedArgs = {
|
|
290
|
+
...args,
|
|
291
|
+
options: {
|
|
292
|
+
...args.options,
|
|
293
|
+
onResponse: callback
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
297
|
+
return {
|
|
298
|
+
flatResponse,
|
|
299
|
+
rawResponse: {
|
|
300
|
+
statusCode: currentRawResponse!.status,
|
|
301
|
+
body: currentRawResponse!.parsedBody,
|
|
302
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
const lro = new LroImpl(
|
|
308
|
+
sendOperation,
|
|
309
|
+
{ resourceGroupName, labName, name, options },
|
|
310
|
+
deleteOperationSpec
|
|
311
|
+
);
|
|
312
|
+
return new LroEngine(lro, {
|
|
313
|
+
resumeFrom: options?.resumeFrom,
|
|
314
|
+
intervalInMs: options?.updateIntervalInMs
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Delete virtual machine. This operation can take a while to complete.
|
|
320
|
+
* @param resourceGroupName The name of the resource group.
|
|
321
|
+
* @param labName The name of the lab.
|
|
322
|
+
* @param name The name of the virtual machine.
|
|
323
|
+
* @param options The options parameters.
|
|
324
|
+
*/
|
|
325
|
+
async beginDeleteAndWait(
|
|
326
|
+
resourceGroupName: string,
|
|
327
|
+
labName: string,
|
|
328
|
+
name: string,
|
|
329
|
+
options?: VirtualMachinesDeleteOptionalParams
|
|
330
|
+
): Promise<void> {
|
|
331
|
+
const poller = await this.beginDelete(
|
|
332
|
+
resourceGroupName,
|
|
333
|
+
labName,
|
|
334
|
+
name,
|
|
335
|
+
options
|
|
336
|
+
);
|
|
337
|
+
return poller.pollUntilDone();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Allows modifying tags of virtual machines. All other properties will be ignored.
|
|
342
|
+
* @param resourceGroupName The name of the resource group.
|
|
343
|
+
* @param labName The name of the lab.
|
|
344
|
+
* @param name The name of the virtual machine.
|
|
345
|
+
* @param labVirtualMachine A virtual machine.
|
|
346
|
+
* @param options The options parameters.
|
|
347
|
+
*/
|
|
348
|
+
update(
|
|
349
|
+
resourceGroupName: string,
|
|
350
|
+
labName: string,
|
|
351
|
+
name: string,
|
|
352
|
+
labVirtualMachine: LabVirtualMachineFragment,
|
|
353
|
+
options?: VirtualMachinesUpdateOptionalParams
|
|
354
|
+
): Promise<VirtualMachinesUpdateResponse> {
|
|
355
|
+
return this.client.sendOperationRequest(
|
|
356
|
+
{ resourceGroupName, labName, name, labVirtualMachine, options },
|
|
357
|
+
updateOperationSpec
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Attach a new or existing data disk to virtual machine. This operation can take a while to complete.
|
|
363
|
+
* @param resourceGroupName The name of the resource group.
|
|
364
|
+
* @param labName The name of the lab.
|
|
365
|
+
* @param name The name of the virtual machine.
|
|
366
|
+
* @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine.
|
|
367
|
+
* @param options The options parameters.
|
|
368
|
+
*/
|
|
369
|
+
async beginAddDataDisk(
|
|
370
|
+
resourceGroupName: string,
|
|
371
|
+
labName: string,
|
|
372
|
+
name: string,
|
|
373
|
+
dataDiskProperties: DataDiskProperties,
|
|
374
|
+
options?: VirtualMachinesAddDataDiskOptionalParams
|
|
375
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
376
|
+
const directSendOperation = async (
|
|
377
|
+
args: coreClient.OperationArguments,
|
|
378
|
+
spec: coreClient.OperationSpec
|
|
379
|
+
): Promise<void> => {
|
|
380
|
+
return this.client.sendOperationRequest(args, spec);
|
|
381
|
+
};
|
|
382
|
+
const sendOperation = async (
|
|
383
|
+
args: coreClient.OperationArguments,
|
|
384
|
+
spec: coreClient.OperationSpec
|
|
385
|
+
) => {
|
|
386
|
+
let currentRawResponse:
|
|
387
|
+
| coreClient.FullOperationResponse
|
|
388
|
+
| undefined = undefined;
|
|
389
|
+
const providedCallback = args.options?.onResponse;
|
|
390
|
+
const callback: coreClient.RawResponseCallback = (
|
|
391
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
392
|
+
flatResponse: unknown
|
|
393
|
+
) => {
|
|
394
|
+
currentRawResponse = rawResponse;
|
|
395
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
396
|
+
};
|
|
397
|
+
const updatedArgs = {
|
|
398
|
+
...args,
|
|
399
|
+
options: {
|
|
400
|
+
...args.options,
|
|
401
|
+
onResponse: callback
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
405
|
+
return {
|
|
406
|
+
flatResponse,
|
|
407
|
+
rawResponse: {
|
|
408
|
+
statusCode: currentRawResponse!.status,
|
|
409
|
+
body: currentRawResponse!.parsedBody,
|
|
410
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const lro = new LroImpl(
|
|
416
|
+
sendOperation,
|
|
417
|
+
{ resourceGroupName, labName, name, dataDiskProperties, options },
|
|
418
|
+
addDataDiskOperationSpec
|
|
419
|
+
);
|
|
420
|
+
return new LroEngine(lro, {
|
|
421
|
+
resumeFrom: options?.resumeFrom,
|
|
422
|
+
intervalInMs: options?.updateIntervalInMs
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Attach a new or existing data disk to virtual machine. This operation can take a while to complete.
|
|
428
|
+
* @param resourceGroupName The name of the resource group.
|
|
429
|
+
* @param labName The name of the lab.
|
|
430
|
+
* @param name The name of the virtual machine.
|
|
431
|
+
* @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine.
|
|
432
|
+
* @param options The options parameters.
|
|
433
|
+
*/
|
|
434
|
+
async beginAddDataDiskAndWait(
|
|
435
|
+
resourceGroupName: string,
|
|
436
|
+
labName: string,
|
|
437
|
+
name: string,
|
|
438
|
+
dataDiskProperties: DataDiskProperties,
|
|
439
|
+
options?: VirtualMachinesAddDataDiskOptionalParams
|
|
440
|
+
): Promise<void> {
|
|
441
|
+
const poller = await this.beginAddDataDisk(
|
|
442
|
+
resourceGroupName,
|
|
443
|
+
labName,
|
|
444
|
+
name,
|
|
445
|
+
dataDiskProperties,
|
|
446
|
+
options
|
|
447
|
+
);
|
|
448
|
+
return poller.pollUntilDone();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Apply artifacts to virtual machine. This operation can take a while to complete.
|
|
453
|
+
* @param resourceGroupName The name of the resource group.
|
|
454
|
+
* @param labName The name of the lab.
|
|
455
|
+
* @param name The name of the virtual machine.
|
|
456
|
+
* @param applyArtifactsRequest Request body for applying artifacts to a virtual machine.
|
|
457
|
+
* @param options The options parameters.
|
|
458
|
+
*/
|
|
459
|
+
async beginApplyArtifacts(
|
|
460
|
+
resourceGroupName: string,
|
|
461
|
+
labName: string,
|
|
462
|
+
name: string,
|
|
463
|
+
applyArtifactsRequest: ApplyArtifactsRequest,
|
|
464
|
+
options?: VirtualMachinesApplyArtifactsOptionalParams
|
|
465
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
466
|
+
const directSendOperation = async (
|
|
467
|
+
args: coreClient.OperationArguments,
|
|
468
|
+
spec: coreClient.OperationSpec
|
|
469
|
+
): Promise<void> => {
|
|
470
|
+
return this.client.sendOperationRequest(args, spec);
|
|
471
|
+
};
|
|
472
|
+
const sendOperation = async (
|
|
473
|
+
args: coreClient.OperationArguments,
|
|
474
|
+
spec: coreClient.OperationSpec
|
|
475
|
+
) => {
|
|
476
|
+
let currentRawResponse:
|
|
477
|
+
| coreClient.FullOperationResponse
|
|
478
|
+
| undefined = undefined;
|
|
479
|
+
const providedCallback = args.options?.onResponse;
|
|
480
|
+
const callback: coreClient.RawResponseCallback = (
|
|
481
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
482
|
+
flatResponse: unknown
|
|
483
|
+
) => {
|
|
484
|
+
currentRawResponse = rawResponse;
|
|
485
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
486
|
+
};
|
|
487
|
+
const updatedArgs = {
|
|
488
|
+
...args,
|
|
489
|
+
options: {
|
|
490
|
+
...args.options,
|
|
491
|
+
onResponse: callback
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
495
|
+
return {
|
|
496
|
+
flatResponse,
|
|
497
|
+
rawResponse: {
|
|
498
|
+
statusCode: currentRawResponse!.status,
|
|
499
|
+
body: currentRawResponse!.parsedBody,
|
|
500
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
const lro = new LroImpl(
|
|
506
|
+
sendOperation,
|
|
507
|
+
{ resourceGroupName, labName, name, applyArtifactsRequest, options },
|
|
508
|
+
applyArtifactsOperationSpec
|
|
509
|
+
);
|
|
510
|
+
return new LroEngine(lro, {
|
|
511
|
+
resumeFrom: options?.resumeFrom,
|
|
512
|
+
intervalInMs: options?.updateIntervalInMs
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Apply artifacts to virtual machine. This operation can take a while to complete.
|
|
518
|
+
* @param resourceGroupName The name of the resource group.
|
|
519
|
+
* @param labName The name of the lab.
|
|
520
|
+
* @param name The name of the virtual machine.
|
|
521
|
+
* @param applyArtifactsRequest Request body for applying artifacts to a virtual machine.
|
|
522
|
+
* @param options The options parameters.
|
|
523
|
+
*/
|
|
524
|
+
async beginApplyArtifactsAndWait(
|
|
525
|
+
resourceGroupName: string,
|
|
526
|
+
labName: string,
|
|
527
|
+
name: string,
|
|
528
|
+
applyArtifactsRequest: ApplyArtifactsRequest,
|
|
529
|
+
options?: VirtualMachinesApplyArtifactsOptionalParams
|
|
530
|
+
): Promise<void> {
|
|
531
|
+
const poller = await this.beginApplyArtifacts(
|
|
532
|
+
resourceGroupName,
|
|
533
|
+
labName,
|
|
534
|
+
name,
|
|
535
|
+
applyArtifactsRequest,
|
|
536
|
+
options
|
|
537
|
+
);
|
|
538
|
+
return poller.pollUntilDone();
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Take ownership of an existing virtual machine This operation can take a while to complete.
|
|
543
|
+
* @param resourceGroupName The name of the resource group.
|
|
544
|
+
* @param labName The name of the lab.
|
|
545
|
+
* @param name The name of the virtual machine.
|
|
546
|
+
* @param options The options parameters.
|
|
547
|
+
*/
|
|
548
|
+
async beginClaim(
|
|
549
|
+
resourceGroupName: string,
|
|
550
|
+
labName: string,
|
|
551
|
+
name: string,
|
|
552
|
+
options?: VirtualMachinesClaimOptionalParams
|
|
553
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
554
|
+
const directSendOperation = async (
|
|
555
|
+
args: coreClient.OperationArguments,
|
|
556
|
+
spec: coreClient.OperationSpec
|
|
557
|
+
): Promise<void> => {
|
|
558
|
+
return this.client.sendOperationRequest(args, spec);
|
|
559
|
+
};
|
|
560
|
+
const sendOperation = async (
|
|
561
|
+
args: coreClient.OperationArguments,
|
|
562
|
+
spec: coreClient.OperationSpec
|
|
563
|
+
) => {
|
|
564
|
+
let currentRawResponse:
|
|
565
|
+
| coreClient.FullOperationResponse
|
|
566
|
+
| undefined = undefined;
|
|
567
|
+
const providedCallback = args.options?.onResponse;
|
|
568
|
+
const callback: coreClient.RawResponseCallback = (
|
|
569
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
570
|
+
flatResponse: unknown
|
|
571
|
+
) => {
|
|
572
|
+
currentRawResponse = rawResponse;
|
|
573
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
574
|
+
};
|
|
575
|
+
const updatedArgs = {
|
|
576
|
+
...args,
|
|
577
|
+
options: {
|
|
578
|
+
...args.options,
|
|
579
|
+
onResponse: callback
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
583
|
+
return {
|
|
584
|
+
flatResponse,
|
|
585
|
+
rawResponse: {
|
|
586
|
+
statusCode: currentRawResponse!.status,
|
|
587
|
+
body: currentRawResponse!.parsedBody,
|
|
588
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
const lro = new LroImpl(
|
|
594
|
+
sendOperation,
|
|
595
|
+
{ resourceGroupName, labName, name, options },
|
|
596
|
+
claimOperationSpec
|
|
597
|
+
);
|
|
598
|
+
return new LroEngine(lro, {
|
|
599
|
+
resumeFrom: options?.resumeFrom,
|
|
600
|
+
intervalInMs: options?.updateIntervalInMs
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Take ownership of an existing virtual machine This operation can take a while to complete.
|
|
606
|
+
* @param resourceGroupName The name of the resource group.
|
|
607
|
+
* @param labName The name of the lab.
|
|
608
|
+
* @param name The name of the virtual machine.
|
|
609
|
+
* @param options The options parameters.
|
|
610
|
+
*/
|
|
611
|
+
async beginClaimAndWait(
|
|
612
|
+
resourceGroupName: string,
|
|
613
|
+
labName: string,
|
|
614
|
+
name: string,
|
|
615
|
+
options?: VirtualMachinesClaimOptionalParams
|
|
616
|
+
): Promise<void> {
|
|
617
|
+
const poller = await this.beginClaim(
|
|
618
|
+
resourceGroupName,
|
|
619
|
+
labName,
|
|
620
|
+
name,
|
|
621
|
+
options
|
|
622
|
+
);
|
|
623
|
+
return poller.pollUntilDone();
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Detach the specified disk from the virtual machine. This operation can take a while to complete.
|
|
628
|
+
* @param resourceGroupName The name of the resource group.
|
|
629
|
+
* @param labName The name of the lab.
|
|
630
|
+
* @param name The name of the virtual machine.
|
|
631
|
+
* @param detachDataDiskProperties Request body for detaching data disk from a virtual machine.
|
|
632
|
+
* @param options The options parameters.
|
|
633
|
+
*/
|
|
634
|
+
async beginDetachDataDisk(
|
|
635
|
+
resourceGroupName: string,
|
|
636
|
+
labName: string,
|
|
637
|
+
name: string,
|
|
638
|
+
detachDataDiskProperties: DetachDataDiskProperties,
|
|
639
|
+
options?: VirtualMachinesDetachDataDiskOptionalParams
|
|
640
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
641
|
+
const directSendOperation = async (
|
|
642
|
+
args: coreClient.OperationArguments,
|
|
643
|
+
spec: coreClient.OperationSpec
|
|
644
|
+
): Promise<void> => {
|
|
645
|
+
return this.client.sendOperationRequest(args, spec);
|
|
646
|
+
};
|
|
647
|
+
const sendOperation = async (
|
|
648
|
+
args: coreClient.OperationArguments,
|
|
649
|
+
spec: coreClient.OperationSpec
|
|
650
|
+
) => {
|
|
651
|
+
let currentRawResponse:
|
|
652
|
+
| coreClient.FullOperationResponse
|
|
653
|
+
| undefined = undefined;
|
|
654
|
+
const providedCallback = args.options?.onResponse;
|
|
655
|
+
const callback: coreClient.RawResponseCallback = (
|
|
656
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
657
|
+
flatResponse: unknown
|
|
658
|
+
) => {
|
|
659
|
+
currentRawResponse = rawResponse;
|
|
660
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
661
|
+
};
|
|
662
|
+
const updatedArgs = {
|
|
663
|
+
...args,
|
|
664
|
+
options: {
|
|
665
|
+
...args.options,
|
|
666
|
+
onResponse: callback
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
670
|
+
return {
|
|
671
|
+
flatResponse,
|
|
672
|
+
rawResponse: {
|
|
673
|
+
statusCode: currentRawResponse!.status,
|
|
674
|
+
body: currentRawResponse!.parsedBody,
|
|
675
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
const lro = new LroImpl(
|
|
681
|
+
sendOperation,
|
|
682
|
+
{ resourceGroupName, labName, name, detachDataDiskProperties, options },
|
|
683
|
+
detachDataDiskOperationSpec
|
|
684
|
+
);
|
|
685
|
+
return new LroEngine(lro, {
|
|
686
|
+
resumeFrom: options?.resumeFrom,
|
|
687
|
+
intervalInMs: options?.updateIntervalInMs
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Detach the specified disk from the virtual machine. This operation can take a while to complete.
|
|
693
|
+
* @param resourceGroupName The name of the resource group.
|
|
694
|
+
* @param labName The name of the lab.
|
|
695
|
+
* @param name The name of the virtual machine.
|
|
696
|
+
* @param detachDataDiskProperties Request body for detaching data disk from a virtual machine.
|
|
697
|
+
* @param options The options parameters.
|
|
698
|
+
*/
|
|
699
|
+
async beginDetachDataDiskAndWait(
|
|
700
|
+
resourceGroupName: string,
|
|
701
|
+
labName: string,
|
|
702
|
+
name: string,
|
|
703
|
+
detachDataDiskProperties: DetachDataDiskProperties,
|
|
704
|
+
options?: VirtualMachinesDetachDataDiskOptionalParams
|
|
705
|
+
): Promise<void> {
|
|
706
|
+
const poller = await this.beginDetachDataDisk(
|
|
707
|
+
resourceGroupName,
|
|
708
|
+
labName,
|
|
709
|
+
name,
|
|
710
|
+
detachDataDiskProperties,
|
|
711
|
+
options
|
|
712
|
+
);
|
|
713
|
+
return poller.pollUntilDone();
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Gets a string that represents the contents of the RDP file for the virtual machine
|
|
718
|
+
* @param resourceGroupName The name of the resource group.
|
|
719
|
+
* @param labName The name of the lab.
|
|
720
|
+
* @param name The name of the virtual machine.
|
|
721
|
+
* @param options The options parameters.
|
|
722
|
+
*/
|
|
723
|
+
getRdpFileContents(
|
|
724
|
+
resourceGroupName: string,
|
|
725
|
+
labName: string,
|
|
726
|
+
name: string,
|
|
727
|
+
options?: VirtualMachinesGetRdpFileContentsOptionalParams
|
|
728
|
+
): Promise<VirtualMachinesGetRdpFileContentsResponse> {
|
|
729
|
+
return this.client.sendOperationRequest(
|
|
730
|
+
{ resourceGroupName, labName, name, options },
|
|
731
|
+
getRdpFileContentsOperationSpec
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Lists the applicable start/stop schedules, if any.
|
|
737
|
+
* @param resourceGroupName The name of the resource group.
|
|
738
|
+
* @param labName The name of the lab.
|
|
739
|
+
* @param name The name of the virtual machine.
|
|
740
|
+
* @param options The options parameters.
|
|
741
|
+
*/
|
|
742
|
+
listApplicableSchedules(
|
|
743
|
+
resourceGroupName: string,
|
|
744
|
+
labName: string,
|
|
745
|
+
name: string,
|
|
746
|
+
options?: VirtualMachinesListApplicableSchedulesOptionalParams
|
|
747
|
+
): Promise<VirtualMachinesListApplicableSchedulesResponse> {
|
|
748
|
+
return this.client.sendOperationRequest(
|
|
749
|
+
{ resourceGroupName, labName, name, options },
|
|
750
|
+
listApplicableSchedulesOperationSpec
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Redeploy a virtual machine This operation can take a while to complete.
|
|
756
|
+
* @param resourceGroupName The name of the resource group.
|
|
757
|
+
* @param labName The name of the lab.
|
|
758
|
+
* @param name The name of the virtual machine.
|
|
759
|
+
* @param options The options parameters.
|
|
760
|
+
*/
|
|
761
|
+
async beginRedeploy(
|
|
762
|
+
resourceGroupName: string,
|
|
763
|
+
labName: string,
|
|
764
|
+
name: string,
|
|
765
|
+
options?: VirtualMachinesRedeployOptionalParams
|
|
766
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
767
|
+
const directSendOperation = async (
|
|
768
|
+
args: coreClient.OperationArguments,
|
|
769
|
+
spec: coreClient.OperationSpec
|
|
770
|
+
): Promise<void> => {
|
|
771
|
+
return this.client.sendOperationRequest(args, spec);
|
|
772
|
+
};
|
|
773
|
+
const sendOperation = async (
|
|
774
|
+
args: coreClient.OperationArguments,
|
|
775
|
+
spec: coreClient.OperationSpec
|
|
776
|
+
) => {
|
|
777
|
+
let currentRawResponse:
|
|
778
|
+
| coreClient.FullOperationResponse
|
|
779
|
+
| undefined = undefined;
|
|
780
|
+
const providedCallback = args.options?.onResponse;
|
|
781
|
+
const callback: coreClient.RawResponseCallback = (
|
|
782
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
783
|
+
flatResponse: unknown
|
|
784
|
+
) => {
|
|
785
|
+
currentRawResponse = rawResponse;
|
|
786
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
787
|
+
};
|
|
788
|
+
const updatedArgs = {
|
|
789
|
+
...args,
|
|
790
|
+
options: {
|
|
791
|
+
...args.options,
|
|
792
|
+
onResponse: callback
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
796
|
+
return {
|
|
797
|
+
flatResponse,
|
|
798
|
+
rawResponse: {
|
|
799
|
+
statusCode: currentRawResponse!.status,
|
|
800
|
+
body: currentRawResponse!.parsedBody,
|
|
801
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
const lro = new LroImpl(
|
|
807
|
+
sendOperation,
|
|
808
|
+
{ resourceGroupName, labName, name, options },
|
|
809
|
+
redeployOperationSpec
|
|
810
|
+
);
|
|
811
|
+
return new LroEngine(lro, {
|
|
812
|
+
resumeFrom: options?.resumeFrom,
|
|
813
|
+
intervalInMs: options?.updateIntervalInMs
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Redeploy a virtual machine This operation can take a while to complete.
|
|
819
|
+
* @param resourceGroupName The name of the resource group.
|
|
820
|
+
* @param labName The name of the lab.
|
|
821
|
+
* @param name The name of the virtual machine.
|
|
822
|
+
* @param options The options parameters.
|
|
823
|
+
*/
|
|
824
|
+
async beginRedeployAndWait(
|
|
825
|
+
resourceGroupName: string,
|
|
826
|
+
labName: string,
|
|
827
|
+
name: string,
|
|
828
|
+
options?: VirtualMachinesRedeployOptionalParams
|
|
829
|
+
): Promise<void> {
|
|
830
|
+
const poller = await this.beginRedeploy(
|
|
831
|
+
resourceGroupName,
|
|
832
|
+
labName,
|
|
833
|
+
name,
|
|
834
|
+
options
|
|
835
|
+
);
|
|
836
|
+
return poller.pollUntilDone();
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Resize Virtual Machine. This operation can take a while to complete.
|
|
841
|
+
* @param resourceGroupName The name of the resource group.
|
|
842
|
+
* @param labName The name of the lab.
|
|
843
|
+
* @param name The name of the virtual machine.
|
|
844
|
+
* @param resizeLabVirtualMachineProperties Request body for resizing a virtual machine.
|
|
845
|
+
* @param options The options parameters.
|
|
846
|
+
*/
|
|
847
|
+
async beginResize(
|
|
848
|
+
resourceGroupName: string,
|
|
849
|
+
labName: string,
|
|
850
|
+
name: string,
|
|
851
|
+
resizeLabVirtualMachineProperties: ResizeLabVirtualMachineProperties,
|
|
852
|
+
options?: VirtualMachinesResizeOptionalParams
|
|
853
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
854
|
+
const directSendOperation = async (
|
|
855
|
+
args: coreClient.OperationArguments,
|
|
856
|
+
spec: coreClient.OperationSpec
|
|
857
|
+
): Promise<void> => {
|
|
858
|
+
return this.client.sendOperationRequest(args, spec);
|
|
859
|
+
};
|
|
860
|
+
const sendOperation = async (
|
|
861
|
+
args: coreClient.OperationArguments,
|
|
862
|
+
spec: coreClient.OperationSpec
|
|
863
|
+
) => {
|
|
864
|
+
let currentRawResponse:
|
|
865
|
+
| coreClient.FullOperationResponse
|
|
866
|
+
| undefined = undefined;
|
|
867
|
+
const providedCallback = args.options?.onResponse;
|
|
868
|
+
const callback: coreClient.RawResponseCallback = (
|
|
869
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
870
|
+
flatResponse: unknown
|
|
871
|
+
) => {
|
|
872
|
+
currentRawResponse = rawResponse;
|
|
873
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
874
|
+
};
|
|
875
|
+
const updatedArgs = {
|
|
876
|
+
...args,
|
|
877
|
+
options: {
|
|
878
|
+
...args.options,
|
|
879
|
+
onResponse: callback
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
883
|
+
return {
|
|
884
|
+
flatResponse,
|
|
885
|
+
rawResponse: {
|
|
886
|
+
statusCode: currentRawResponse!.status,
|
|
887
|
+
body: currentRawResponse!.parsedBody,
|
|
888
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
const lro = new LroImpl(
|
|
894
|
+
sendOperation,
|
|
895
|
+
{
|
|
896
|
+
resourceGroupName,
|
|
897
|
+
labName,
|
|
898
|
+
name,
|
|
899
|
+
resizeLabVirtualMachineProperties,
|
|
900
|
+
options
|
|
901
|
+
},
|
|
902
|
+
resizeOperationSpec
|
|
903
|
+
);
|
|
904
|
+
return new LroEngine(lro, {
|
|
905
|
+
resumeFrom: options?.resumeFrom,
|
|
906
|
+
intervalInMs: options?.updateIntervalInMs
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Resize Virtual Machine. This operation can take a while to complete.
|
|
912
|
+
* @param resourceGroupName The name of the resource group.
|
|
913
|
+
* @param labName The name of the lab.
|
|
914
|
+
* @param name The name of the virtual machine.
|
|
915
|
+
* @param resizeLabVirtualMachineProperties Request body for resizing a virtual machine.
|
|
916
|
+
* @param options The options parameters.
|
|
917
|
+
*/
|
|
918
|
+
async beginResizeAndWait(
|
|
919
|
+
resourceGroupName: string,
|
|
920
|
+
labName: string,
|
|
921
|
+
name: string,
|
|
922
|
+
resizeLabVirtualMachineProperties: ResizeLabVirtualMachineProperties,
|
|
923
|
+
options?: VirtualMachinesResizeOptionalParams
|
|
924
|
+
): Promise<void> {
|
|
925
|
+
const poller = await this.beginResize(
|
|
926
|
+
resourceGroupName,
|
|
927
|
+
labName,
|
|
928
|
+
name,
|
|
929
|
+
resizeLabVirtualMachineProperties,
|
|
930
|
+
options
|
|
931
|
+
);
|
|
932
|
+
return poller.pollUntilDone();
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Restart a virtual machine. This operation can take a while to complete.
|
|
937
|
+
* @param resourceGroupName The name of the resource group.
|
|
938
|
+
* @param labName The name of the lab.
|
|
939
|
+
* @param name The name of the virtual machine.
|
|
940
|
+
* @param options The options parameters.
|
|
941
|
+
*/
|
|
942
|
+
async beginRestart(
|
|
943
|
+
resourceGroupName: string,
|
|
944
|
+
labName: string,
|
|
945
|
+
name: string,
|
|
946
|
+
options?: VirtualMachinesRestartOptionalParams
|
|
947
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
948
|
+
const directSendOperation = async (
|
|
949
|
+
args: coreClient.OperationArguments,
|
|
950
|
+
spec: coreClient.OperationSpec
|
|
951
|
+
): Promise<void> => {
|
|
952
|
+
return this.client.sendOperationRequest(args, spec);
|
|
953
|
+
};
|
|
954
|
+
const sendOperation = async (
|
|
955
|
+
args: coreClient.OperationArguments,
|
|
956
|
+
spec: coreClient.OperationSpec
|
|
957
|
+
) => {
|
|
958
|
+
let currentRawResponse:
|
|
959
|
+
| coreClient.FullOperationResponse
|
|
960
|
+
| undefined = undefined;
|
|
961
|
+
const providedCallback = args.options?.onResponse;
|
|
962
|
+
const callback: coreClient.RawResponseCallback = (
|
|
963
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
964
|
+
flatResponse: unknown
|
|
965
|
+
) => {
|
|
966
|
+
currentRawResponse = rawResponse;
|
|
967
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
968
|
+
};
|
|
969
|
+
const updatedArgs = {
|
|
970
|
+
...args,
|
|
971
|
+
options: {
|
|
972
|
+
...args.options,
|
|
973
|
+
onResponse: callback
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
977
|
+
return {
|
|
978
|
+
flatResponse,
|
|
979
|
+
rawResponse: {
|
|
980
|
+
statusCode: currentRawResponse!.status,
|
|
981
|
+
body: currentRawResponse!.parsedBody,
|
|
982
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
const lro = new LroImpl(
|
|
988
|
+
sendOperation,
|
|
989
|
+
{ resourceGroupName, labName, name, options },
|
|
990
|
+
restartOperationSpec
|
|
991
|
+
);
|
|
992
|
+
return new LroEngine(lro, {
|
|
993
|
+
resumeFrom: options?.resumeFrom,
|
|
994
|
+
intervalInMs: options?.updateIntervalInMs
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Restart a virtual machine. This operation can take a while to complete.
|
|
1000
|
+
* @param resourceGroupName The name of the resource group.
|
|
1001
|
+
* @param labName The name of the lab.
|
|
1002
|
+
* @param name The name of the virtual machine.
|
|
1003
|
+
* @param options The options parameters.
|
|
1004
|
+
*/
|
|
1005
|
+
async beginRestartAndWait(
|
|
1006
|
+
resourceGroupName: string,
|
|
1007
|
+
labName: string,
|
|
1008
|
+
name: string,
|
|
1009
|
+
options?: VirtualMachinesRestartOptionalParams
|
|
1010
|
+
): Promise<void> {
|
|
1011
|
+
const poller = await this.beginRestart(
|
|
1012
|
+
resourceGroupName,
|
|
1013
|
+
labName,
|
|
1014
|
+
name,
|
|
1015
|
+
options
|
|
1016
|
+
);
|
|
1017
|
+
return poller.pollUntilDone();
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Start a virtual machine. This operation can take a while to complete.
|
|
1022
|
+
* @param resourceGroupName The name of the resource group.
|
|
1023
|
+
* @param labName The name of the lab.
|
|
1024
|
+
* @param name The name of the virtual machine.
|
|
1025
|
+
* @param options The options parameters.
|
|
1026
|
+
*/
|
|
1027
|
+
async beginStart(
|
|
1028
|
+
resourceGroupName: string,
|
|
1029
|
+
labName: string,
|
|
1030
|
+
name: string,
|
|
1031
|
+
options?: VirtualMachinesStartOptionalParams
|
|
1032
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
1033
|
+
const directSendOperation = async (
|
|
1034
|
+
args: coreClient.OperationArguments,
|
|
1035
|
+
spec: coreClient.OperationSpec
|
|
1036
|
+
): Promise<void> => {
|
|
1037
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1038
|
+
};
|
|
1039
|
+
const sendOperation = async (
|
|
1040
|
+
args: coreClient.OperationArguments,
|
|
1041
|
+
spec: coreClient.OperationSpec
|
|
1042
|
+
) => {
|
|
1043
|
+
let currentRawResponse:
|
|
1044
|
+
| coreClient.FullOperationResponse
|
|
1045
|
+
| undefined = undefined;
|
|
1046
|
+
const providedCallback = args.options?.onResponse;
|
|
1047
|
+
const callback: coreClient.RawResponseCallback = (
|
|
1048
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
1049
|
+
flatResponse: unknown
|
|
1050
|
+
) => {
|
|
1051
|
+
currentRawResponse = rawResponse;
|
|
1052
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
1053
|
+
};
|
|
1054
|
+
const updatedArgs = {
|
|
1055
|
+
...args,
|
|
1056
|
+
options: {
|
|
1057
|
+
...args.options,
|
|
1058
|
+
onResponse: callback
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
1062
|
+
return {
|
|
1063
|
+
flatResponse,
|
|
1064
|
+
rawResponse: {
|
|
1065
|
+
statusCode: currentRawResponse!.status,
|
|
1066
|
+
body: currentRawResponse!.parsedBody,
|
|
1067
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
const lro = new LroImpl(
|
|
1073
|
+
sendOperation,
|
|
1074
|
+
{ resourceGroupName, labName, name, options },
|
|
1075
|
+
startOperationSpec
|
|
1076
|
+
);
|
|
1077
|
+
return new LroEngine(lro, {
|
|
1078
|
+
resumeFrom: options?.resumeFrom,
|
|
1079
|
+
intervalInMs: options?.updateIntervalInMs
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Start a virtual machine. This operation can take a while to complete.
|
|
1085
|
+
* @param resourceGroupName The name of the resource group.
|
|
1086
|
+
* @param labName The name of the lab.
|
|
1087
|
+
* @param name The name of the virtual machine.
|
|
1088
|
+
* @param options The options parameters.
|
|
1089
|
+
*/
|
|
1090
|
+
async beginStartAndWait(
|
|
1091
|
+
resourceGroupName: string,
|
|
1092
|
+
labName: string,
|
|
1093
|
+
name: string,
|
|
1094
|
+
options?: VirtualMachinesStartOptionalParams
|
|
1095
|
+
): Promise<void> {
|
|
1096
|
+
const poller = await this.beginStart(
|
|
1097
|
+
resourceGroupName,
|
|
1098
|
+
labName,
|
|
1099
|
+
name,
|
|
1100
|
+
options
|
|
1101
|
+
);
|
|
1102
|
+
return poller.pollUntilDone();
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Stop a virtual machine This operation can take a while to complete.
|
|
1107
|
+
* @param resourceGroupName The name of the resource group.
|
|
1108
|
+
* @param labName The name of the lab.
|
|
1109
|
+
* @param name The name of the virtual machine.
|
|
1110
|
+
* @param options The options parameters.
|
|
1111
|
+
*/
|
|
1112
|
+
async beginStop(
|
|
1113
|
+
resourceGroupName: string,
|
|
1114
|
+
labName: string,
|
|
1115
|
+
name: string,
|
|
1116
|
+
options?: VirtualMachinesStopOptionalParams
|
|
1117
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
1118
|
+
const directSendOperation = async (
|
|
1119
|
+
args: coreClient.OperationArguments,
|
|
1120
|
+
spec: coreClient.OperationSpec
|
|
1121
|
+
): Promise<void> => {
|
|
1122
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1123
|
+
};
|
|
1124
|
+
const sendOperation = async (
|
|
1125
|
+
args: coreClient.OperationArguments,
|
|
1126
|
+
spec: coreClient.OperationSpec
|
|
1127
|
+
) => {
|
|
1128
|
+
let currentRawResponse:
|
|
1129
|
+
| coreClient.FullOperationResponse
|
|
1130
|
+
| undefined = undefined;
|
|
1131
|
+
const providedCallback = args.options?.onResponse;
|
|
1132
|
+
const callback: coreClient.RawResponseCallback = (
|
|
1133
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
1134
|
+
flatResponse: unknown
|
|
1135
|
+
) => {
|
|
1136
|
+
currentRawResponse = rawResponse;
|
|
1137
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
1138
|
+
};
|
|
1139
|
+
const updatedArgs = {
|
|
1140
|
+
...args,
|
|
1141
|
+
options: {
|
|
1142
|
+
...args.options,
|
|
1143
|
+
onResponse: callback
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
1147
|
+
return {
|
|
1148
|
+
flatResponse,
|
|
1149
|
+
rawResponse: {
|
|
1150
|
+
statusCode: currentRawResponse!.status,
|
|
1151
|
+
body: currentRawResponse!.parsedBody,
|
|
1152
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
const lro = new LroImpl(
|
|
1158
|
+
sendOperation,
|
|
1159
|
+
{ resourceGroupName, labName, name, options },
|
|
1160
|
+
stopOperationSpec
|
|
1161
|
+
);
|
|
1162
|
+
return new LroEngine(lro, {
|
|
1163
|
+
resumeFrom: options?.resumeFrom,
|
|
1164
|
+
intervalInMs: options?.updateIntervalInMs
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Stop a virtual machine This operation can take a while to complete.
|
|
1170
|
+
* @param resourceGroupName The name of the resource group.
|
|
1171
|
+
* @param labName The name of the lab.
|
|
1172
|
+
* @param name The name of the virtual machine.
|
|
1173
|
+
* @param options The options parameters.
|
|
1174
|
+
*/
|
|
1175
|
+
async beginStopAndWait(
|
|
1176
|
+
resourceGroupName: string,
|
|
1177
|
+
labName: string,
|
|
1178
|
+
name: string,
|
|
1179
|
+
options?: VirtualMachinesStopOptionalParams
|
|
1180
|
+
): Promise<void> {
|
|
1181
|
+
const poller = await this.beginStop(
|
|
1182
|
+
resourceGroupName,
|
|
1183
|
+
labName,
|
|
1184
|
+
name,
|
|
1185
|
+
options
|
|
1186
|
+
);
|
|
1187
|
+
return poller.pollUntilDone();
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Transfers all data disks attached to the virtual machine to be owned by the current user. This
|
|
1192
|
+
* operation can take a while to complete.
|
|
1193
|
+
* @param resourceGroupName The name of the resource group.
|
|
1194
|
+
* @param labName The name of the lab.
|
|
1195
|
+
* @param name The name of the virtual machine.
|
|
1196
|
+
* @param options The options parameters.
|
|
1197
|
+
*/
|
|
1198
|
+
async beginTransferDisks(
|
|
1199
|
+
resourceGroupName: string,
|
|
1200
|
+
labName: string,
|
|
1201
|
+
name: string,
|
|
1202
|
+
options?: VirtualMachinesTransferDisksOptionalParams
|
|
1203
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
1204
|
+
const directSendOperation = async (
|
|
1205
|
+
args: coreClient.OperationArguments,
|
|
1206
|
+
spec: coreClient.OperationSpec
|
|
1207
|
+
): Promise<void> => {
|
|
1208
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1209
|
+
};
|
|
1210
|
+
const sendOperation = async (
|
|
1211
|
+
args: coreClient.OperationArguments,
|
|
1212
|
+
spec: coreClient.OperationSpec
|
|
1213
|
+
) => {
|
|
1214
|
+
let currentRawResponse:
|
|
1215
|
+
| coreClient.FullOperationResponse
|
|
1216
|
+
| undefined = undefined;
|
|
1217
|
+
const providedCallback = args.options?.onResponse;
|
|
1218
|
+
const callback: coreClient.RawResponseCallback = (
|
|
1219
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
1220
|
+
flatResponse: unknown
|
|
1221
|
+
) => {
|
|
1222
|
+
currentRawResponse = rawResponse;
|
|
1223
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
1224
|
+
};
|
|
1225
|
+
const updatedArgs = {
|
|
1226
|
+
...args,
|
|
1227
|
+
options: {
|
|
1228
|
+
...args.options,
|
|
1229
|
+
onResponse: callback
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
1233
|
+
return {
|
|
1234
|
+
flatResponse,
|
|
1235
|
+
rawResponse: {
|
|
1236
|
+
statusCode: currentRawResponse!.status,
|
|
1237
|
+
body: currentRawResponse!.parsedBody,
|
|
1238
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
const lro = new LroImpl(
|
|
1244
|
+
sendOperation,
|
|
1245
|
+
{ resourceGroupName, labName, name, options },
|
|
1246
|
+
transferDisksOperationSpec
|
|
1247
|
+
);
|
|
1248
|
+
return new LroEngine(lro, {
|
|
1249
|
+
resumeFrom: options?.resumeFrom,
|
|
1250
|
+
intervalInMs: options?.updateIntervalInMs
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Transfers all data disks attached to the virtual machine to be owned by the current user. This
|
|
1256
|
+
* operation can take a while to complete.
|
|
1257
|
+
* @param resourceGroupName The name of the resource group.
|
|
1258
|
+
* @param labName The name of the lab.
|
|
1259
|
+
* @param name The name of the virtual machine.
|
|
1260
|
+
* @param options The options parameters.
|
|
1261
|
+
*/
|
|
1262
|
+
async beginTransferDisksAndWait(
|
|
1263
|
+
resourceGroupName: string,
|
|
1264
|
+
labName: string,
|
|
1265
|
+
name: string,
|
|
1266
|
+
options?: VirtualMachinesTransferDisksOptionalParams
|
|
1267
|
+
): Promise<void> {
|
|
1268
|
+
const poller = await this.beginTransferDisks(
|
|
1269
|
+
resourceGroupName,
|
|
1270
|
+
labName,
|
|
1271
|
+
name,
|
|
1272
|
+
options
|
|
1273
|
+
);
|
|
1274
|
+
return poller.pollUntilDone();
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Release ownership of an existing virtual machine This operation can take a while to complete.
|
|
1279
|
+
* @param resourceGroupName The name of the resource group.
|
|
1280
|
+
* @param labName The name of the lab.
|
|
1281
|
+
* @param name The name of the virtual machine.
|
|
1282
|
+
* @param options The options parameters.
|
|
1283
|
+
*/
|
|
1284
|
+
async beginUnClaim(
|
|
1285
|
+
resourceGroupName: string,
|
|
1286
|
+
labName: string,
|
|
1287
|
+
name: string,
|
|
1288
|
+
options?: VirtualMachinesUnClaimOptionalParams
|
|
1289
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
1290
|
+
const directSendOperation = async (
|
|
1291
|
+
args: coreClient.OperationArguments,
|
|
1292
|
+
spec: coreClient.OperationSpec
|
|
1293
|
+
): Promise<void> => {
|
|
1294
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1295
|
+
};
|
|
1296
|
+
const sendOperation = async (
|
|
1297
|
+
args: coreClient.OperationArguments,
|
|
1298
|
+
spec: coreClient.OperationSpec
|
|
1299
|
+
) => {
|
|
1300
|
+
let currentRawResponse:
|
|
1301
|
+
| coreClient.FullOperationResponse
|
|
1302
|
+
| undefined = undefined;
|
|
1303
|
+
const providedCallback = args.options?.onResponse;
|
|
1304
|
+
const callback: coreClient.RawResponseCallback = (
|
|
1305
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
1306
|
+
flatResponse: unknown
|
|
1307
|
+
) => {
|
|
1308
|
+
currentRawResponse = rawResponse;
|
|
1309
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
1310
|
+
};
|
|
1311
|
+
const updatedArgs = {
|
|
1312
|
+
...args,
|
|
1313
|
+
options: {
|
|
1314
|
+
...args.options,
|
|
1315
|
+
onResponse: callback
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
1319
|
+
return {
|
|
1320
|
+
flatResponse,
|
|
1321
|
+
rawResponse: {
|
|
1322
|
+
statusCode: currentRawResponse!.status,
|
|
1323
|
+
body: currentRawResponse!.parsedBody,
|
|
1324
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
const lro = new LroImpl(
|
|
1330
|
+
sendOperation,
|
|
1331
|
+
{ resourceGroupName, labName, name, options },
|
|
1332
|
+
unClaimOperationSpec
|
|
1333
|
+
);
|
|
1334
|
+
return new LroEngine(lro, {
|
|
1335
|
+
resumeFrom: options?.resumeFrom,
|
|
1336
|
+
intervalInMs: options?.updateIntervalInMs
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Release ownership of an existing virtual machine This operation can take a while to complete.
|
|
1342
|
+
* @param resourceGroupName The name of the resource group.
|
|
1343
|
+
* @param labName The name of the lab.
|
|
1344
|
+
* @param name The name of the virtual machine.
|
|
1345
|
+
* @param options The options parameters.
|
|
1346
|
+
*/
|
|
1347
|
+
async beginUnClaimAndWait(
|
|
1348
|
+
resourceGroupName: string,
|
|
1349
|
+
labName: string,
|
|
1350
|
+
name: string,
|
|
1351
|
+
options?: VirtualMachinesUnClaimOptionalParams
|
|
1352
|
+
): Promise<void> {
|
|
1353
|
+
const poller = await this.beginUnClaim(
|
|
1354
|
+
resourceGroupName,
|
|
1355
|
+
labName,
|
|
1356
|
+
name,
|
|
1357
|
+
options
|
|
1358
|
+
);
|
|
1359
|
+
return poller.pollUntilDone();
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* ListNext
|
|
1364
|
+
* @param resourceGroupName The name of the resource group.
|
|
1365
|
+
* @param labName The name of the lab.
|
|
1366
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1367
|
+
* @param options The options parameters.
|
|
1368
|
+
*/
|
|
1369
|
+
private _listNext(
|
|
1370
|
+
resourceGroupName: string,
|
|
1371
|
+
labName: string,
|
|
1372
|
+
nextLink: string,
|
|
1373
|
+
options?: VirtualMachinesListNextOptionalParams
|
|
1374
|
+
): Promise<VirtualMachinesListNextResponse> {
|
|
1375
|
+
return this.client.sendOperationRequest(
|
|
1376
|
+
{ resourceGroupName, labName, nextLink, options },
|
|
1377
|
+
listNextOperationSpec
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
// Operation Specifications
|
|
1382
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1383
|
+
|
|
1384
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
1385
|
+
path:
|
|
1386
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines",
|
|
1387
|
+
httpMethod: "GET",
|
|
1388
|
+
responses: {
|
|
1389
|
+
200: {
|
|
1390
|
+
bodyMapper: Mappers.LabVirtualMachineList
|
|
1391
|
+
},
|
|
1392
|
+
default: {
|
|
1393
|
+
bodyMapper: Mappers.CloudError
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
queryParameters: [
|
|
1397
|
+
Parameters.apiVersion,
|
|
1398
|
+
Parameters.expand,
|
|
1399
|
+
Parameters.filter,
|
|
1400
|
+
Parameters.top,
|
|
1401
|
+
Parameters.orderby
|
|
1402
|
+
],
|
|
1403
|
+
urlParameters: [
|
|
1404
|
+
Parameters.$host,
|
|
1405
|
+
Parameters.subscriptionId,
|
|
1406
|
+
Parameters.resourceGroupName,
|
|
1407
|
+
Parameters.labName
|
|
1408
|
+
],
|
|
1409
|
+
headerParameters: [Parameters.accept],
|
|
1410
|
+
serializer
|
|
1411
|
+
};
|
|
1412
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
1413
|
+
path:
|
|
1414
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}",
|
|
1415
|
+
httpMethod: "GET",
|
|
1416
|
+
responses: {
|
|
1417
|
+
200: {
|
|
1418
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1419
|
+
},
|
|
1420
|
+
default: {
|
|
1421
|
+
bodyMapper: Mappers.CloudError
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
1425
|
+
urlParameters: [
|
|
1426
|
+
Parameters.$host,
|
|
1427
|
+
Parameters.subscriptionId,
|
|
1428
|
+
Parameters.resourceGroupName,
|
|
1429
|
+
Parameters.name,
|
|
1430
|
+
Parameters.labName
|
|
1431
|
+
],
|
|
1432
|
+
headerParameters: [Parameters.accept],
|
|
1433
|
+
serializer
|
|
1434
|
+
};
|
|
1435
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
1436
|
+
path:
|
|
1437
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}",
|
|
1438
|
+
httpMethod: "PUT",
|
|
1439
|
+
responses: {
|
|
1440
|
+
200: {
|
|
1441
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1442
|
+
},
|
|
1443
|
+
201: {
|
|
1444
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1445
|
+
},
|
|
1446
|
+
202: {
|
|
1447
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1448
|
+
},
|
|
1449
|
+
204: {
|
|
1450
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1451
|
+
},
|
|
1452
|
+
default: {
|
|
1453
|
+
bodyMapper: Mappers.CloudError
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
requestBody: Parameters.labVirtualMachine,
|
|
1457
|
+
queryParameters: [Parameters.apiVersion],
|
|
1458
|
+
urlParameters: [
|
|
1459
|
+
Parameters.$host,
|
|
1460
|
+
Parameters.subscriptionId,
|
|
1461
|
+
Parameters.resourceGroupName,
|
|
1462
|
+
Parameters.name,
|
|
1463
|
+
Parameters.labName
|
|
1464
|
+
],
|
|
1465
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1466
|
+
mediaType: "json",
|
|
1467
|
+
serializer
|
|
1468
|
+
};
|
|
1469
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
1470
|
+
path:
|
|
1471
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}",
|
|
1472
|
+
httpMethod: "DELETE",
|
|
1473
|
+
responses: {
|
|
1474
|
+
200: {},
|
|
1475
|
+
201: {},
|
|
1476
|
+
202: {},
|
|
1477
|
+
204: {},
|
|
1478
|
+
default: {
|
|
1479
|
+
bodyMapper: Mappers.CloudError
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
queryParameters: [Parameters.apiVersion],
|
|
1483
|
+
urlParameters: [
|
|
1484
|
+
Parameters.$host,
|
|
1485
|
+
Parameters.subscriptionId,
|
|
1486
|
+
Parameters.resourceGroupName,
|
|
1487
|
+
Parameters.name,
|
|
1488
|
+
Parameters.labName
|
|
1489
|
+
],
|
|
1490
|
+
headerParameters: [Parameters.accept],
|
|
1491
|
+
serializer
|
|
1492
|
+
};
|
|
1493
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
1494
|
+
path:
|
|
1495
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}",
|
|
1496
|
+
httpMethod: "PATCH",
|
|
1497
|
+
responses: {
|
|
1498
|
+
200: {
|
|
1499
|
+
bodyMapper: Mappers.LabVirtualMachine
|
|
1500
|
+
},
|
|
1501
|
+
default: {
|
|
1502
|
+
bodyMapper: Mappers.CloudError
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
requestBody: Parameters.labVirtualMachine1,
|
|
1506
|
+
queryParameters: [Parameters.apiVersion],
|
|
1507
|
+
urlParameters: [
|
|
1508
|
+
Parameters.$host,
|
|
1509
|
+
Parameters.subscriptionId,
|
|
1510
|
+
Parameters.resourceGroupName,
|
|
1511
|
+
Parameters.name,
|
|
1512
|
+
Parameters.labName
|
|
1513
|
+
],
|
|
1514
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1515
|
+
mediaType: "json",
|
|
1516
|
+
serializer
|
|
1517
|
+
};
|
|
1518
|
+
const addDataDiskOperationSpec: coreClient.OperationSpec = {
|
|
1519
|
+
path:
|
|
1520
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk",
|
|
1521
|
+
httpMethod: "POST",
|
|
1522
|
+
responses: {
|
|
1523
|
+
200: {},
|
|
1524
|
+
201: {},
|
|
1525
|
+
202: {},
|
|
1526
|
+
204: {},
|
|
1527
|
+
default: {
|
|
1528
|
+
bodyMapper: Mappers.CloudError
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
requestBody: Parameters.dataDiskProperties,
|
|
1532
|
+
queryParameters: [Parameters.apiVersion],
|
|
1533
|
+
urlParameters: [
|
|
1534
|
+
Parameters.$host,
|
|
1535
|
+
Parameters.subscriptionId,
|
|
1536
|
+
Parameters.resourceGroupName,
|
|
1537
|
+
Parameters.name,
|
|
1538
|
+
Parameters.labName
|
|
1539
|
+
],
|
|
1540
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1541
|
+
mediaType: "json",
|
|
1542
|
+
serializer
|
|
1543
|
+
};
|
|
1544
|
+
const applyArtifactsOperationSpec: coreClient.OperationSpec = {
|
|
1545
|
+
path:
|
|
1546
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts",
|
|
1547
|
+
httpMethod: "POST",
|
|
1548
|
+
responses: {
|
|
1549
|
+
200: {},
|
|
1550
|
+
201: {},
|
|
1551
|
+
202: {},
|
|
1552
|
+
204: {},
|
|
1553
|
+
default: {
|
|
1554
|
+
bodyMapper: Mappers.CloudError
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
requestBody: Parameters.applyArtifactsRequest,
|
|
1558
|
+
queryParameters: [Parameters.apiVersion],
|
|
1559
|
+
urlParameters: [
|
|
1560
|
+
Parameters.$host,
|
|
1561
|
+
Parameters.subscriptionId,
|
|
1562
|
+
Parameters.resourceGroupName,
|
|
1563
|
+
Parameters.name,
|
|
1564
|
+
Parameters.labName
|
|
1565
|
+
],
|
|
1566
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1567
|
+
mediaType: "json",
|
|
1568
|
+
serializer
|
|
1569
|
+
};
|
|
1570
|
+
const claimOperationSpec: coreClient.OperationSpec = {
|
|
1571
|
+
path:
|
|
1572
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim",
|
|
1573
|
+
httpMethod: "POST",
|
|
1574
|
+
responses: {
|
|
1575
|
+
200: {},
|
|
1576
|
+
201: {},
|
|
1577
|
+
202: {},
|
|
1578
|
+
204: {},
|
|
1579
|
+
default: {
|
|
1580
|
+
bodyMapper: Mappers.CloudError
|
|
1581
|
+
}
|
|
1582
|
+
},
|
|
1583
|
+
queryParameters: [Parameters.apiVersion],
|
|
1584
|
+
urlParameters: [
|
|
1585
|
+
Parameters.$host,
|
|
1586
|
+
Parameters.subscriptionId,
|
|
1587
|
+
Parameters.resourceGroupName,
|
|
1588
|
+
Parameters.name,
|
|
1589
|
+
Parameters.labName
|
|
1590
|
+
],
|
|
1591
|
+
headerParameters: [Parameters.accept],
|
|
1592
|
+
serializer
|
|
1593
|
+
};
|
|
1594
|
+
const detachDataDiskOperationSpec: coreClient.OperationSpec = {
|
|
1595
|
+
path:
|
|
1596
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk",
|
|
1597
|
+
httpMethod: "POST",
|
|
1598
|
+
responses: {
|
|
1599
|
+
200: {},
|
|
1600
|
+
201: {},
|
|
1601
|
+
202: {},
|
|
1602
|
+
204: {},
|
|
1603
|
+
default: {
|
|
1604
|
+
bodyMapper: Mappers.CloudError
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
requestBody: Parameters.detachDataDiskProperties,
|
|
1608
|
+
queryParameters: [Parameters.apiVersion],
|
|
1609
|
+
urlParameters: [
|
|
1610
|
+
Parameters.$host,
|
|
1611
|
+
Parameters.subscriptionId,
|
|
1612
|
+
Parameters.resourceGroupName,
|
|
1613
|
+
Parameters.name,
|
|
1614
|
+
Parameters.labName
|
|
1615
|
+
],
|
|
1616
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1617
|
+
mediaType: "json",
|
|
1618
|
+
serializer
|
|
1619
|
+
};
|
|
1620
|
+
const getRdpFileContentsOperationSpec: coreClient.OperationSpec = {
|
|
1621
|
+
path:
|
|
1622
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/getRdpFileContents",
|
|
1623
|
+
httpMethod: "POST",
|
|
1624
|
+
responses: {
|
|
1625
|
+
200: {
|
|
1626
|
+
bodyMapper: Mappers.RdpConnection
|
|
1627
|
+
},
|
|
1628
|
+
default: {
|
|
1629
|
+
bodyMapper: Mappers.CloudError
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
queryParameters: [Parameters.apiVersion],
|
|
1633
|
+
urlParameters: [
|
|
1634
|
+
Parameters.$host,
|
|
1635
|
+
Parameters.subscriptionId,
|
|
1636
|
+
Parameters.resourceGroupName,
|
|
1637
|
+
Parameters.name,
|
|
1638
|
+
Parameters.labName
|
|
1639
|
+
],
|
|
1640
|
+
headerParameters: [Parameters.accept],
|
|
1641
|
+
serializer
|
|
1642
|
+
};
|
|
1643
|
+
const listApplicableSchedulesOperationSpec: coreClient.OperationSpec = {
|
|
1644
|
+
path:
|
|
1645
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules",
|
|
1646
|
+
httpMethod: "POST",
|
|
1647
|
+
responses: {
|
|
1648
|
+
200: {
|
|
1649
|
+
bodyMapper: Mappers.ApplicableSchedule
|
|
1650
|
+
},
|
|
1651
|
+
default: {
|
|
1652
|
+
bodyMapper: Mappers.CloudError
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
queryParameters: [Parameters.apiVersion],
|
|
1656
|
+
urlParameters: [
|
|
1657
|
+
Parameters.$host,
|
|
1658
|
+
Parameters.subscriptionId,
|
|
1659
|
+
Parameters.resourceGroupName,
|
|
1660
|
+
Parameters.name,
|
|
1661
|
+
Parameters.labName
|
|
1662
|
+
],
|
|
1663
|
+
headerParameters: [Parameters.accept],
|
|
1664
|
+
serializer
|
|
1665
|
+
};
|
|
1666
|
+
const redeployOperationSpec: coreClient.OperationSpec = {
|
|
1667
|
+
path:
|
|
1668
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/redeploy",
|
|
1669
|
+
httpMethod: "POST",
|
|
1670
|
+
responses: {
|
|
1671
|
+
200: {},
|
|
1672
|
+
201: {},
|
|
1673
|
+
202: {},
|
|
1674
|
+
204: {},
|
|
1675
|
+
default: {
|
|
1676
|
+
bodyMapper: Mappers.CloudError
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1679
|
+
queryParameters: [Parameters.apiVersion],
|
|
1680
|
+
urlParameters: [
|
|
1681
|
+
Parameters.$host,
|
|
1682
|
+
Parameters.subscriptionId,
|
|
1683
|
+
Parameters.resourceGroupName,
|
|
1684
|
+
Parameters.name,
|
|
1685
|
+
Parameters.labName
|
|
1686
|
+
],
|
|
1687
|
+
headerParameters: [Parameters.accept],
|
|
1688
|
+
serializer
|
|
1689
|
+
};
|
|
1690
|
+
const resizeOperationSpec: coreClient.OperationSpec = {
|
|
1691
|
+
path:
|
|
1692
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/resize",
|
|
1693
|
+
httpMethod: "POST",
|
|
1694
|
+
responses: {
|
|
1695
|
+
200: {},
|
|
1696
|
+
201: {},
|
|
1697
|
+
202: {},
|
|
1698
|
+
204: {},
|
|
1699
|
+
default: {
|
|
1700
|
+
bodyMapper: Mappers.CloudError
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
requestBody: Parameters.resizeLabVirtualMachineProperties,
|
|
1704
|
+
queryParameters: [Parameters.apiVersion],
|
|
1705
|
+
urlParameters: [
|
|
1706
|
+
Parameters.$host,
|
|
1707
|
+
Parameters.subscriptionId,
|
|
1708
|
+
Parameters.resourceGroupName,
|
|
1709
|
+
Parameters.name,
|
|
1710
|
+
Parameters.labName
|
|
1711
|
+
],
|
|
1712
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1713
|
+
mediaType: "json",
|
|
1714
|
+
serializer
|
|
1715
|
+
};
|
|
1716
|
+
const restartOperationSpec: coreClient.OperationSpec = {
|
|
1717
|
+
path:
|
|
1718
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/restart",
|
|
1719
|
+
httpMethod: "POST",
|
|
1720
|
+
responses: {
|
|
1721
|
+
200: {},
|
|
1722
|
+
201: {},
|
|
1723
|
+
202: {},
|
|
1724
|
+
204: {},
|
|
1725
|
+
default: {
|
|
1726
|
+
bodyMapper: Mappers.CloudError
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
queryParameters: [Parameters.apiVersion],
|
|
1730
|
+
urlParameters: [
|
|
1731
|
+
Parameters.$host,
|
|
1732
|
+
Parameters.subscriptionId,
|
|
1733
|
+
Parameters.resourceGroupName,
|
|
1734
|
+
Parameters.name,
|
|
1735
|
+
Parameters.labName
|
|
1736
|
+
],
|
|
1737
|
+
headerParameters: [Parameters.accept],
|
|
1738
|
+
serializer
|
|
1739
|
+
};
|
|
1740
|
+
const startOperationSpec: coreClient.OperationSpec = {
|
|
1741
|
+
path:
|
|
1742
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start",
|
|
1743
|
+
httpMethod: "POST",
|
|
1744
|
+
responses: {
|
|
1745
|
+
200: {},
|
|
1746
|
+
201: {},
|
|
1747
|
+
202: {},
|
|
1748
|
+
204: {},
|
|
1749
|
+
default: {
|
|
1750
|
+
bodyMapper: Mappers.CloudError
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
queryParameters: [Parameters.apiVersion],
|
|
1754
|
+
urlParameters: [
|
|
1755
|
+
Parameters.$host,
|
|
1756
|
+
Parameters.subscriptionId,
|
|
1757
|
+
Parameters.resourceGroupName,
|
|
1758
|
+
Parameters.name,
|
|
1759
|
+
Parameters.labName
|
|
1760
|
+
],
|
|
1761
|
+
headerParameters: [Parameters.accept],
|
|
1762
|
+
serializer
|
|
1763
|
+
};
|
|
1764
|
+
const stopOperationSpec: coreClient.OperationSpec = {
|
|
1765
|
+
path:
|
|
1766
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop",
|
|
1767
|
+
httpMethod: "POST",
|
|
1768
|
+
responses: {
|
|
1769
|
+
200: {},
|
|
1770
|
+
201: {},
|
|
1771
|
+
202: {},
|
|
1772
|
+
204: {},
|
|
1773
|
+
default: {
|
|
1774
|
+
bodyMapper: Mappers.CloudError
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
queryParameters: [Parameters.apiVersion],
|
|
1778
|
+
urlParameters: [
|
|
1779
|
+
Parameters.$host,
|
|
1780
|
+
Parameters.subscriptionId,
|
|
1781
|
+
Parameters.resourceGroupName,
|
|
1782
|
+
Parameters.name,
|
|
1783
|
+
Parameters.labName
|
|
1784
|
+
],
|
|
1785
|
+
headerParameters: [Parameters.accept],
|
|
1786
|
+
serializer
|
|
1787
|
+
};
|
|
1788
|
+
const transferDisksOperationSpec: coreClient.OperationSpec = {
|
|
1789
|
+
path:
|
|
1790
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/transferDisks",
|
|
1791
|
+
httpMethod: "POST",
|
|
1792
|
+
responses: {
|
|
1793
|
+
200: {},
|
|
1794
|
+
201: {},
|
|
1795
|
+
202: {},
|
|
1796
|
+
204: {},
|
|
1797
|
+
default: {
|
|
1798
|
+
bodyMapper: Mappers.CloudError
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
queryParameters: [Parameters.apiVersion],
|
|
1802
|
+
urlParameters: [
|
|
1803
|
+
Parameters.$host,
|
|
1804
|
+
Parameters.subscriptionId,
|
|
1805
|
+
Parameters.resourceGroupName,
|
|
1806
|
+
Parameters.name,
|
|
1807
|
+
Parameters.labName
|
|
1808
|
+
],
|
|
1809
|
+
headerParameters: [Parameters.accept],
|
|
1810
|
+
serializer
|
|
1811
|
+
};
|
|
1812
|
+
const unClaimOperationSpec: coreClient.OperationSpec = {
|
|
1813
|
+
path:
|
|
1814
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/unClaim",
|
|
1815
|
+
httpMethod: "POST",
|
|
1816
|
+
responses: {
|
|
1817
|
+
200: {},
|
|
1818
|
+
201: {},
|
|
1819
|
+
202: {},
|
|
1820
|
+
204: {},
|
|
1821
|
+
default: {
|
|
1822
|
+
bodyMapper: Mappers.CloudError
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
queryParameters: [Parameters.apiVersion],
|
|
1826
|
+
urlParameters: [
|
|
1827
|
+
Parameters.$host,
|
|
1828
|
+
Parameters.subscriptionId,
|
|
1829
|
+
Parameters.resourceGroupName,
|
|
1830
|
+
Parameters.name,
|
|
1831
|
+
Parameters.labName
|
|
1832
|
+
],
|
|
1833
|
+
headerParameters: [Parameters.accept],
|
|
1834
|
+
serializer
|
|
1835
|
+
};
|
|
1836
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
1837
|
+
path: "{nextLink}",
|
|
1838
|
+
httpMethod: "GET",
|
|
1839
|
+
responses: {
|
|
1840
|
+
200: {
|
|
1841
|
+
bodyMapper: Mappers.LabVirtualMachineList
|
|
1842
|
+
},
|
|
1843
|
+
default: {
|
|
1844
|
+
bodyMapper: Mappers.CloudError
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
queryParameters: [
|
|
1848
|
+
Parameters.apiVersion,
|
|
1849
|
+
Parameters.expand,
|
|
1850
|
+
Parameters.filter,
|
|
1851
|
+
Parameters.top,
|
|
1852
|
+
Parameters.orderby
|
|
1853
|
+
],
|
|
1854
|
+
urlParameters: [
|
|
1855
|
+
Parameters.$host,
|
|
1856
|
+
Parameters.nextLink,
|
|
1857
|
+
Parameters.subscriptionId,
|
|
1858
|
+
Parameters.resourceGroupName,
|
|
1859
|
+
Parameters.labName
|
|
1860
|
+
],
|
|
1861
|
+
headerParameters: [Parameters.accept],
|
|
1862
|
+
serializer
|
|
1863
|
+
};
|