From 6dbce7d3240445a748968e6caf0daabed3377653 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 25 Oct 2023 02:47:47 +0000 Subject: [PATCH] CodeGen from PR 26364 in Azure/azure-rest-api-specs Merge 2b169bee98b58cd191e5b15f7cffa89b52f50aed into 1d88127c99135813e029a8e21546a243e191a1f8 --- common/config/rush/pnpm-lock.yaml | 109 +- .../arm-connectedvmware/CHANGELOG.md | 21 +- .../arm-connectedvmware/LICENSE | 2 +- .../arm-connectedvmware/README.md | 2 +- .../arm-connectedvmware/_meta.json | 8 +- .../arm-connectedvmware/package.json | 43 +- .../review/arm-connectedvmware.api.md | 900 ++--- .../arm-connectedvmware/rollup.config.js | 122 + .../src/azureArcVMwareManagementServiceAPI.ts | 54 +- .../arm-connectedvmware/src/lroImpl.ts | 54 +- .../arm-connectedvmware/src/models/index.ts | 1878 +++------ .../arm-connectedvmware/src/models/mappers.ts | 3414 +++++++---------- .../src/models/parameters.ts | 160 +- .../src/operations/clusters.ts | 55 +- .../src/operations/datastores.ts | 55 +- .../src/operations/hosts.ts | 53 +- .../hybridIdentityMetadataOperations.ts | 335 -- .../src/operations/index.ts | 7 +- .../src/operations/inventoryItems.ts | 2 +- .../src/operations/machineExtensions.ts | 615 --- .../src/operations/resourcePools.ts | 55 +- .../src/operations/vCenters.ts | 55 +- ...uestAgents.ts => vMInstanceGuestAgents.ts} | 331 +- .../src/operations/virtualMachineInstances.ts | 899 +++++ .../src/operations/virtualMachineTemplates.ts | 55 +- .../src/operations/virtualMachines.ts | 1264 ------ .../src/operations/virtualNetworks.ts | 55 +- ...nstanceHybridIdentityMetadataOperations.ts | 204 + .../src/operationsInterfaces/clusters.ts | 8 +- .../src/operationsInterfaces/datastores.ts | 8 +- .../src/operationsInterfaces/guestAgents.ts | 105 - .../src/operationsInterfaces/hosts.ts | 6 +- .../hybridIdentityMetadataOperations.ts | 73 - .../src/operationsInterfaces/index.ts | 7 +- .../operationsInterfaces/machineExtensions.ts | 147 - .../src/operationsInterfaces/resourcePools.ts | 8 +- .../src/operationsInterfaces/vCenters.ts | 8 +- .../vMInstanceGuestAgents.ts | 95 + .../virtualMachineInstances.ts | 205 + .../virtualMachineTemplates.ts | 8 +- .../operationsInterfaces/virtualMachines.ts | 262 -- .../operationsInterfaces/virtualNetworks.ts | 8 +- ...nstanceHybridIdentityMetadataOperations.ts | 40 + .../arm-connectedvmware/tsconfig.json | 10 +- 44 files changed, 4469 insertions(+), 7336 deletions(-) create mode 100644 sdk/connectedvmware/arm-connectedvmware/rollup.config.js delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts rename sdk/connectedvmware/arm-connectedvmware/src/operations/{guestAgents.ts => vMInstanceGuestAgents.ts} (51%) create mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts create mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts create mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts create mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts delete mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts create mode 100644 sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 93629ea6cb98..2b0507c4d68c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1768,7 +1768,7 @@ packages: engines: {node: ^8.13.0 || >=10.10.0} dependencies: '@grpc/proto-loader': 0.7.10 - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@grpc/proto-loader@0.7.10: @@ -2808,7 +2808,7 @@ packages: resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} dependencies: '@types/connect': 3.4.37 - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/chai-as-promised@7.1.7: @@ -2830,7 +2830,7 @@ packages: /@types/connect@3.4.37: resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/cookie@0.4.1: @@ -2840,7 +2840,7 @@ packages: /@types/cors@2.8.15: resolution: {integrity: sha512-n91JxbNLD8eQIuXDIChAN1tCKNWCEgpceU9b7ZMbFA+P+Q4yIeh80jizFLEvolRPc1ES0VdwFlGv+kJTSirogw==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/debug@4.1.10: @@ -2852,7 +2852,7 @@ packages: /@types/decompress@4.2.6: resolution: {integrity: sha512-ULmsMkKxU7aIGbnxP4Rz28hLdRZ4q0cdy6kcb8dx+UgDGOn+id5fibvoeTnjuolhrRM7f7TOtGADeKEk60SSsQ==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/eslint@8.44.6: @@ -2873,7 +2873,7 @@ packages: /@types/express-serve-static-core@4.17.39: resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -2891,13 +2891,13 @@ packages: /@types/fs-extra@8.1.4: resolution: {integrity: sha512-OMcQKnlrkrOI0TaZ/MgVDA8LYFl7CykzFsjMj9l5x3un2nFxCY20ZFlnqrM0lcqlbs0Yro2HbnZlmopyRaoJ5w==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/http-errors@2.0.3: @@ -2914,7 +2914,7 @@ packages: /@types/is-buffer@2.0.1: resolution: {integrity: sha512-JjGuRpibC4mD54Fcr9QgMmb4zh5n1WJILdb0y/i+K96SczrdcjZ7Ns9N11fZcGQ6eX4pSTSNA1vxJ9eGO55lVg==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/istanbul-lib-coverage@2.0.5: @@ -2932,13 +2932,13 @@ packages: /@types/jsonwebtoken@9.0.4: resolution: {integrity: sha512-8UYapdmR0QlxgvJmyE8lP7guxD0UGVMfknsdtCFZh4ovShdBl3iOI4zdvqBHrB/IS+xUj3PSx73Qkey1fhWz+g==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/jws@3.2.7: resolution: {integrity: sha512-T7Ip96aYPl3SlF0Y7zR8dmJ87XbxjrlCETpLohwdsuTv9jT7TgNXPPbUOTPtPYwSrVgKw7+87xR71aNi+vB26Q==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/linkify-it@3.0.4: @@ -2989,13 +2989,13 @@ packages: /@types/mysql@2.15.22: resolution: {integrity: sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/node-fetch@2.6.7: resolution: {integrity: sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 form-data: 4.0.0 dev: false @@ -3020,7 +3020,7 @@ packages: /@types/pg@8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -3048,7 +3048,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/resolve@1.20.2: @@ -3071,7 +3071,7 @@ packages: resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} dependencies: '@types/mime': 1.3.4 - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/serve-static@1.15.4: @@ -3079,7 +3079,7 @@ packages: dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/shimmer@1.0.4: @@ -3099,7 +3099,7 @@ packages: /@types/stoppable@1.1.2: resolution: {integrity: sha512-zRBGFTIdkCAdM4VDeFvka5NbD6JVfz7yEYzggKrXQ03ZplrZp5vqQPWHTw0wk81wer61dwi44Tp6FDDXoPBW5A==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/through@0.0.32: @@ -3119,7 +3119,7 @@ packages: /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/underscore@1.11.12: @@ -3143,13 +3143,13 @@ packages: /@types/ws@8.5.8: resolution: {integrity: sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/xml2js@0.4.13: resolution: {integrity: sha512-nuT42GzgoUa4zZgBoF4d+Zqc12/FlVxXCT4xU6j3RfqTFVQWrUAClI/0sNJ5ImM9Wv6KB42KMG2xsVMn4cSBzA==} dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false /@types/yargs-parser@21.0.2: @@ -3166,7 +3166,7 @@ packages: resolution: {integrity: sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==} requiresBuild: true dependencies: - '@types/node': 16.18.59 + '@types/node': 18.18.6 dev: false optional: true @@ -4517,7 +4517,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.15 - '@types/node': 16.18.59 + '@types/node': 18.18.6 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -7789,7 +7789,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 16.18.59 + '@types/node': 18.18.6 long: 5.2.3 dev: false @@ -8880,6 +8880,37 @@ packages: code-block-writer: 12.0.0 dev: false + /ts-node@10.9.1(@types/node@16.18.59)(typescript@5.0.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.59 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.0.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@16.18.59)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -11280,22 +11311,30 @@ packages: dev: false file:projects/arm-connectedvmware.tgz: - resolution: {integrity: sha512-GMb0xs8mBmSkxsDbu4ocyil+kk7MRUTydVZ4lJnbxRgsQtFJUF+dJumrDh9OmLM122PiC21NQI3hbMPe8jb/hw==, tarball: file:projects/arm-connectedvmware.tgz} + resolution: {integrity: sha512-PXQshRR58uApG6+oTgQ+oUfHmFrL5MhIQWeZ6nszjU1Yu4Z0k/Pb6bWoEQSqaRccbJV9XwTCHxiap0ptGmkjYA==, tarball: file:projects/arm-connectedvmware.tgz} name: '@rush-temp/arm-connectedvmware' version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@16.18.59) + '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) + '@rollup/plugin-json': 6.0.1(rollup@2.79.1) + '@rollup/plugin-multi-entry': 6.0.1(rollup@2.79.1) + '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 16.18.59 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 - mkdirp: 1.0.4 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 - ts-node: 10.9.1(@types/node@16.18.59)(typescript@5.2.2) + rimraf: 5.0.5 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.59)(rollup@2.79.1) + ts-node: 10.9.1(@types/node@16.18.59)(typescript@5.0.4) tslib: 2.6.2 - typescript: 5.2.2 + typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' @@ -11868,7 +11907,7 @@ packages: dev: false file:projects/arm-devcenter.tgz: - resolution: {integrity: sha512-/angxbieMkKcJsQJdqNc+zy25g0XoAOpcDa6DASkRdfp2uNoq/Uj9I3FDFf3lzreh9d0e26JB4Kn8PcPUACleg==, tarball: file:projects/arm-devcenter.tgz} + resolution: {integrity: sha512-K5dsNt8WmABkxTXGXEc7EABDWa8n976i5C/w9YM/9FUNfsYCpo8CUkgKH+eIo1dYQ9mq7PLW43LZVU+GOq8LLQ==, tarball: file:projects/arm-devcenter.tgz} name: '@rush-temp/arm-devcenter' version: 0.0.0 dependencies: @@ -12759,7 +12798,7 @@ packages: dev: false file:projects/arm-keyvault.tgz: - resolution: {integrity: sha512-f1Y090+FjIYGgVrBYGG1+mRJl2uH27vEsXhQG9zh2By/YXkTNL/gEJuC73RbAu2j5aNA+ygpwG5OoJ8WyV+0zA==, tarball: file:projects/arm-keyvault.tgz} + resolution: {integrity: sha512-mJZb076NjWXPWX+BubEqM/+ZwVL4kqwgnl2zEIMwbduph1qBMxpy4Ep+H6ZKVPRkN+cGK9/FGYim6K9gMN2VXQ==, tarball: file:projects/arm-keyvault.tgz} name: '@rush-temp/arm-keyvault' version: 0.0.0 dependencies: @@ -14171,7 +14210,7 @@ packages: dev: false file:projects/arm-recoveryservicesdatareplication.tgz: - resolution: {integrity: sha512-P2ShC9/4EXm4vIJRDEm1YSx2InnENT2cuOXxSYZCBwpQqxfjeaKienST4FM8v2zV6HL3tM/4H1Qw8Ebl5m4GhQ==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} + resolution: {integrity: sha512-c3iqbkXdtfIbpO1YWP1PzcuD7idEEBAukQ1E07PcuURdAT3yZWGGyMIp/mG6966hs4yaIxK9H0F5l3jdfGVZlw==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} name: '@rush-temp/arm-recoveryservicesdatareplication' version: 0.0.0 dependencies: @@ -14337,7 +14376,7 @@ packages: dev: false file:projects/arm-resourcehealth.tgz: - resolution: {integrity: sha512-Vi11ByWkUqB6+KrUx1OqvaUODlyNFx2dCi0ZBDdCTzTMUmnGIFROrswsFeJ+IzxeOrh4TwHtQAYT8AakTbkRNA==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-WfSg3UfoZo/16YZM6vtq4nGyHEoDGifURwH76iVIvEC3Za1wzaSGp8hilf/G+zo//WRTFkbXcxMsq4rjlIvRcQ==, tarball: file:projects/arm-resourcehealth.tgz} name: '@rush-temp/arm-resourcehealth' version: 0.0.0 dependencies: @@ -15161,7 +15200,7 @@ packages: dev: false file:projects/arm-support.tgz: - resolution: {integrity: sha512-C3MECBBBJ2MFTOqGTI8ZRsXsYSIMDmwdXs7dsoiwzfAzULzsPclqcCv67S3cQnhEQZ9BXSs8r2S9CnhgEnLd0A==, tarball: file:projects/arm-support.tgz} + resolution: {integrity: sha512-VJNVcMTPsYDEREGB+/MlH0VKcKBp6sFBZclB3nfB394j4g5vCkvpk6q1WFcn/d8udHhGo8mI4XiNdfN43Mu6sQ==, tarball: file:projects/arm-support.tgz} name: '@rush-temp/arm-support' version: 0.0.0 dependencies: @@ -17783,7 +17822,7 @@ packages: dev: false file:projects/keyvault-certificates.tgz: - resolution: {integrity: sha512-I2HoDbXKPMnWCzSLvBfSeRvhcEcjo5QbWjR69KuNMGEeNtuyi9ZIYdRhvDkh1jhmXF0pUFIO+gxW1fDLZNHL+w==, tarball: file:projects/keyvault-certificates.tgz} + resolution: {integrity: sha512-N3MzxkAtHFu1M6+2m0+9fYOpGu66U9JAjLwxrkMPgj/qtovuH2m8lFizg6B4k4mnWSo19Z0kl04vF7nNS9CR6g==, tarball: file:projects/keyvault-certificates.tgz} name: '@rush-temp/keyvault-certificates' version: 0.0.0 dependencies: diff --git a/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md b/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md index 7216a54e6099..86dea39fed3f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md +++ b/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md @@ -1,22 +1,5 @@ # Release History - -## 1.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.2 (2022-12-30) - -**Features** - - - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand - -## 1.0.0-beta.1 (2022-08-15) +## 1.0.0 (2023-10-25) -The package of @azure/arm-connectedvmware is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-connectedvmware is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/connectedvmware/arm-connectedvmware/LICENSE b/sdk/connectedvmware/arm-connectedvmware/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/LICENSE +++ b/sdk/connectedvmware/arm-connectedvmware/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/connectedvmware/arm-connectedvmware/README.md b/sdk/connectedvmware/arm-connectedvmware/README.md index b1a6ee39aa3e..e3baa38c2424 100644 --- a/sdk/connectedvmware/arm-connectedvmware/README.md +++ b/sdk/connectedvmware/arm-connectedvmware/README.md @@ -6,7 +6,7 @@ Self service experience for VMware. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-connectedvmware) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/connectedvmware/arm-connectedvmware/_meta.json b/sdk/connectedvmware/arm-connectedvmware/_meta.json index a4aac0211366..fd133b1b6e01 100644 --- a/sdk/connectedvmware/arm-connectedvmware/_meta.json +++ b/sdk/connectedvmware/arm-connectedvmware/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f38115ac455af89493b0a0719d9a987404560dda", + "commit": "a498a66c4c3fd00b12293f7d4fa0f02a32f8f29a", "readme": "specification/connectedvmware/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\connectedvmware\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/connectedvmware/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/connectedvmware/arm-connectedvmware/package.json b/sdk/connectedvmware/arm-connectedvmware/package.json index 559e7b77f0bd..a7de66326623 100644 --- a/sdk/connectedvmware/arm-connectedvmware/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureArcVMwareManagementServiceAPI.", - "version": "1.0.0-beta.3", + "version": "1.0.0", "engines": { "node": ">=16.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,21 +29,29 @@ "types": "./types/arm-connectedvmware.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", - "typescript": "~5.2.0", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -64,20 +72,21 @@ "src/**/*.ts", "README.md", "LICENSE", + "rollup.config.js", "tsconfig.json", "review/*", "CHANGELOG.md", "types/*" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "prepack": "npm run build", "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,13 +114,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware" +} \ No newline at end of file diff --git a/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md b/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md index 4e02efffbb48..1e1c279b4700 100644 --- a/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md +++ b/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md @@ -6,28 +6,16 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; - -// @public -export interface AvailablePatchCountByClassification { - readonly critical?: number; - readonly definition?: number; - readonly featurePack?: number; - readonly other?: number; - readonly security?: number; - readonly servicePack?: number; - readonly tools?: number; - readonly updateRollup?: number; - readonly updates?: number; -} +import { SimplePollerLike } from '@azure/core-lro'; // @public (undocumented) export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureArcVMwareManagementServiceAPIOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: AzureArcVMwareManagementServiceAPIOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -35,29 +23,27 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient // (undocumented) datastores: Datastores; // (undocumented) - guestAgents: GuestAgents; - // (undocumented) hosts: Hosts; // (undocumented) - hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; - // (undocumented) inventoryItems: InventoryItems; // (undocumented) - machineExtensions: MachineExtensions; - // (undocumented) operations: Operations; // (undocumented) resourcePools: ResourcePools; // (undocumented) - subscriptionId: string; + subscriptionId?: string; // (undocumented) vCenters: VCenters; // (undocumented) - virtualMachines: VirtualMachines; + virtualMachineInstances: VirtualMachineInstances; // (undocumented) virtualMachineTemplates: VirtualMachineTemplates; // (undocumented) virtualNetworks: VirtualNetworks; + // (undocumented) + vMInstanceGuestAgents: VMInstanceGuestAgents; + // (undocumented) + vmInstanceHybridIdentityMetadataOperations: VmInstanceHybridIdentityMetadataOperations; } // @public @@ -80,13 +66,17 @@ export interface Cluster { moRefId?: string; readonly name?: string; readonly networkIds?: string[]; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; + readonly totalCpuMHz?: number; + readonly totalMemoryGB?: number; readonly type?: string; + readonly usedCpuMHz?: number; + readonly usedMemoryGB?: number; readonly uuid?: string; vCenterId?: string; } @@ -98,9 +88,9 @@ export interface ClusterInventoryItem extends InventoryItemProperties { // @public export interface Clusters { - beginCreate(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise, ClustersCreateResponse>>; + beginCreate(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise, ClustersCreateResponse>>; beginCreateAndWait(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; list(options?: ClustersListOptionalParams): PagedAsyncIterableIterator; @@ -118,6 +108,12 @@ export interface ClustersCreateOptionalParams extends coreClient.OperationOption // @public export type ClustersCreateResponse = Cluster; +// @public +export interface ClustersDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -187,8 +183,10 @@ export type CreatedByType = string; // @public export interface Datastore { + readonly capacityGB?: number; readonly customResourceName?: string; extendedLocation?: ExtendedLocation; + readonly freeSpaceGB?: number; readonly id?: string; inventoryItemId?: string; kind?: string; @@ -216,9 +214,9 @@ export interface DatastoreInventoryItem extends InventoryItemProperties { // @public export interface Datastores { - beginCreate(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise, DatastoresCreateResponse>>; + beginCreate(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise, DatastoresCreateResponse>>; beginCreateAndWait(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise; get(resourceGroupName: string, datastoreName: string, options?: DatastoresGetOptionalParams): Promise; list(options?: DatastoresListOptionalParams): PagedAsyncIterableIterator; @@ -236,6 +234,12 @@ export interface DatastoresCreateOptionalParams extends coreClient.OperationOpti // @public export type DatastoresCreateResponse = Datastore; +// @public +export interface DatastoresDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface DatastoresDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -299,23 +303,23 @@ export type DiskMode = string; export type DiskType = string; // @public -export interface ErrorDefinition { - readonly code?: string; - readonly details?: ErrorDefinition[]; - readonly message?: string; +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; } // @public export interface ErrorDetail { - code: string; - details?: ErrorDetail[]; - message: string; - target?: string; + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public export interface ErrorResponse { - error?: ErrorDefinition; + error?: ErrorDetail; } // @public @@ -335,11 +339,11 @@ export interface GuestAgent extends ProxyResource { credentials?: GuestCredential; readonly customResourceName?: string; httpProxyConfig?: HttpProxyConfiguration; + privateLinkScopeResourceId?: string; provisioningAction?: ProvisioningAction; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly status?: string; readonly statuses?: ResourceStatus[]; - readonly systemData?: SystemData; readonly uuid?: string; } @@ -349,62 +353,6 @@ export interface GuestAgentList { value: GuestAgent[]; } -// @public -export interface GuestAgentProfile { - readonly agentVersion?: string; - readonly errorDetails?: ErrorDetail[]; - readonly lastStatusChange?: Date; - readonly status?: StatusTypes; - readonly vmUuid?: string; -} - -// @public -export interface GuestAgents { - beginCreate(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsCreateOptionalParams): Promise, GuestAgentsCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsGetOptionalParams): Promise; - listByVm(resourceGroupName: string, virtualMachineName: string, options?: GuestAgentsListByVmOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GuestAgentsCreateOptionalParams extends coreClient.OperationOptions { - body?: GuestAgent; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GuestAgentsCreateResponse = GuestAgent; - -// @public -export interface GuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface GuestAgentsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsGetResponse = GuestAgent; - -// @public -export interface GuestAgentsListByVmNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVmNextResponse = GuestAgentList; - -// @public -export interface GuestAgentsListByVmOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVmResponse = GuestAgentList; - // @public export interface GuestCredential { password?: string; @@ -423,16 +371,22 @@ export interface HardwareProfile { // @public export interface Host { + readonly cpuMhz?: number; readonly customResourceName?: string; + readonly datastoreIds?: string[]; extendedLocation?: ExtendedLocation; readonly id?: string; inventoryItemId?: string; kind?: string; location: string; + readonly memorySizeGB?: number; readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly networkIds?: string[]; + readonly overallCpuUsageMHz?: number; + readonly overallMemoryUsageGB?: number; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -451,9 +405,9 @@ export interface HostInventoryItem extends InventoryItemProperties { // @public export interface Hosts { - beginCreate(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise, HostsCreateResponse>>; + beginCreate(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise, HostsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise; get(resourceGroupName: string, hostName: string, options?: HostsGetOptionalParams): Promise; list(options?: HostsListOptionalParams): PagedAsyncIterableIterator; @@ -471,6 +425,12 @@ export interface HostsCreateOptionalParams extends coreClient.OperationOptions { // @public export type HostsCreateResponse = Host; +// @public +export interface HostsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface HostsDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -533,71 +493,19 @@ export interface HttpProxyConfiguration { } // @public -export interface HybridIdentityMetadata extends ProxyResource { - readonly identity?: Identity; - readonly provisioningState?: string; - publicKey?: string; - readonly systemData?: SystemData; - vmId?: string; -} - -// @public -export interface HybridIdentityMetadataCreateOptionalParams extends coreClient.OperationOptions { - body?: HybridIdentityMetadata; -} - -// @public -export type HybridIdentityMetadataCreateResponse = HybridIdentityMetadata; - -// @public -export interface HybridIdentityMetadataDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; - -// @public -export interface HybridIdentityMetadataList { - nextLink?: string; - value: HybridIdentityMetadata[]; -} - -// @public -export interface HybridIdentityMetadataListByVmNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataListByVmNextResponse = HybridIdentityMetadataList; - -// @public -export interface HybridIdentityMetadataListByVmOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataListByVmResponse = HybridIdentityMetadataList; - -// @public -export interface HybridIdentityMetadataOperations { - create(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataCreateOptionalParams): Promise; - delete(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; - listByVm(resourceGroupName: string, virtualMachineName: string, options?: HybridIdentityMetadataListByVmOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface Identity { - readonly principalId?: string; - readonly tenantId?: string; - type: IdentityType; +export interface InfrastructureProfile { + readonly customResourceName?: string; + firmwareType?: FirmwareType; + readonly folderPath?: string; + readonly instanceUuid?: string; + inventoryItemId?: string; + readonly moName?: string; + readonly moRefId?: string; + smbiosUuid?: string; + templateId?: string; + vCenterId?: string; } -// @public -export type IdentityType = string; - // @public export interface InventoryItem extends ProxyResource { inventoryType: InventoryType; @@ -605,13 +513,13 @@ export interface InventoryItem extends ProxyResource { managedResourceId?: string; moName?: string; moRefId?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; } // @public export interface InventoryItemDetails { inventoryItemId?: string; + inventoryType?: InventoryType; moName?: string; } @@ -621,7 +529,7 @@ export interface InventoryItemProperties { managedResourceId?: string; moName?: string; moRefId?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } // @public (undocumented) @@ -712,12 +620,6 @@ export enum KnownFirmwareType { Efi = "efi" } -// @public -export enum KnownIdentityType { - None = "None", - SystemAssigned = "SystemAssigned" -} - // @public export enum KnownInventoryType { Cluster = "Cluster", @@ -756,37 +658,6 @@ export enum KnownOsType { Windows = "Windows" } -// @public -export enum KnownOsTypeUM { - Linux = "Linux", - Windows = "Windows" -} - -// @public -export enum KnownPatchOperationStartedBy { - Platform = "Platform", - User = "User" -} - -// @public -export enum KnownPatchOperationStatus { - CompletedWithWarnings = "CompletedWithWarnings", - Failed = "Failed", - InProgress = "InProgress", - Succeeded = "Succeeded", - Unknown = "Unknown" -} - -// @public -export enum KnownPatchServiceUsed { - APT = "APT", - Unknown = "Unknown", - WU = "WU", - WUWsus = "WU_WSUS", - YUM = "YUM", - Zypper = "Zypper" -} - // @public export enum KnownPowerOnBootOption { Disabled = "disabled", @@ -820,20 +691,6 @@ export enum KnownScsiControllerType { Pvscsi = "pvscsi" } -// @public -export enum KnownStatusLevelTypes { - Error = "Error", - Info = "Info", - Warning = "Warning" -} - -// @public -export enum KnownStatusTypes { - Connected = "Connected", - Disconnected = "Disconnected", - Error = "Error" -} - // @public export enum KnownVirtualScsiSharing { NoSharing = "noSharing", @@ -841,168 +698,6 @@ export enum KnownVirtualScsiSharing { VirtualSharing = "virtualSharing" } -// @public -export enum KnownVMGuestPatchClassificationLinux { - Critical = "Critical", - Other = "Other", - Security = "Security" -} - -// @public -export enum KnownVMGuestPatchClassificationWindows { - Critical = "Critical", - Definition = "Definition", - FeaturePack = "FeaturePack", - Security = "Security", - ServicePack = "ServicePack", - Tools = "Tools", - UpdateRollUp = "UpdateRollUp", - Updates = "Updates" -} - -// @public -export enum KnownVMGuestPatchRebootSetting { - Always = "Always", - IfRequired = "IfRequired", - Never = "Never" -} - -// @public -export enum KnownVMGuestPatchRebootStatus { - Completed = "Completed", - Failed = "Failed", - NotNeeded = "NotNeeded", - Required = "Required", - Started = "Started", - Unknown = "Unknown" -} - -// @public -export interface LinuxParameters { - classificationsToInclude?: VMGuestPatchClassificationLinux[]; - packageNameMasksToExclude?: string[]; - packageNameMasksToInclude?: string[]; -} - -// @public -export interface MachineExtension { - autoUpgradeMinorVersion?: boolean; - enableAutomaticUpgrade?: boolean; - forceUpdateTag?: string; - readonly id?: string; - instanceView?: MachineExtensionPropertiesInstanceView; - location?: string; - readonly name?: string; - protectedSettings?: Record; - readonly provisioningState?: string; - publisher?: string; - settings?: Record; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; - typeHandlerVersion?: string; - typePropertiesType?: string; -} - -// @public -export interface MachineExtensionInstanceView { - readonly name?: string; - status?: MachineExtensionInstanceViewStatus; - readonly type?: string; - readonly typeHandlerVersion?: string; -} - -// @public -export interface MachineExtensionInstanceViewStatus { - readonly code?: string; - readonly displayStatus?: string; - readonly level?: StatusLevelTypes; - readonly message?: string; - readonly time?: Date; -} - -// @public -export interface MachineExtensionPropertiesInstanceView extends MachineExtensionInstanceView { -} - -// @public -export interface MachineExtensions { - beginCreateOrUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise; - get(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsGetOptionalParams): Promise; - list(resourceGroupName: string, name: string, options?: MachineExtensionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MachineExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; - -// @public -export interface MachineExtensionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface MachineExtensionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MachineExtensionsGetResponse = MachineExtension; - -// @public -export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MachineExtensionsListNextResponse = MachineExtensionsListResult; - -// @public -export interface MachineExtensionsListOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type MachineExtensionsListResponse = MachineExtensionsListResult; - -// @public -export interface MachineExtensionsListResult { - nextLink?: string; - value?: MachineExtension[]; -} - -// @public -export interface MachineExtensionsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type MachineExtensionsUpdateResponse = MachineExtension; - -// @public -export interface MachineExtensionUpdate extends ResourcePatch { - autoUpgradeMinorVersion?: boolean; - enableAutomaticUpgrade?: boolean; - forceUpdateTag?: string; - protectedSettings?: Record; - publisher?: string; - settings?: Record; - type?: string; - typeHandlerVersion?: string; -} - // @public export interface NetworkInterface { deviceKey?: number; @@ -1100,66 +795,21 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationsList; // @public -export interface OsProfile { +export interface OsProfileForVMInstance { adminPassword?: string; adminUsername?: string; - readonly allowExtensionOperations?: boolean; computerName?: string; guestId?: string; - linuxConfiguration?: OsProfileLinuxConfiguration; - readonly osName?: string; + readonly osSku?: string; osType?: OsType; readonly toolsRunningStatus?: string; readonly toolsVersion?: string; readonly toolsVersionStatus?: string; - windowsConfiguration?: OsProfileWindowsConfiguration; -} - -// @public -export interface OsProfileLinuxConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileUpdate { - linuxConfiguration?: OsProfileUpdateLinuxConfiguration; - windowsConfiguration?: OsProfileUpdateWindowsConfiguration; -} - -// @public -export interface OsProfileUpdateLinuxConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileUpdateWindowsConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileWindowsConfiguration { - assessmentMode?: string; - patchMode?: string; } // @public export type OsType = string; -// @public -export type OsTypeUM = string; - -// @public -export type PatchOperationStartedBy = string; - -// @public -export type PatchOperationStatus = string; - -// @public -export type PatchServiceUsed = string; - // @public export interface PlacementProfile { clusterId?: string; @@ -1185,6 +835,7 @@ export interface ProxyResource extends Resource { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -1197,22 +848,28 @@ export interface ResourcePatch { // @public export interface ResourcePool { + readonly cpuCapacityMHz?: number; readonly cpuLimitMHz?: number; + readonly cpuOverallUsageMHz?: number; readonly cpuReservationMHz?: number; readonly cpuSharesLevel?: string; readonly customResourceName?: string; + readonly datastoreIds?: string[]; extendedLocation?: ExtendedLocation; readonly id?: string; inventoryItemId?: string; kind?: string; location: string; + readonly memCapacityGB?: number; readonly memLimitMB?: number; + readonly memOverallUsageGB?: number; readonly memReservationMB?: number; readonly memSharesLevel?: string; readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly networkIds?: string[]; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1231,9 +888,9 @@ export interface ResourcePoolInventoryItem extends InventoryItemProperties { // @public export interface ResourcePools { - beginCreate(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise, ResourcePoolsCreateResponse>>; + beginCreate(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise, ResourcePoolsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise; get(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsGetOptionalParams): Promise; list(options?: ResourcePoolsListOptionalParams): PagedAsyncIterableIterator; @@ -1251,6 +908,12 @@ export interface ResourcePoolsCreateOptionalParams extends coreClient.OperationO // @public export type ResourcePoolsCreateResponse = ResourcePool; +// @public +export interface ResourcePoolsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ResourcePoolsDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1325,12 +988,6 @@ export interface SecurityProfile { uefiSettings?: UefiSettings; } -// @public -export type StatusLevelTypes = string; - -// @public -export type StatusTypes = string; - // @public export interface StopVirtualMachineOptions { skipShutdown?: boolean; @@ -1375,7 +1032,7 @@ export interface VCenter { location: string; readonly name?: string; port?: number; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1388,9 +1045,9 @@ export interface VCenter { // @public export interface VCenters { - beginCreate(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise, VCentersCreateResponse>>; + beginCreate(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise, VCentersCreateResponse>>; beginCreateAndWait(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise; get(resourceGroupName: string, vcenterName: string, options?: VCentersGetOptionalParams): Promise; list(options?: VCentersListOptionalParams): PagedAsyncIterableIterator; @@ -1408,6 +1065,12 @@ export interface VCentersCreateOptionalParams extends coreClient.OperationOption // @public export type VCentersCreateResponse = VCenter; +// @public +export interface VCentersDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VCentersDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1497,229 +1160,179 @@ export interface VirtualDiskUpdate { } // @public -export interface VirtualMachine { - readonly customResourceName?: string; +export interface VirtualMachineInstance extends ProxyResource { extendedLocation?: ExtendedLocation; - firmwareType?: FirmwareType; - readonly folderPath?: string; - guestAgentProfile?: GuestAgentProfile; hardwareProfile?: HardwareProfile; - readonly id?: string; - identity?: Identity; - readonly instanceUuid?: string; - inventoryItemId?: string; - kind?: string; - location: string; - readonly moName?: string; - moRefId?: string; - readonly name?: string; + infrastructureProfile?: InfrastructureProfile; networkProfile?: NetworkProfile; - osProfile?: OsProfile; + osProfile?: OsProfileForVMInstance; placementProfile?: PlacementProfile; readonly powerState?: string; - readonly provisioningState?: string; - resourcePoolId?: string; + readonly provisioningState?: ProvisioningState; + readonly resourceUid?: string; securityProfile?: SecurityProfile; - smbiosUuid?: string; readonly statuses?: ResourceStatus[]; storageProfile?: StorageProfile; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - templateId?: string; - readonly type?: string; - readonly uuid?: string; - vCenterId?: string; - readonly vmId?: string; } // @public -export interface VirtualMachineAssessPatchesResult { - readonly assessmentActivityId?: string; - availablePatchCountByClassification?: AvailablePatchCountByClassification; - readonly errorDetails?: ErrorDetail; - readonly lastModifiedDateTime?: Date; - readonly osType?: OsTypeUM; - readonly patchServiceUsed?: PatchServiceUsed; - readonly rebootPending?: boolean; - readonly startDateTime?: Date; - readonly startedBy?: PatchOperationStartedBy; - readonly status?: PatchOperationStatus; +export interface VirtualMachineInstances { + beginCreateOrUpdate(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise, VirtualMachineInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise, VirtualMachineInstancesDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise; + beginRestart(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise, VirtualMachineInstancesRestartResponse>>; + beginRestartAndWait(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise; + beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; + beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; + beginStop(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; + beginStopAndWait(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise; + beginUpdate(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; + beginUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; + get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; + list(resourceUri: string, options?: VirtualMachineInstancesListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface VirtualMachineInstallPatchesParameters { - linuxParameters?: LinuxParameters; - maximumDuration: string; - rebootSetting: VMGuestPatchRebootSetting; - windowsParameters?: WindowsParameters; -} - -// @public -export interface VirtualMachineInstallPatchesResult { - readonly errorDetails?: ErrorDetail; - readonly excludedPatchCount?: number; - readonly failedPatchCount?: number; - readonly installationActivityId?: string; - readonly installedPatchCount?: number; - readonly lastModifiedDateTime?: Date; - readonly maintenanceWindowExceeded?: boolean; - readonly notSelectedPatchCount?: number; - readonly osType?: OsTypeUM; - readonly patchServiceUsed?: PatchServiceUsed; - readonly pendingPatchCount?: number; - readonly rebootStatus?: VMGuestPatchRebootStatus; - readonly startDateTime?: Date; - readonly startedBy?: PatchOperationStartedBy; - readonly status?: PatchOperationStatus; +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstance; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - folderPath?: string; - host?: InventoryItemDetails; - instanceUuid?: string; - inventoryType: "VirtualMachine"; - ipAddresses?: string[]; - osName?: string; - osType?: OsType; - readonly powerState?: string; - resourcePool?: InventoryItemDetails; - smbiosUuid?: string; - readonly toolsRunningStatus?: string; - readonly toolsVersion?: string; - readonly toolsVersionStatus?: string; -} +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; // @public -export interface VirtualMachines { - beginAssessPatches(resourceGroupName: string, name: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise, VirtualMachinesAssessPatchesResponse>>; - beginAssessPatchesAndWait(resourceGroupName: string, name: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise; - beginCreate(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateOptionalParams): Promise, VirtualMachinesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; - beginInstallPatches(resourceGroupName: string, name: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise, VirtualMachinesInstallPatchesResponse>>; - beginInstallPatchesAndWait(resourceGroupName: string, name: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise; - beginRestart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; - beginRestartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise; - beginStart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; - beginStartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise; - beginStop(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams): Promise; - list(options?: VirtualMachinesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +export interface VirtualMachineInstancesDeleteHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesAssessPatchesOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { + deleteFromHost?: boolean; + force?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; // @public -export interface VirtualMachinesCreateOptionalParams extends coreClient.OperationOptions { - body?: VirtualMachine; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesCreateResponse = VirtualMachine; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; // @public -export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - retain?: boolean; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesList { + nextLink?: string; + value: VirtualMachineInstance[]; } // @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesGetResponse = VirtualMachine; +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstancesList; // @public -export interface VirtualMachinesInstallPatchesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; +export type VirtualMachineInstancesListResponse = VirtualMachineInstancesList; // @public -export interface VirtualMachinesList { - nextLink?: string; - value: VirtualMachine[]; +export interface VirtualMachineInstancesRestartHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachinesList; +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; // @public -export interface VirtualMachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStartHeaders { + // (undocumented) + location?: string; } // @public -export type VirtualMachinesListByResourceGroupResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesListNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualMachinesListNextResponse = VirtualMachinesList; +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; // @public -export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStopHeaders { + // (undocumented) + location?: string; } // @public -export type VirtualMachinesListResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + body?: StopVirtualMachineOptions; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; + +// @public +export interface VirtualMachineInstancesUpdateHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesStopOptionalParams extends coreClient.OperationOptions { - body?: StopVirtualMachineOptions; +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstanceUpdate; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { - body?: VirtualMachineUpdate; - resumeFrom?: string; - updateIntervalInMs?: number; +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstanceUpdate { + hardwareProfile?: HardwareProfile; + networkProfile?: NetworkProfileUpdate; + storageProfile?: StorageProfileUpdate; } // @public -export type VirtualMachinesUpdateResponse = VirtualMachine; +export interface VirtualMachineInventoryItem extends InventoryItemProperties { + cluster?: InventoryItemDetails; + folderPath?: string; + host?: InventoryItemDetails; + instanceUuid?: string; + inventoryType: "VirtualMachine"; + ipAddresses?: string[]; + osName?: string; + osType?: OsType; + readonly powerState?: string; + resourcePool?: InventoryItemDetails; + smbiosUuid?: string; + readonly toolsRunningStatus?: string; + readonly toolsVersion?: string; + readonly toolsVersionStatus?: string; +} // @public export interface VirtualMachineTemplate { @@ -1741,7 +1354,7 @@ export interface VirtualMachineTemplate { readonly numCPUs?: number; readonly osName?: string; readonly osType?: OsType; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1763,13 +1376,15 @@ export interface VirtualMachineTemplateInventoryItem extends InventoryItemProper numCPUs?: number; osName?: string; osType?: OsType; + readonly toolsVersion?: string; + readonly toolsVersionStatus?: string; } // @public export interface VirtualMachineTemplates { - beginCreate(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise, VirtualMachineTemplatesCreateResponse>>; + beginCreate(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise, VirtualMachineTemplatesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise; get(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesGetOptionalParams): Promise; list(options?: VirtualMachineTemplatesListOptionalParams): PagedAsyncIterableIterator; @@ -1787,6 +1402,12 @@ export interface VirtualMachineTemplatesCreateOptionalParams extends coreClient. // @public export type VirtualMachineTemplatesCreateResponse = VirtualMachineTemplate; +// @public +export interface VirtualMachineTemplatesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualMachineTemplatesDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1843,18 +1464,6 @@ export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient. // @public export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; -// @public -export interface VirtualMachineUpdate { - hardwareProfile?: HardwareProfile; - identity?: Identity; - networkProfile?: NetworkProfileUpdate; - osProfile?: OsProfileUpdate; - storageProfile?: StorageProfileUpdate; - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface VirtualNetwork { readonly customResourceName?: string; @@ -1866,7 +1475,7 @@ export interface VirtualNetwork { readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1884,9 +1493,9 @@ export interface VirtualNetworkInventoryItem extends InventoryItemProperties { // @public export interface VirtualNetworks { - beginCreate(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise, VirtualNetworksCreateResponse>>; + beginCreate(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise, VirtualNetworksCreateResponse>>; beginCreateAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; list(options?: VirtualNetworksListOptionalParams): PagedAsyncIterableIterator; @@ -1904,6 +1513,12 @@ export interface VirtualNetworksCreateOptionalParams extends coreClient.Operatio // @public export type VirtualNetworksCreateResponse = VirtualNetwork; +// @public +export interface VirtualNetworksDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1973,24 +1588,99 @@ export interface VirtualScsiController { export type VirtualScsiSharing = string; // @public -export type VMGuestPatchClassificationLinux = string; +export interface VMInstanceGuestAgents { + beginCreate(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise, VMInstanceGuestAgentsCreateResponse>>; + beginCreateAndWait(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VMInstanceGuestAgentsDeleteOptionalParams): Promise, VMInstanceGuestAgentsDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VMInstanceGuestAgentsDeleteOptionalParams): Promise; + get(resourceUri: string, options?: VMInstanceGuestAgentsGetOptionalParams): Promise; + list(resourceUri: string, options?: VMInstanceGuestAgentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { + body?: GuestAgent; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VMInstanceGuestAgentsDeleteResponse = VMInstanceGuestAgentsDeleteHeaders; + +// @public +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchClassificationWindows = string; +export type VMInstanceGuestAgentsGetResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchRebootSetting = string; +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; + +// @public +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VMInstanceGuestAgentsListResponse = GuestAgentList; + +// @public +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + readonly provisioningState?: ProvisioningState; + publicKey?: string; + resourceUid?: string; +} + +// @public +export interface VmInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VmInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; + +// @public +export interface VmInstanceHybridIdentityMetadataList { + nextLink?: string; + value: VmInstanceHybridIdentityMetadata[]; +} + +// @public +export interface VmInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VmInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; + +// @public +export interface VmInstanceHybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchRebootStatus = string; +export type VmInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; // @public -export interface WindowsParameters { - classificationsToInclude?: VMGuestPatchClassificationWindows[]; - excludeKbsRequiringReboot?: boolean; - kbNumbersToExclude?: string[]; - kbNumbersToInclude?: string[]; - maxPatchPublishDate?: Date; +export interface VmInstanceHybridIdentityMetadataOperations { + get(resourceUri: string, options?: VmInstanceHybridIdentityMetadataGetOptionalParams): Promise; + list(resourceUri: string, options?: VmInstanceHybridIdentityMetadataListOptionalParams): PagedAsyncIterableIterator; } // (No @packageDocumentation comment for this package) diff --git a/sdk/connectedvmware/arm-connectedvmware/rollup.config.js b/sdk/connectedvmware/arm-connectedvmware/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/rollup.config.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts b/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts index 2d3aa5a1938e..ea22afe8700c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts @@ -16,7 +16,6 @@ import { import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, - VirtualMachinesImpl, ResourcePoolsImpl, ClustersImpl, HostsImpl, @@ -25,13 +24,12 @@ import { VirtualMachineTemplatesImpl, VirtualNetworksImpl, InventoryItemsImpl, - HybridIdentityMetadataOperationsImpl, - MachineExtensionsImpl, - GuestAgentsImpl + VirtualMachineInstancesImpl, + VmInstanceHybridIdentityMetadataOperationsImpl, + VMInstanceGuestAgentsImpl } from "./operations"; import { Operations, - VirtualMachines, ResourcePools, Clusters, Hosts, @@ -40,16 +38,16 @@ import { VirtualMachineTemplates, VirtualNetworks, InventoryItems, - HybridIdentityMetadataOperations, - MachineExtensions, - GuestAgents + VirtualMachineInstances, + VmInstanceHybridIdentityMetadataOperations, + VMInstanceGuestAgents } from "./operationsInterfaces"; import { AzureArcVMwareManagementServiceAPIOptionalParams } from "./models"; export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the AzureArcVMwareManagementServiceAPI class. @@ -61,12 +59,28 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureArcVMwareManagementServiceAPIOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: AzureArcVMwareManagementServiceAPIOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: + | AzureArcVMwareManagementServiceAPIOptionalParams + | string, + options?: AzureArcVMwareManagementServiceAPIOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -78,7 +92,7 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-connectedvmware/1.0.0-beta.3`; + const packageDetails = `azsdk-js-arm-connectedvmware/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -131,9 +145,8 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-01-10-preview"; + this.apiVersion = options.apiVersion || "2023-10-01"; this.operations = new OperationsImpl(this); - this.virtualMachines = new VirtualMachinesImpl(this); this.resourcePools = new ResourcePoolsImpl(this); this.clusters = new ClustersImpl(this); this.hosts = new HostsImpl(this); @@ -142,11 +155,11 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this); this.virtualNetworks = new VirtualNetworksImpl(this); this.inventoryItems = new InventoryItemsImpl(this); - this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( + this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); + this.vmInstanceHybridIdentityMetadataOperations = new VmInstanceHybridIdentityMetadataOperationsImpl( this ); - this.machineExtensions = new MachineExtensionsImpl(this); - this.guestAgents = new GuestAgentsImpl(this); + this.vMInstanceGuestAgents = new VMInstanceGuestAgentsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -179,7 +192,6 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient } operations: Operations; - virtualMachines: VirtualMachines; resourcePools: ResourcePools; clusters: Clusters; hosts: Hosts; @@ -188,7 +200,7 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient virtualMachineTemplates: VirtualMachineTemplates; virtualNetworks: VirtualNetworks; inventoryItems: InventoryItems; - hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; - machineExtensions: MachineExtensions; - guestAgents: GuestAgents; + virtualMachineInstances: VirtualMachineInstances; + vmInstanceHybridIdentityMetadataOperations: VmInstanceHybridIdentityMetadataOperations; + vMInstanceGuestAgents: VMInstanceGuestAgents; } diff --git a/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts b/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts index 13162023dc62..cc31ddf04e4f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts @@ -48,256 +48,53 @@ export interface OperationDisplay { description?: string; } -/** Error response. */ +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ export interface ErrorResponse { - /** The error details. */ - error?: ErrorDefinition; + /** The error object. */ + error?: ErrorDetail; } -/** Error definition. */ -export interface ErrorDefinition { +/** The error detail. */ +export interface ErrorDetail { /** - * Service specific error code which serves as the substatus for the HTTP error code. + * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly code?: string; /** - * Description of the error. + * The error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly message?: string; /** - * Internal error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDefinition[]; -} - -/** Describes the properties of an AssessPatches result. */ -export interface VirtualMachineAssessPatchesResult { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly assessmentActivityId?: string; - /** - * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rebootPending?: boolean; - /** Summarization of patches available for installation on the machine by classification. */ - availablePatchCountByClassification?: AvailablePatchCountByClassification; - /** - * The UTC timestamp when the operation began. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startDateTime?: Date; - /** - * The UTC timestamp when the operation finished. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedDateTime?: Date; - /** - * Indicates if operation was triggered by user or by platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedBy?: PatchOperationStartedBy; - /** - * Specifies the patch service used for the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly patchServiceUsed?: PatchServiceUsed; - /** - * The operating system type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsTypeUM; - /** - * The errors that were encountered during execution of the operation. The details array contains the list of them. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorDetails?: ErrorDetail; -} - -/** Summarization of patches available for installation on the machine by classification. */ -export interface AvailablePatchCountByClassification { - /** - * Number of security patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly security?: number; - /** - * Number of critical patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly critical?: number; - /** - * Number of definition patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly definition?: number; - /** - * Number of update Rollup patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updateRollup?: number; - /** - * Number of feature pack patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly featurePack?: number; - /** - * Number of service pack patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly servicePack?: number; - /** - * Number of tools patches available for installation. + * The error target. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tools?: number; + readonly target?: string; /** - * Number of updates category patches available for installation. + * The error details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly updates?: number; + readonly details?: ErrorDetail[]; /** - * Number of other patches available for installation. + * The error additional info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly other?: number; -} - -/** Error details. */ -export interface ErrorDetail { - /** The error's code. */ - code: string; - /** A human readable error message. */ - message: string; - /** Indicates which property in the request is responsible for the error. */ - target?: string; - /** Additional error details. */ - details?: ErrorDetail[]; + readonly additionalInfo?: ErrorAdditionalInfo[]; } -/** Input for InstallPatches as directly received by the API */ -export interface VirtualMachineInstallPatchesParameters { - /** Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) */ - maximumDuration: string; - /** Defines when it is acceptable to reboot a VM during a software update operation. */ - rebootSetting: VMGuestPatchRebootSetting; - /** Input for InstallPatches on a Windows VM, as directly received by the API */ - windowsParameters?: WindowsParameters; - /** Input for InstallPatches on a Linux VM, as directly received by the API */ - linuxParameters?: LinuxParameters; -} - -/** Input for InstallPatches on a Windows VM, as directly received by the API */ -export interface WindowsParameters { - /** The update classifications to select when installing patches for Windows. */ - classificationsToInclude?: VMGuestPatchClassificationWindows[]; - /** Kbs to include in the patch operation */ - kbNumbersToInclude?: string[]; - /** Kbs to exclude in the patch operation */ - kbNumbersToExclude?: string[]; - /** Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. */ - excludeKbsRequiringReboot?: boolean; - /** This is used to install patches that were published on or before this given max published date. */ - maxPatchPublishDate?: Date; -} - -/** Input for InstallPatches on a Linux VM, as directly received by the API */ -export interface LinuxParameters { - /** The update classifications to select when installing patches for Linux. */ - classificationsToInclude?: VMGuestPatchClassificationLinux[]; - /** packages to include in the patch operation. Format: packageName_packageVersion */ - packageNameMasksToInclude?: string[]; - /** packages to exclude in the patch operation. Format: packageName_packageVersion */ - packageNameMasksToExclude?: string[]; -} - -/** The result summary of an installation operation. */ -export interface VirtualMachineInstallPatchesResult { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly installationActivityId?: string; - /** - * The reboot state of the VM following completion of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rebootStatus?: VMGuestPatchRebootStatus; - /** - * Whether the operation ran out of time before it completed all its intended actions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maintenanceWindowExceeded?: boolean; - /** - * The number of patches that were not installed due to the user blocking their installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly excludedPatchCount?: number; - /** - * The number of patches that were detected as available for install, but did not meet the operation's criteria. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly notSelectedPatchCount?: number; - /** - * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pendingPatchCount?: number; - /** - * The number of patches successfully installed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly installedPatchCount?: number; - /** - * The number of patches that could not be installed due to some issue. See errors for details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly failedPatchCount?: number; - /** - * The UTC timestamp when the operation began. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startDateTime?: Date; - /** - * The UTC timestamp when the operation finished. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedDateTime?: Date; - /** - * Indicates if operation was triggered by user or by platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedBy?: PatchOperationStartedBy; - /** - * Specifies the patch service used for the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly patchServiceUsed?: PatchServiceUsed; +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { /** - * The operating system type of the machine. + * The additional info type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osType?: OsTypeUM; + readonly type?: string; /** - * The errors that were encountered during execution of the operation. The details array contains the list of them. + * The additional info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: ErrorDetail; + readonly info?: Record; } /** Define the resourcePool. */ @@ -382,21 +179,51 @@ export interface ResourcePool { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly memLimitMB?: number; + /** + * Gets the used physical memory on the pool in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memOverallUsageGB?: number; + /** + * Gets the total amount of physical memory on the pool in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memCapacityGB?: number; + /** + * Gets the used CPU usage across all cores on the pool in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuOverallUsageMHz?: number; + /** + * Gets the max CPU usage across all cores on the pool in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuCapacityMHz?: number; /** * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly customResourceName?: string; + /** + * Gets the datastore ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly datastoreIds?: string[]; + /** + * Gets the network ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkIds?: string[]; /** * The resource status information. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** The resource status information. */ @@ -528,20 +355,40 @@ export interface Cluster { */ readonly customResourceName?: string; /** - * Gets or sets the datastore ARM ids. + * Gets the used physical memory on the cluster in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedMemoryGB?: number; + /** + * Gets the total amount of physical memory on the cluster in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalMemoryGB?: number; + /** + * Gets the used CPU usage across all cores on the cluster in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedCpuMHz?: number; + /** + * Gets the max CPU usage across all cores on the cluster in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCpuMHz?: number; + /** + * Gets the datastore ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly datastoreIds?: string[]; /** - * Gets or sets the network ARM ids. + * Gets the network ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly networkIds?: string[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** List of Clusters. */ @@ -609,10 +456,40 @@ export interface Host { */ readonly customResourceName?: string; /** - * Gets or sets the provisioning state. + * Gets the used physical memory on the host in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly overallMemoryUsageGB?: number; + /** + * Gets the total amount of physical memory on the host in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memorySizeGB?: number; + /** + * Gets the used CPU usage across all cores in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly overallCpuUsageMHz?: number; + /** + * Gets the max CPU usage across all cores in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuMhz?: number; + /** + * Gets the datastore ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly datastoreIds?: string[]; + /** + * Gets the network ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly networkIds?: string[]; + /** + * Gets the provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; } /** List of Hosts. */ @@ -679,6 +556,16 @@ export interface Datastore { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly customResourceName?: string; + /** + * Gets or sets Maximum capacity of this datastore in GBs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityGB?: number; + /** + * Gets or sets Available space of this datastore in GBs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly freeSpaceGB?: number; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -761,10 +648,10 @@ export interface VCenter { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** Username / Password Credentials to connect to vcenter. */ @@ -783,8 +670,8 @@ export interface VCentersList { value: VCenter[]; } -/** Define the virtualMachine. */ -export interface VirtualMachine { +/** Define the virtualMachineTemplate. */ +export interface VirtualMachineTemplate { /** Gets or sets the location. */ location: string; /** Gets or sets the extended location. */ @@ -813,186 +700,96 @@ export interface VirtualMachine { readonly type?: string; /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ kind?: string; - /** The identity of the resource. */ - identity?: Identity; /** - * Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will - * deploy. + * Gets or sets a unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resourcePoolId?: string; - /** Gets or sets the ARM Id of the template resource to deploy the virtual machine. */ - templateId?: string; - /** Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. */ + readonly uuid?: string; + /** Gets or sets the ARM Id of the vCenter resource in which this template resides. */ vCenterId?: string; - /** Placement properties. */ - placementProfile?: PlacementProfile; - /** OS properties. */ - osProfile?: OsProfile; - /** Hardware properties. */ - hardwareProfile?: HardwareProfile; - /** Network properties. */ - networkProfile?: NetworkProfile; - /** Storage properties. */ - storageProfile?: StorageProfile; - /** Guest agent status properties. */ - guestAgentProfile?: GuestAgentProfile; - /** Gets the security profile. */ - securityProfile?: SecurityProfile; - /** Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. */ + /** + * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine + * template. + */ moRefId?: string; - /** Gets or sets the inventory Item ID for the virtual machine. */ + /** Gets or sets the inventory Item ID for the virtual machine template. */ inventoryItemId?: string; /** - * Gets or sets the vCenter Managed Object name for the virtual machine. + * Gets or sets the vCenter Managed Object name for the virtual machine template. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly moName?: string; /** - * Gets or sets the folder path of the vm. + * Gets or sets memory size in MBs for the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly folderPath?: string; + readonly memorySizeMB?: number; /** - * Gets or sets the instance uuid of the vm. + * Gets or sets the number of vCPUs for the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceUuid?: string; - /** Gets or sets the SMBIOS UUID of the vm. */ - smbiosUuid?: string; - /** Firmware type */ - firmwareType?: FirmwareType; + readonly numCPUs?: number; /** - * Gets the power state of the virtual machine. + * Gets or sets the number of cores per socket for the template. + * Defaults to 1 if unspecified. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly powerState?: string; + readonly numCoresPerSocket?: number; /** - * Gets the name of the corresponding resource in Kubernetes. + * Gets or sets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customResourceName?: string; + readonly osType?: OsType; /** - * Gets or sets a unique identifier for this resource. + * Gets or sets os name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly uuid?: string; + readonly osName?: string; /** - * The resource status information. + * Gets or sets the folder path of the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly statuses?: ResourceStatus[]; + readonly folderPath?: string; /** - * Gets or sets the provisioning state. + * Gets or sets the network interfaces of the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly networkInterfaces?: NetworkInterface[]; /** - * Gets or sets a unique identifier for the vm resource. + * Gets or sets the disks the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmId?: string; -} - -/** Defines the resource properties. */ -export interface PlacementProfile { - /** Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. */ - resourcePoolId?: string; - /** Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy. */ - clusterId?: string; - /** Gets or sets the ARM Id of the host resource on which this virtual machine will deploy. */ - hostId?: string; - /** Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept. */ - datastoreId?: string; -} - -/** Defines the resource properties. */ -export interface OsProfile { - /** Gets or sets computer name. */ - computerName?: string; - /** Gets or sets administrator username. */ - adminUsername?: string; - /** Gets or sets administrator password. */ - adminPassword?: string; - /** Gets or sets the guestId. */ - guestId?: string; + readonly disks?: VirtualDisk[]; /** - * Gets or sets a value indicating whether the VM is ready for extension operations. + * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly allowExtensionOperations?: boolean; - /** Gets or sets the type of the os. */ - osType?: OsType; + readonly customResourceName?: string; /** - * Gets or sets os name. + * Gets or sets the current version status of VMware Tools installed in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; - /** - * Gets or sets the current running status of VMware Tools running in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsRunningStatus?: string; - /** - * Gets or sets the current version status of VMware Tools installed in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersionStatus?: string; + readonly toolsVersionStatus?: string; /** * Gets or sets the current version of VMware Tools. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly toolsVersion?: string; - /** Specifies the windows configuration for update management. */ - windowsConfiguration?: OsProfileWindowsConfiguration; - /** Specifies the linux configuration for update management. */ - linuxConfiguration?: OsProfileLinuxConfiguration; -} - -/** Specifies the windows configuration for update management. */ -export interface OsProfileWindowsConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Specifies the linux configuration for update management. */ -export interface OsProfileLinuxConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Defines the resource properties. */ -export interface HardwareProfile { - /** Gets or sets memory size in MBs for the vm. */ - memorySizeMB?: number; - /** Gets or sets the number of vCPUs for the vm. */ - numCPUs?: number; - /** Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified. */ - numCoresPerSocket?: number; /** - * Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running. + * Firmware type * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cpuHotAddEnabled?: boolean; + readonly firmwareType?: FirmwareType; /** - * Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running. + * The resource status information. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cpuHotRemoveEnabled?: boolean; + readonly statuses?: ResourceStatus[]; /** - * Gets or sets a value indicating whether memory can be added while this virtual machine is running. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryHotAddEnabled?: boolean; -} - -/** Defines the resource properties. */ -export interface NetworkProfile { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterface[]; + readonly provisioningState?: ProvisioningState; } /** Network Interface model */ @@ -1085,17 +882,6 @@ export interface NicIPAddressSettings { readonly subnetMask?: string; } -/** Defines the resource properties. */ -export interface StorageProfile { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDisk[]; - /** - * Gets or sets the list of virtual SCSI controllers associated with the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scsiControllers?: VirtualScsiController[]; -} - /** Virtual disk model */ export interface VirtualDisk { /** Gets or sets the name of the virtual disk. */ @@ -1126,299 +912,6 @@ export interface VirtualDisk { diskType?: DiskType; } -/** This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller. */ -export interface VirtualScsiController { - /** Gets or sets the controller type. */ - type?: ScsiControllerType; - /** Gets or sets the key of the controller. */ - controllerKey?: number; - /** Gets or sets the bus number of the controller. */ - busNumber?: number; - /** Gets or sets the SCSI controller unit number. */ - scsiCtlrUnitNumber?: number; - /** Gets or sets the sharing mode. */ - sharing?: VirtualScsiSharing; -} - -/** Defines the resource properties. */ -export interface GuestAgentProfile { - /** - * Specifies the VM's unique SMBIOS ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmUuid?: string; - /** - * The status of the hybrid machine agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: StatusTypes; - /** - * The time of the last status change. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastStatusChange?: Date; - /** - * The hybrid machine agent full version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly agentVersion?: string; - /** - * Details about the error state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorDetails?: ErrorDetail[]; -} - -/** Specifies the Security profile settings for the virtual machine. */ -export interface SecurityProfile { - /** Specifies the security settings like secure boot used while creating the virtual machine. */ - uefiSettings?: UefiSettings; -} - -/** Specifies the security settings like secure boot used while creating the virtual machine. */ -export interface UefiSettings { - /** Specifies whether secure boot should be enabled on the virtual machine. */ - secureBootEnabled?: boolean; -} - -/** Managed service identity. */ -export interface Identity { - /** - * The principal id of managed service identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant of managed service identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of managed service identity. */ - type: IdentityType; -} - -/** Defines the virtualMachineUpdate. */ -export interface VirtualMachineUpdate { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The identity of the resource. */ - identity?: Identity; - /** Defines the resource properties. */ - hardwareProfile?: HardwareProfile; - /** OS properties. */ - osProfile?: OsProfileUpdate; - /** Defines the resource update properties. */ - storageProfile?: StorageProfileUpdate; - /** Defines the update resource properties. */ - networkProfile?: NetworkProfileUpdate; -} - -/** Defines the os update properties. */ -export interface OsProfileUpdate { - /** Specifies the windows configuration for update management. */ - windowsConfiguration?: OsProfileUpdateWindowsConfiguration; - /** Specifies the linux configuration for update management. */ - linuxConfiguration?: OsProfileUpdateLinuxConfiguration; -} - -/** Specifies the windows configuration for update management. */ -export interface OsProfileUpdateWindowsConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Specifies the linux configuration for update management. */ -export interface OsProfileUpdateLinuxConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Defines the resource update properties. */ -export interface StorageProfileUpdate { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDiskUpdate[]; -} - -/** Defines the virtual disk update. */ -export interface VirtualDiskUpdate { - /** Gets or sets the name of the virtual disk. */ - name?: string; - /** Gets or sets the disk total size. */ - diskSizeGB?: number; - /** Gets or sets the device key value. */ - deviceKey?: number; - /** Gets or sets the disk mode. */ - diskMode?: DiskMode; - /** Gets or sets the controller id. */ - controllerKey?: number; - /** Gets or sets the unit number of the disk on the controller. */ - unitNumber?: number; - /** Gets or sets the device name. */ - deviceName?: string; - /** Gets or sets the disk backing type. */ - diskType?: DiskType; -} - -/** Defines the update resource properties. */ -export interface NetworkProfileUpdate { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterfaceUpdate[]; -} - -/** Defines the network interface update. */ -export interface NetworkInterfaceUpdate { - /** Gets or sets the name of the network interface. */ - name?: string; - /** Gets or sets the ARM Id of the network resource to connect the virtual machine. */ - networkId?: string; - /** NIC type */ - nicType?: NICType; - /** Gets or sets the power on boot. */ - powerOnBoot?: PowerOnBootOption; - /** Gets or sets the device key value. */ - deviceKey?: number; -} - -/** Defines the stop action properties. */ -export interface StopVirtualMachineOptions { - /** Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Defaults to false. */ - skipShutdown?: boolean; -} - -/** List of VirtualMachines. */ -export interface VirtualMachinesList { - /** Url to follow for getting next page of VirtualMachines. */ - nextLink?: string; - /** Array of VirtualMachines */ - value: VirtualMachine[]; -} - -/** Define the virtualMachineTemplate. */ -export interface VirtualMachineTemplate { - /** Gets or sets the location. */ - location: string; - /** Gets or sets the extended location. */ - extendedLocation?: ExtendedLocation; - /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Gets or sets the Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Gets or sets the type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ - kind?: string; - /** - * Gets or sets a unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** Gets or sets the ARM Id of the vCenter resource in which this template resides. */ - vCenterId?: string; - /** - * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine - * template. - */ - moRefId?: string; - /** Gets or sets the inventory Item ID for the virtual machine template. */ - inventoryItemId?: string; - /** - * Gets or sets the vCenter Managed Object name for the virtual machine template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly moName?: string; - /** - * Gets or sets memory size in MBs for the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memorySizeMB?: number; - /** - * Gets or sets the number of vCPUs for the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numCPUs?: number; - /** - * Gets or sets the number of cores per socket for the template. - * Defaults to 1 if unspecified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numCoresPerSocket?: number; - /** - * Gets or sets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets or sets os name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; - /** - * Gets or sets the folder path of the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly folderPath?: string; - /** - * Gets or sets the network interfaces of the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * Gets or sets the disks the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: VirtualDisk[]; - /** - * Gets the name of the corresponding resource in Kubernetes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customResourceName?: string; - /** - * Gets or sets the current version status of VMware Tools installed in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersionStatus?: string; - /** - * Gets or sets the current version of VMware Tools. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersion?: string; - /** - * Firmware type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firmwareType?: FirmwareType; - /** - * The resource status information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statuses?: ResourceStatus[]; - /** - * Gets or sets the provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - /** List of VirtualMachineTemplates. */ export interface VirtualMachineTemplatesList { /** Url to follow for getting next page of VirtualMachineTemplates. */ @@ -1484,10 +977,10 @@ export interface VirtualNetwork { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** List of VirtualNetworks. */ @@ -1498,7 +991,7 @@ export interface VirtualNetworksList { value: VirtualNetwork[]; } -/** Defines the resource properties. */ +/** Describes the properties of an Inventory Item. */ export interface InventoryItemProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ inventoryType: @@ -1516,16 +1009,16 @@ export interface InventoryItemProperties { /** Gets or sets the vCenter Managed Object name for the inventory item. */ moName?: string; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -1539,6 +1032,11 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; } /** List of InventoryItems. */ @@ -1549,121 +1047,235 @@ export interface InventoryItemsList { value: InventoryItem[]; } -/** List of HybridIdentityMetadata. */ -export interface HybridIdentityMetadataList { - /** Url to follow for getting next page of HybridIdentityMetadata. */ - nextLink?: string; - /** Array of HybridIdentityMetadata */ - value: HybridIdentityMetadata[]; +/** Specifies the compute and storage placement settings for the virtual machine. */ +export interface PlacementProfile { + /** Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. */ + resourcePoolId?: string; + /** Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy. */ + clusterId?: string; + /** Gets or sets the ARM Id of the host resource on which this virtual machine will deploy. */ + hostId?: string; + /** Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept. */ + datastoreId?: string; } -/** Describes a Machine Extension. */ -export interface MachineExtension { - /** Gets or sets the location. */ - location?: string; +/** Specifies the operating system settings for the virtual machine. */ +export interface OsProfileForVMInstance { + /** Gets or sets computer name. */ + computerName?: string; + /** Gets or sets administrator username. */ + adminUsername?: string; + /** Sets administrator password. */ + adminPassword?: string; + /** Gets or sets the guestId. */ + guestId?: string; + /** Gets or sets the type of the os. */ + osType?: OsType; /** - * The system data. + * Gets or sets os sku. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; + readonly osSku?: string; /** - * Gets or sets the name. + * Gets or sets the current running status of VMware Tools running in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly toolsRunningStatus?: string; /** - * Gets or sets the Id. + * Gets or sets the current version status of VMware Tools installed in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly toolsVersionStatus?: string; /** - * Gets or sets the type of the resource. + * Gets or sets the current version of VMware Tools. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - typePropertiesType?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ - enableAutomaticUpgrade?: boolean; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; + readonly toolsVersion?: string; +} + +/** Specifies the hardware settings for the virtual machine. */ +export interface HardwareProfile { + /** Gets or sets memory size in MBs for the vm. */ + memorySizeMB?: number; + /** Gets or sets the number of vCPUs for the vm. */ + numCPUs?: number; + /** Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified. */ + numCoresPerSocket?: number; /** - * The provisioning state, which only appears in the response. + * Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionPropertiesInstanceView; -} - -/** Describes the Machine Extension Instance View. */ -export interface MachineExtensionInstanceView { + readonly cpuHotAddEnabled?: boolean; /** - * The machine extension name. + * Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly cpuHotRemoveEnabled?: boolean; /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * Gets or sets a value indicating whether memory can be added while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly memoryHotAddEnabled?: boolean; +} + +/** Specifies the network interfaces of the virtual machine. */ +export interface NetworkProfile { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterface[]; +} + +/** Specifies the storage settings for the virtual machine disks. */ +export interface StorageProfile { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDisk[]; /** - * Specifies the version of the script handler. + * Gets or sets the list of virtual SCSI controllers associated with the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly typeHandlerVersion?: string; - /** Instance view status. */ - status?: MachineExtensionInstanceViewStatus; + readonly scsiControllers?: VirtualScsiController[]; } -/** Instance view status. */ -export interface MachineExtensionInstanceViewStatus { +/** This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller. */ +export interface VirtualScsiController { + /** Gets or sets the controller type. */ + type?: ScsiControllerType; + /** Gets or sets the key of the controller. */ + controllerKey?: number; + /** Gets or sets the bus number of the controller. */ + busNumber?: number; + /** Gets or sets the SCSI controller unit number. */ + scsiCtlrUnitNumber?: number; + /** Gets or sets the sharing mode. */ + sharing?: VirtualScsiSharing; +} + +/** Specifies the Security profile settings for the virtual machine. */ +export interface SecurityProfile { + /** Specifies the security settings like secure boot used while creating the virtual machine. */ + uefiSettings?: UefiSettings; +} + +/** Specifies the security settings like secure boot used while creating the virtual machine. */ +export interface UefiSettings { + /** Specifies whether secure boot should be enabled on the virtual machine. */ + secureBootEnabled?: boolean; +} + +/** Specifies the vCenter infrastructure specific settings for the virtual machine. */ +export interface InfrastructureProfile { + /** Gets or sets the ARM Id of the template resource to deploy the virtual machine. */ + templateId?: string; + /** Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. */ + vCenterId?: string; /** - * The status code. + * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly moRefId?: string; + /** Gets or sets the inventory Item ID for the virtual machine. */ + inventoryItemId?: string; /** - * The level code. + * Gets or sets the vCenter Managed Object name for the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly level?: StatusLevelTypes; + readonly moName?: string; /** - * The short localizable label for the status. + * Gets or sets the folder path of the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayStatus?: string; + readonly folderPath?: string; /** - * The detailed status message, including for alerts and error messages. + * Gets or sets the instance uuid of the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly instanceUuid?: string; + /** Gets or sets the SMBIOS UUID of the vm. */ + smbiosUuid?: string; + /** Firmware type */ + firmwareType?: FirmwareType; /** - * The time of the status. + * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly time?: Date; + readonly customResourceName?: string; +} + +/** Defines the virtualMachineInstanceUpdate. */ +export interface VirtualMachineInstanceUpdate { + /** Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: StorageProfileUpdate; + /** Specifies the network interfaces of the virtual machine. */ + networkProfile?: NetworkProfileUpdate; +} + +/** Specifies the storage settings for the virtual machine disks. */ +export interface StorageProfileUpdate { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDiskUpdate[]; +} + +/** Defines the virtual disk update. */ +export interface VirtualDiskUpdate { + /** Gets or sets the name of the virtual disk. */ + name?: string; + /** Gets or sets the disk total size. */ + diskSizeGB?: number; + /** Gets or sets the device key value. */ + deviceKey?: number; + /** Gets or sets the disk mode. */ + diskMode?: DiskMode; + /** Gets or sets the controller id. */ + controllerKey?: number; + /** Gets or sets the unit number of the disk on the controller. */ + unitNumber?: number; + /** Gets or sets the device name. */ + deviceName?: string; + /** Gets or sets the disk backing type. */ + diskType?: DiskType; +} + +/** Specifies the network interfaces of the virtual machine. */ +export interface NetworkProfileUpdate { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterfaceUpdate[]; +} + +/** Defines the network interface update. */ +export interface NetworkInterfaceUpdate { + /** Gets or sets the name of the network interface. */ + name?: string; + /** Gets or sets the ARM Id of the network resource to connect the virtual machine. */ + networkId?: string; + /** NIC type */ + nicType?: NICType; + /** Gets or sets the power on boot. */ + powerOnBoot?: PowerOnBootOption; + /** Gets or sets the device key value. */ + deviceKey?: number; +} + +/** List of VirtualMachineInstances. */ +export interface VirtualMachineInstancesList { + /** Url to follow for getting next page of VirtualMachines. */ + nextLink?: string; + /** Array of VirtualMachines */ + value: VirtualMachineInstance[]; +} + +/** Defines the stop action properties. */ +export interface StopVirtualMachineOptions { + /** Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Defaults to false. */ + skipShutdown?: boolean; } -/** Describes the Machine Extensions List Result. */ -export interface MachineExtensionsListResult { - /** The list of extensions */ - value?: MachineExtension[]; - /** The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ +/** List of HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadataList { + /** Url to follow for getting next page of HybridIdentityMetadata. */ nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: VmInstanceHybridIdentityMetadata[]; } /** Username / Password Credentials to connect to guest. */ @@ -1712,32 +1324,14 @@ export interface Condition { readonly severity?: string; } -/** Defines the resource properties. */ +/** Describes the properties of an Inventory Item reference. */ export interface InventoryItemDetails { /** Gets or sets the inventory Item ID for the resource. */ inventoryItemId?: string; /** Gets or sets the vCenter Managed Object name for the resource. */ moName?: string; -} - -/** Describes a Machine Extension Update. */ -export interface MachineExtensionUpdate extends ResourcePatch { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ - enableAutomaticUpgrade?: boolean; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; + /** The inventory type. */ + inventoryType?: InventoryType; } /** The resource pool inventory item. */ @@ -1764,6 +1358,8 @@ export interface VirtualMachineInventoryItem extends InventoryItemProperties { host?: InventoryItemDetails; /** ResourcePool inventory resource details. */ resourcePool?: InventoryItemDetails; + /** Cluster inventory resource details. */ + cluster?: InventoryItemDetails; /** Gets or sets the instance uuid of the vm. */ instanceUuid?: string; /** Gets or sets the SMBIOS UUID of the vm. */ @@ -1808,6 +1404,16 @@ export interface VirtualMachineTemplateInventoryItem osType?: OsType; /** Gets or sets os name. */ osName?: string; + /** + * Gets or sets the current version status of VMware Tools installed in the guest operating system. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly toolsVersionStatus?: string; + /** + * Gets or sets the current version of VMware Tools. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly toolsVersion?: string; /** Gets or sets the folder path of the template. */ folderPath?: string; } @@ -1845,17 +1451,8 @@ export interface HostInventoryItem extends InventoryItemProperties { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} -/** The machine extension instance view. */ -export interface MachineExtensionPropertiesInstanceView - extends MachineExtensionInstanceView {} - /** Defines the inventory item. */ export interface InventoryItem extends ProxyResource { - /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ kind?: string; /** They inventory type. */ @@ -1867,42 +1464,67 @@ export interface InventoryItem extends ProxyResource { /** Gets or sets the vCenter Managed Object name for the inventory item. */ moName?: string; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Defines the HybridIdentityMetadata. */ -export interface HybridIdentityMetadata extends ProxyResource { +/** Define the virtualMachineInstance. */ +export interface VirtualMachineInstance extends ProxyResource { + /** Gets or sets the extended location. */ + extendedLocation?: ExtendedLocation; + /** Placement properties. */ + placementProfile?: PlacementProfile; + /** OS properties. */ + osProfile?: OsProfileForVMInstance; + /** Hardware properties. */ + hardwareProfile?: HardwareProfile; + /** Network properties. */ + networkProfile?: NetworkProfile; + /** Storage properties. */ + storageProfile?: StorageProfile; + /** Gets the security profile. */ + securityProfile?: SecurityProfile; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfile; /** - * The system data. + * Gets the power state of the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Gets or sets the Vm Id. */ - vmId?: string; - /** Gets or sets the Public Key. */ - publicKey?: string; + readonly powerState?: string; + /** + * The resource status information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statuses?: ResourceStatus[]; /** - * The identity of the resource. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly identity?: Identity; + readonly provisioningState?: ProvisioningState; /** - * Gets or sets the provisioning state. + * Gets or sets a unique identifier for the vm resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly resourceUid?: string; } -/** Defines the GuestAgent. */ -export interface GuestAgent extends ProxyResource { +/** Defines the HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** Gets or sets the Public Key. */ + publicKey?: string; /** - * The system data. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; +} + +/** Defines the GuestAgent. */ +export interface GuestAgent extends ProxyResource { /** * Gets or sets a unique identifier for this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1910,6 +1532,8 @@ export interface GuestAgent extends ProxyResource { readonly uuid?: string; /** Username / Password Credentials to provision guest agent. */ credentials?: GuestCredential; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; /** HTTP Proxy configuration for the VM. */ httpProxyConfig?: HttpProxyConfiguration; /** Gets or sets the guest agent provisioning action. */ @@ -1930,236 +1554,76 @@ export interface GuestAgent extends ProxyResource { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Known values of {@link PatchOperationStatus} that the service accepts. */ -export enum KnownPatchOperationStatus { - /** Unknown */ - Unknown = "Unknown", - /** InProgress */ - InProgress = "InProgress", - /** Failed */ - Failed = "Failed", - /** Succeeded */ - Succeeded = "Succeeded", - /** CompletedWithWarnings */ - CompletedWithWarnings = "CompletedWithWarnings" +/** Defines headers for ResourcePools_delete operation. */ +export interface ResourcePoolsDeleteHeaders { + location?: string; } -/** - * Defines values for PatchOperationStatus. \ - * {@link KnownPatchOperationStatus} can be used interchangeably with PatchOperationStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **InProgress** \ - * **Failed** \ - * **Succeeded** \ - * **CompletedWithWarnings** - */ -export type PatchOperationStatus = string; - -/** Known values of {@link PatchOperationStartedBy} that the service accepts. */ -export enum KnownPatchOperationStartedBy { - /** User */ - User = "User", - /** Platform */ - Platform = "Platform" +/** Defines headers for Clusters_delete operation. */ +export interface ClustersDeleteHeaders { + location?: string; } -/** - * Defines values for PatchOperationStartedBy. \ - * {@link KnownPatchOperationStartedBy} can be used interchangeably with PatchOperationStartedBy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Platform** - */ -export type PatchOperationStartedBy = string; - -/** Known values of {@link PatchServiceUsed} that the service accepts. */ -export enum KnownPatchServiceUsed { - /** Unknown */ - Unknown = "Unknown", - /** WU */ - WU = "WU", - /** WUWsus */ - WUWsus = "WU_WSUS", - /** YUM */ - YUM = "YUM", - /** APT */ - APT = "APT", - /** Zypper */ - Zypper = "Zypper" +/** Defines headers for Hosts_delete operation. */ +export interface HostsDeleteHeaders { + location?: string; } -/** - * Defines values for PatchServiceUsed. \ - * {@link KnownPatchServiceUsed} can be used interchangeably with PatchServiceUsed, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **WU** \ - * **WU_WSUS** \ - * **YUM** \ - * **APT** \ - * **Zypper** - */ -export type PatchServiceUsed = string; - -/** Known values of {@link OsTypeUM} that the service accepts. */ -export enum KnownOsTypeUM { - /** Windows */ - Windows = "Windows", - /** Linux */ - Linux = "Linux" +/** Defines headers for Datastores_delete operation. */ +export interface DatastoresDeleteHeaders { + location?: string; } -/** - * Defines values for OsTypeUM. \ - * {@link KnownOsTypeUM} can be used interchangeably with OsTypeUM, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows** \ - * **Linux** - */ -export type OsTypeUM = string; +/** Defines headers for VCenters_delete operation. */ +export interface VCentersDeleteHeaders { + location?: string; +} -/** Known values of {@link VMGuestPatchRebootSetting} that the service accepts. */ -export enum KnownVMGuestPatchRebootSetting { - /** IfRequired */ - IfRequired = "IfRequired", - /** Never */ - Never = "Never", - /** Always */ - Always = "Always" +/** Defines headers for VirtualMachineTemplates_delete operation. */ +export interface VirtualMachineTemplatesDeleteHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchRebootSetting. \ - * {@link KnownVMGuestPatchRebootSetting} can be used interchangeably with VMGuestPatchRebootSetting, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IfRequired** \ - * **Never** \ - * **Always** - */ -export type VMGuestPatchRebootSetting = string; - -/** Known values of {@link VMGuestPatchClassificationWindows} that the service accepts. */ -export enum KnownVMGuestPatchClassificationWindows { - /** Critical */ - Critical = "Critical", - /** Security */ - Security = "Security", - /** UpdateRollUp */ - UpdateRollUp = "UpdateRollUp", - /** FeaturePack */ - FeaturePack = "FeaturePack", - /** ServicePack */ - ServicePack = "ServicePack", - /** Definition */ - Definition = "Definition", - /** Tools */ - Tools = "Tools", - /** Updates */ - Updates = "Updates" +/** Defines headers for VirtualNetworks_delete operation. */ +export interface VirtualNetworksDeleteHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchClassificationWindows. \ - * {@link KnownVMGuestPatchClassificationWindows} can be used interchangeably with VMGuestPatchClassificationWindows, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Critical** \ - * **Security** \ - * **UpdateRollUp** \ - * **FeaturePack** \ - * **ServicePack** \ - * **Definition** \ - * **Tools** \ - * **Updates** - */ -export type VMGuestPatchClassificationWindows = string; - -/** Known values of {@link VMGuestPatchClassificationLinux} that the service accepts. */ -export enum KnownVMGuestPatchClassificationLinux { - /** Critical */ - Critical = "Critical", - /** Security */ - Security = "Security", - /** Other */ - Other = "Other" +/** Defines headers for VirtualMachineInstances_update operation. */ +export interface VirtualMachineInstancesUpdateHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchClassificationLinux. \ - * {@link KnownVMGuestPatchClassificationLinux} can be used interchangeably with VMGuestPatchClassificationLinux, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Critical** \ - * **Security** \ - * **Other** - */ -export type VMGuestPatchClassificationLinux = string; +/** Defines headers for VirtualMachineInstances_delete operation. */ +export interface VirtualMachineInstancesDeleteHeaders { + location?: string; +} -/** Known values of {@link VMGuestPatchRebootStatus} that the service accepts. */ -export enum KnownVMGuestPatchRebootStatus { - /** Unknown */ - Unknown = "Unknown", - /** NotNeeded */ - NotNeeded = "NotNeeded", - /** Required */ - Required = "Required", - /** Started */ - Started = "Started", - /** Failed */ - Failed = "Failed", - /** Completed */ - Completed = "Completed" +/** Defines headers for VirtualMachineInstances_stop operation. */ +export interface VirtualMachineInstancesStopHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchRebootStatus. \ - * {@link KnownVMGuestPatchRebootStatus} can be used interchangeably with VMGuestPatchRebootStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotNeeded** \ - * **Required** \ - * **Started** \ - * **Failed** \ - * **Completed** - */ -export type VMGuestPatchRebootStatus = string; +/** Defines headers for VirtualMachineInstances_start operation. */ +export interface VirtualMachineInstancesStartHeaders { + location?: string; +} -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Defines headers for VirtualMachineInstances_restart operation. */ +export interface VirtualMachineInstancesRestartHeaders { + location?: string; } -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; +/** Defines headers for VMInstanceGuestAgents_delete operation. */ +export interface VMInstanceGuestAgentsDeleteHeaders { + location?: string; +} /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { @@ -2186,16 +1650,40 @@ export enum KnownProvisioningState { * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Updating** \ - * **Deleting** \ - * **Accepted** \ - * **Created** + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Provisioning** \ + * **Updating** \ + * **Deleting** \ + * **Accepted** \ + * **Created** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export type ProvisioningState = string; +export type CreatedByType = string; /** Known values of {@link OsType} that the service accepts. */ export enum KnownOsType { @@ -2350,72 +1838,6 @@ export enum KnownDiskType { */ export type DiskType = string; -/** Known values of {@link ScsiControllerType} that the service accepts. */ -export enum KnownScsiControllerType { - /** Lsilogic */ - Lsilogic = "lsilogic", - /** Buslogic */ - Buslogic = "buslogic", - /** Pvscsi */ - Pvscsi = "pvscsi", - /** Lsilogicsas */ - Lsilogicsas = "lsilogicsas" -} - -/** - * Defines values for ScsiControllerType. \ - * {@link KnownScsiControllerType} can be used interchangeably with ScsiControllerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **lsilogic** \ - * **buslogic** \ - * **pvscsi** \ - * **lsilogicsas** - */ -export type ScsiControllerType = string; - -/** Known values of {@link VirtualScsiSharing} that the service accepts. */ -export enum KnownVirtualScsiSharing { - /** NoSharing */ - NoSharing = "noSharing", - /** PhysicalSharing */ - PhysicalSharing = "physicalSharing", - /** VirtualSharing */ - VirtualSharing = "virtualSharing" -} - -/** - * Defines values for VirtualScsiSharing. \ - * {@link KnownVirtualScsiSharing} can be used interchangeably with VirtualScsiSharing, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **noSharing** \ - * **physicalSharing** \ - * **virtualSharing** - */ -export type VirtualScsiSharing = string; - -/** Known values of {@link StatusTypes} that the service accepts. */ -export enum KnownStatusTypes { - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Error */ - Error = "Error" -} - -/** - * Defines values for StatusTypes. \ - * {@link KnownStatusTypes} can be used interchangeably with StatusTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Disconnected** \ - * **Error** - */ -export type StatusTypes = string; - /** Known values of {@link FirmwareType} that the service accepts. */ export enum KnownFirmwareType { /** Bios */ @@ -2434,24 +1856,6 @@ export enum KnownFirmwareType { */ export type FirmwareType = string; -/** Known values of {@link IdentityType} that the service accepts. */ -export enum KnownIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned" -} - -/** - * Defines values for IdentityType. \ - * {@link KnownIdentityType} can be used interchangeably with IdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** - */ -export type IdentityType = string; - /** Known values of {@link InventoryType} that the service accepts. */ export enum KnownInventoryType { /** ResourcePool */ @@ -2485,26 +1889,50 @@ export enum KnownInventoryType { */ export type InventoryType = string; -/** Known values of {@link StatusLevelTypes} that the service accepts. */ -export enum KnownStatusLevelTypes { - /** Info */ - Info = "Info", - /** Warning */ - Warning = "Warning", - /** Error */ - Error = "Error" +/** Known values of {@link ScsiControllerType} that the service accepts. */ +export enum KnownScsiControllerType { + /** Lsilogic */ + Lsilogic = "lsilogic", + /** Buslogic */ + Buslogic = "buslogic", + /** Pvscsi */ + Pvscsi = "pvscsi", + /** Lsilogicsas */ + Lsilogicsas = "lsilogicsas" +} + +/** + * Defines values for ScsiControllerType. \ + * {@link KnownScsiControllerType} can be used interchangeably with ScsiControllerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **lsilogic** \ + * **buslogic** \ + * **pvscsi** \ + * **lsilogicsas** + */ +export type ScsiControllerType = string; + +/** Known values of {@link VirtualScsiSharing} that the service accepts. */ +export enum KnownVirtualScsiSharing { + /** NoSharing */ + NoSharing = "noSharing", + /** PhysicalSharing */ + PhysicalSharing = "physicalSharing", + /** VirtualSharing */ + VirtualSharing = "virtualSharing" } /** - * Defines values for StatusLevelTypes. \ - * {@link KnownStatusLevelTypes} can be used interchangeably with StatusLevelTypes, + * Defines values for VirtualScsiSharing. \ + * {@link KnownVirtualScsiSharing} can be used interchangeably with VirtualScsiSharing, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Info** \ - * **Warning** \ - * **Error** + * **noSharing** \ + * **physicalSharing** \ + * **virtualSharing** */ -export type StatusLevelTypes = string; +export type VirtualScsiSharing = string; /** Known values of {@link ProvisioningAction} that the service accepts. */ export enum KnownProvisioningAction { @@ -2541,135 +1969,6 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationsList; -/** Optional parameters. */ -export interface VirtualMachinesAssessPatchesOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the assessPatches operation. */ -export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; - -/** Optional parameters. */ -export interface VirtualMachinesInstallPatchesOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the installPatches operation. */ -export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; - -/** Optional parameters. */ -export interface VirtualMachinesCreateOptionalParams - extends coreClient.OperationOptions { - /** Request payload. */ - body?: VirtualMachine; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type VirtualMachinesCreateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachinesGetResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Resource properties to update. */ - body?: VirtualMachineUpdate; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type VirtualMachinesUpdateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Whether force delete was specified. */ - force?: boolean; - /** Whether to just disable the VM from azure and retain the VM in the VMM. */ - retain?: boolean; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface VirtualMachinesStopOptionalParams - extends coreClient.OperationOptions { - /** Virtualmachine stop action payload. */ - body?: StopVirtualMachineOptions; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface VirtualMachinesStartOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface VirtualMachinesRestartOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface VirtualMachinesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualMachinesListResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachinesListByResourceGroupResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualMachinesListNextResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachinesList; - /** Optional parameters. */ export interface ResourcePoolsCreateOptionalParams extends coreClient.OperationOptions { @@ -3191,54 +2490,79 @@ export interface InventoryItemsListByVCenterNextOptionalParams export type InventoryItemsListByVCenterNextResponse = InventoryItemsList; /** Optional parameters. */ -export interface HybridIdentityMetadataCreateOptionalParams +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Request payload. */ - body?: HybridIdentityMetadata; + body?: VirtualMachineInstance; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the create operation. */ -export type HybridIdentityMetadataCreateResponse = HybridIdentityMetadata; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataGetOptionalParams +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Resource properties to update. */ + body?: VirtualMachineInstanceUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataListByVmOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Whether force delete was specified. */ + force?: boolean; + /** Whether to delete the VM from the vCenter. */ + deleteFromHost?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByVm operation. */ -export type HybridIdentityMetadataListByVmResponse = HybridIdentityMetadataList; +/** Contains response data for the delete operation. */ +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; /** Optional parameters. */ -export interface HybridIdentityMetadataListByVmNextOptionalParams +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVmNext operation. */ -export type HybridIdentityMetadataListByVmNextResponse = HybridIdentityMetadataList; +/** Contains response data for the list operation. */ +export type VirtualMachineInstancesListResponse = VirtualMachineInstancesList; /** Optional parameters. */ -export interface MachineExtensionsCreateOrUpdateOptionalParams +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + /** Virtualmachine stop action payload. */ + body?: StopVirtualMachineOptions; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; +/** Contains response data for the stop operation. */ +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; /** Optional parameters. */ -export interface MachineExtensionsUpdateOptionalParams +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3246,11 +2570,11 @@ export interface MachineExtensionsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type MachineExtensionsUpdateResponse = MachineExtension; +/** Contains response data for the start operation. */ +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; /** Optional parameters. */ -export interface MachineExtensionsDeleteOptionalParams +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3258,32 +2582,39 @@ export interface MachineExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the restart operation. */ +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; + +/** Optional parameters. */ +export interface VirtualMachineInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstancesList; + /** Optional parameters. */ -export interface MachineExtensionsGetOptionalParams +export interface VmInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type MachineExtensionsGetResponse = MachineExtension; +export type VmInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; /** Optional parameters. */ -export interface MachineExtensionsListOptionalParams - extends coreClient.OperationOptions { - /** The expand expression to apply on the operation. */ - expand?: string; -} +export interface VmInstanceHybridIdentityMetadataListOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type MachineExtensionsListResponse = MachineExtensionsListResult; +export type VmInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface MachineExtensionsListNextOptionalParams +export interface VmInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type MachineExtensionsListNextResponse = MachineExtensionsListResult; +export type VmInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface GuestAgentsCreateOptionalParams +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { /** Request payload. */ body?: GuestAgent; @@ -3294,17 +2625,17 @@ export interface GuestAgentsCreateOptionalParams } /** Contains response data for the create operation. */ -export type GuestAgentsCreateResponse = GuestAgent; +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; /** Optional parameters. */ -export interface GuestAgentsGetOptionalParams +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type GuestAgentsGetResponse = GuestAgent; +export type VMInstanceGuestAgentsGetResponse = GuestAgent; /** Optional parameters. */ -export interface GuestAgentsDeleteOptionalParams +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3312,19 +2643,22 @@ export interface GuestAgentsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the delete operation. */ +export type VMInstanceGuestAgentsDeleteResponse = VMInstanceGuestAgentsDeleteHeaders; + /** Optional parameters. */ -export interface GuestAgentsListByVmOptionalParams +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVm operation. */ -export type GuestAgentsListByVmResponse = GuestAgentList; +/** Contains response data for the list operation. */ +export type VMInstanceGuestAgentsListResponse = GuestAgentList; /** Optional parameters. */ -export interface GuestAgentsListByVmNextOptionalParams +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVmNext operation. */ -export type GuestAgentsListByVmNextResponse = GuestAgentList; +/** Contains response data for the listNext operation. */ +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; /** Optional parameters. */ export interface AzureArcVMwareManagementServiceAPIOptionalParams diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts index 8d5331ccb4d3..f97a72eaccac 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts @@ -106,17 +106,17 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" } } } } }; -export const ErrorDefinition: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDefinition", + className: "ErrorDetail", modelProperties: { code: { serializedName: "code", @@ -132,6 +132,13 @@ export const ErrorDefinition: coreClient.CompositeMapper = { name: "String" } }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, details: { serializedName: "details", readOnly: true, @@ -140,7 +147,20 @@ export const ErrorDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -149,242 +169,202 @@ export const ErrorDefinition: coreClient.CompositeMapper = { } }; -export const VirtualMachineAssessPatchesResult: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineAssessPatchesResult", + className: "ErrorAdditionalInfo", modelProperties: { - status: { - serializedName: "status", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - assessmentActivityId: { - serializedName: "assessmentActivityId", + info: { + serializedName: "info", readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ResourcePool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePool", + modelProperties: { + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - rebootPending: { - serializedName: "rebootPending", - readOnly: true, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Boolean" + name: "Composite", + className: "ExtendedLocation" } }, - availablePatchCountByClassification: { - serializedName: "availablePatchCountByClassification", + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "AvailablePatchCountByClassification" + className: "SystemData" } }, - startDateTime: { - serializedName: "startDateTime", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } }, - lastModifiedDateTime: { - serializedName: "lastModifiedDateTime", + name: { + serializedName: "name", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - startedBy: { - serializedName: "startedBy", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - patchServiceUsed: { - serializedName: "patchServiceUsed", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - osType: { - serializedName: "osType", + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + uuid: { + serializedName: "properties.uuid", readOnly: true, type: { name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + vCenterId: { + serializedName: "properties.vCenterId", type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } - } - } - } -}; - -export const AvailablePatchCountByClassification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailablePatchCountByClassification", - modelProperties: { - security: { - serializedName: "security", - readOnly: true, + }, + moRefId: { + serializedName: "properties.moRefId", type: { - name: "Number" + name: "String" } }, - critical: { - serializedName: "critical", - readOnly: true, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { - name: "Number" + name: "String" } }, - definition: { - serializedName: "definition", + moName: { + serializedName: "properties.moName", readOnly: true, type: { - name: "Number" + name: "String" } }, - updateRollup: { - serializedName: "updateRollup", + cpuSharesLevel: { + serializedName: "properties.cpuSharesLevel", readOnly: true, type: { - name: "Number" + name: "String" } }, - featurePack: { - serializedName: "featurePack", + cpuReservationMHz: { + serializedName: "properties.cpuReservationMHz", readOnly: true, type: { name: "Number" } }, - servicePack: { - serializedName: "servicePack", + cpuLimitMHz: { + serializedName: "properties.cpuLimitMHz", readOnly: true, type: { name: "Number" } }, - tools: { - serializedName: "tools", + memSharesLevel: { + serializedName: "properties.memSharesLevel", readOnly: true, type: { - name: "Number" + name: "String" } }, - updates: { - serializedName: "updates", + memReservationMB: { + serializedName: "properties.memReservationMB", readOnly: true, type: { name: "Number" } }, - other: { - serializedName: "other", + memLimitMB: { + serializedName: "properties.memLimitMB", readOnly: true, type: { name: "Number" } - } - } - } -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - required: true, - type: { - name: "String" - } }, - message: { - serializedName: "message", - required: true, + memOverallUsageGB: { + serializedName: "properties.memOverallUsageGB", + readOnly: true, type: { - name: "String" + name: "Number" } }, - target: { - serializedName: "target", + memCapacityGB: { + serializedName: "properties.memCapacityGB", + readOnly: true, type: { - name: "String" + name: "Number" } }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } - } - } -}; - -export const VirtualMachineInstallPatchesParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstallPatchesParameters", - modelProperties: { - maximumDuration: { - serializedName: "maximumDuration", - required: true, + cpuOverallUsageMHz: { + serializedName: "properties.cpuOverallUsageMHz", + readOnly: true, type: { - name: "String" + name: "Number" } }, - rebootSetting: { - serializedName: "rebootSetting", - required: true, + cpuCapacityMHz: { + serializedName: "properties.cpuCapacityMHz", + readOnly: true, type: { - name: "String" + name: "Number" } }, - windowsParameters: { - serializedName: "windowsParameters", + customResourceName: { + serializedName: "properties.customResourceName", + readOnly: true, type: { - name: "Composite", - className: "WindowsParameters" + name: "String" } }, - linuxParameters: { - serializedName: "linuxParameters", - type: { - name: "Composite", - className: "LinuxParameters" - } - } - } - } -}; - -export const WindowsParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsParameters", - modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", + datastoreIds: { + serializedName: "properties.datastoreIds", + readOnly: true, type: { name: "Sequence", element: { @@ -394,8 +374,9 @@ export const WindowsParameters: coreClient.CompositeMapper = { } } }, - kbNumbersToInclude: { - serializedName: "kbNumbersToInclude", + networkIds: { + serializedName: "properties.networkIds", + readOnly: true, type: { name: "Sequence", element: { @@ -405,80 +386,42 @@ export const WindowsParameters: coreClient.CompositeMapper = { } } }, - kbNumbersToExclude: { - serializedName: "kbNumbersToExclude", + statuses: { + serializedName: "properties.statuses", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ResourceStatus" } } } }, - excludeKbsRequiringReboot: { - serializedName: "excludeKbsRequiringReboot", - type: { - name: "Boolean" - } - }, - maxPatchPublishDate: { - serializedName: "maxPatchPublishDate", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "DateTime" + name: "String" } } } } }; -export const LinuxParameters: coreClient.CompositeMapper = { +export const ResourceStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinuxParameters", + className: "ResourceStatus", modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - packageNameMasksToInclude: { - serializedName: "packageNameMasksToInclude", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - packageNameMasksToExclude: { - serializedName: "packageNameMasksToExclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const VirtualMachineInstallPatchesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstallPatchesResult", - modelProperties: { status: { serializedName: "status", readOnly: true, @@ -486,112 +429,152 @@ export const VirtualMachineInstallPatchesResult: coreClient.CompositeMapper = { name: "String" } }, - installationActivityId: { - serializedName: "installationActivityId", + reason: { + serializedName: "reason", readOnly: true, type: { name: "String" } }, - rebootStatus: { - serializedName: "rebootStatus", + message: { + serializedName: "message", readOnly: true, type: { name: "String" } }, - maintenanceWindowExceeded: { - serializedName: "maintenanceWindowExceeded", + severity: { + serializedName: "severity", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - excludedPatchCount: { - serializedName: "excludedPatchCount", - readOnly: true, - type: { - name: "Number" - } - }, - notSelectedPatchCount: { - serializedName: "notSelectedPatchCount", + lastUpdatedAt: { + serializedName: "lastUpdatedAt", readOnly: true, type: { - name: "Number" + name: "DateTime" } - }, - pendingPatchCount: { - serializedName: "pendingPatchCount", - readOnly: true, + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } }, - installedPatchCount: { - serializedName: "installedPatchCount", - readOnly: true, + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } - }, - failedPatchCount: { - serializedName: "failedPatchCount", - readOnly: true, + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", type: { - name: "Number" + name: "String" } }, - startDateTime: { - serializedName: "startDateTime", - readOnly: true, + createdByType: { + serializedName: "createdByType", type: { - name: "DateTime" + name: "String" } }, - lastModifiedDateTime: { - serializedName: "lastModifiedDateTime", - readOnly: true, + createdAt: { + serializedName: "createdAt", type: { name: "DateTime" } }, - startedBy: { - serializedName: "startedBy", - readOnly: true, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - patchServiceUsed: { - serializedName: "patchServiceUsed", - readOnly: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - osType: { - serializedName: "osType", - readOnly: true, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ResourcePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ResourcePoolsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePoolsList", + modelProperties: { + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "ErrorDetail" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcePool" + } + } } } } } }; -export const ResourcePool: coreClient.CompositeMapper = { +export const Cluster: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourcePool", + className: "Cluster", modelProperties: { location: { serializedName: "location", @@ -680,64 +663,74 @@ export const ResourcePool: coreClient.CompositeMapper = { name: "String" } }, - cpuSharesLevel: { - serializedName: "properties.cpuSharesLevel", + statuses: { + serializedName: "properties.statuses", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } } }, - cpuReservationMHz: { - serializedName: "properties.cpuReservationMHz", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { - name: "Number" + name: "String" } }, - cpuLimitMHz: { - serializedName: "properties.cpuLimitMHz", + usedMemoryGB: { + serializedName: "properties.usedMemoryGB", readOnly: true, type: { name: "Number" } }, - memSharesLevel: { - serializedName: "properties.memSharesLevel", + totalMemoryGB: { + serializedName: "properties.totalMemoryGB", readOnly: true, type: { - name: "String" + name: "Number" } }, - memReservationMB: { - serializedName: "properties.memReservationMB", + usedCpuMHz: { + serializedName: "properties.usedCpuMHz", readOnly: true, type: { name: "Number" } }, - memLimitMB: { - serializedName: "properties.memLimitMB", + totalCpuMHz: { + serializedName: "properties.totalCpuMHz", readOnly: true, type: { name: "Number" } }, - customResourceName: { - serializedName: "properties.customResourceName", + datastoreIds: { + serializedName: "properties.datastoreIds", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - statuses: { - serializedName: "properties.statuses", + networkIds: { + serializedName: "properties.networkIds", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ResourceStatus" + name: "String" } } } @@ -753,143 +746,213 @@ export const ResourcePool: coreClient.CompositeMapper = { } }; -export const ResourceStatus: coreClient.CompositeMapper = { +export const ClustersList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceStatus", + className: "ClustersList", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + } + } + } +}; + +export const Host: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Host", + modelProperties: { + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - reason: { - serializedName: "reason", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - severity: { - serializedName: "severity", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - lastUpdatedAt: { - serializedName: "lastUpdatedAt", - readOnly: true, + kind: { + serializedName: "kind", type: { - name: "DateTime" + name: "String" } - } - } - } -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - type: { - serializedName: "type", + }, + uuid: { + serializedName: "properties.uuid", + readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + vCenterId: { + serializedName: "properties.vCenterId", type: { name: "String" } - } - } - } -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", + }, + moRefId: { + serializedName: "properties.moRefId", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", + moName: { + serializedName: "properties.moName", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + statuses: { + serializedName: "properties.statuses", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + customResourceName: { + serializedName: "properties.customResourceName", + readOnly: true, type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + overallMemoryUsageGB: { + serializedName: "properties.overallMemoryUsageGB", + readOnly: true, type: { - name: "DateTime" + name: "Number" } - } - } - } -}; - -export const ResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", + }, + memorySizeGB: { + serializedName: "properties.memorySizeGB", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Number" + } + }, + overallCpuUsageMHz: { + serializedName: "properties.overallCpuUsageMHz", + readOnly: true, + type: { + name: "Number" + } + }, + cpuMhz: { + serializedName: "properties.cpuMhz", + readOnly: true, + type: { + name: "Number" + } + }, + datastoreIds: { + serializedName: "properties.datastoreIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + networkIds: { + serializedName: "properties.networkIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } } } } }; -export const ResourcePoolsList: coreClient.CompositeMapper = { +export const HostsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourcePoolsList", + className: "HostsList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -905,7 +968,7 @@ export const ResourcePoolsList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ResourcePool" + className: "Host" } } } @@ -914,10 +977,10 @@ export const ResourcePoolsList: coreClient.CompositeMapper = { } }; -export const Cluster: coreClient.CompositeMapper = { +export const Datastore: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "Datastore", modelProperties: { location: { serializedName: "location", @@ -1026,28 +1089,18 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, - datastoreIds: { - serializedName: "properties.datastoreIds", + capacityGB: { + serializedName: "properties.capacityGB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - networkIds: { - serializedName: "properties.networkIds", + freeSpaceGB: { + serializedName: "properties.freeSpaceGB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, provisioningState: { @@ -1061,10 +1114,10 @@ export const Cluster: coreClient.CompositeMapper = { } }; -export const ClustersList: coreClient.CompositeMapper = { +export const DatastoresList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClustersList", + className: "DatastoresList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -1080,7 +1133,7 @@ export const ClustersList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Cluster" + className: "Datastore" } } } @@ -1089,10 +1142,10 @@ export const ClustersList: coreClient.CompositeMapper = { } }; -export const Host: coreClient.CompositeMapper = { +export const VCenter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Host", + className: "VCenter", modelProperties: { location: { serializedName: "location", @@ -1156,31 +1209,58 @@ export const Host: coreClient.CompositeMapper = { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + fqdn: { + serializedName: "properties.fqdn", + required: true, type: { name: "String" } }, - moRefId: { - serializedName: "properties.moRefId", + port: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.port", + type: { + name: "Number" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, type: { name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + instanceUuid: { + serializedName: "properties.instanceUuid", + readOnly: true, type: { name: "String" } }, - moName: { - serializedName: "properties.moName", + connectionStatus: { + serializedName: "properties.connectionStatus", + readOnly: true, + type: { + name: "String" + } + }, + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "VICredential" + } + }, statuses: { serializedName: "properties.statuses", readOnly: true, @@ -1194,16 +1274,30 @@ export const Host: coreClient.CompositeMapper = { } } }, - customResourceName: { - serializedName: "properties.customResourceName", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const VICredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VICredential", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + password: { + serializedName: "password", type: { name: "String" } @@ -1212,10 +1306,10 @@ export const Host: coreClient.CompositeMapper = { } }; -export const HostsList: coreClient.CompositeMapper = { +export const VCentersList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HostsList", + className: "VCentersList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -1231,7 +1325,7 @@ export const HostsList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Host" + className: "VCenter" } } } @@ -1240,10 +1334,10 @@ export const HostsList: coreClient.CompositeMapper = { } }; -export const Datastore: coreClient.CompositeMapper = { +export const VirtualMachineTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Datastore", + className: "VirtualMachineTemplate", modelProperties: { location: { serializedName: "location", @@ -1332,184 +1426,102 @@ export const Datastore: coreClient.CompositeMapper = { name: "String" } }, - statuses: { - serializedName: "properties.statuses", + memorySizeMB: { + serializedName: "properties.memorySizeMB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } + name: "Number" } }, - customResourceName: { - serializedName: "properties.customResourceName", + numCPUs: { + serializedName: "properties.numCPUs", + readOnly: true, + type: { + name: "Number" + } + }, + numCoresPerSocket: { + serializedName: "properties.numCoresPerSocket", + readOnly: true, + type: { + name: "Number" + } + }, + osType: { + serializedName: "properties.osType", readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + osName: { + serializedName: "properties.osName", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const DatastoresList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatastoresList", - modelProperties: { - nextLink: { - serializedName: "nextLink", + }, + folderPath: { + serializedName: "properties.folderPath", + readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + networkInterfaces: { + serializedName: "properties.networkInterfaces", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Datastore" + className: "NetworkInterface" } } } - } - } - } -}; - -export const VCenter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VCenter", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } }, - uuid: { - serializedName: "properties.uuid", + disks: { + serializedName: "properties.disks", readOnly: true, type: { - name: "String" - } - }, - fqdn: { - serializedName: "properties.fqdn", - required: true, - type: { - name: "String" - } - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - serializedName: "properties.port", - type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } } }, - version: { - serializedName: "properties.version", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, - instanceUuid: { - serializedName: "properties.instanceUuid", + toolsVersionStatus: { + serializedName: "properties.toolsVersionStatus", readOnly: true, type: { name: "String" } }, - connectionStatus: { - serializedName: "properties.connectionStatus", + toolsVersion: { + serializedName: "properties.toolsVersion", readOnly: true, type: { name: "String" } }, - customResourceName: { - serializedName: "properties.customResourceName", + firmwareType: { + serializedName: "properties.firmwareType", readOnly: true, type: { name: "String" } }, - credentials: { - serializedName: "properties.credentials", - type: { - name: "Composite", - className: "VICredential" - } - }, statuses: { serializedName: "properties.statuses", readOnly: true, @@ -1534,1052 +1546,190 @@ export const VCenter: coreClient.CompositeMapper = { } }; -export const VICredential: coreClient.CompositeMapper = { +export const NetworkInterface: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VICredential", + className: "NetworkInterface", modelProperties: { - username: { - serializedName: "username", + name: { + serializedName: "name", type: { name: "String" } }, - password: { - serializedName: "password", - type: { - name: "String" - } - } - } - } -}; - -export const VCentersList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VCentersList", - modelProperties: { - nextLink: { - serializedName: "nextLink", + label: { + serializedName: "label", + readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + ipAddresses: { + serializedName: "ipAddresses", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VCenter" + name: "String" } } } - } - } - } -}; - -export const VirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } }, - id: { - serializedName: "id", + macAddress: { + serializedName: "macAddress", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + networkId: { + serializedName: "networkId", type: { name: "String" } }, - kind: { - serializedName: "kind", + nicType: { + serializedName: "nicType", type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - resourcePoolId: { - serializedName: "properties.resourcePoolId", + powerOnBoot: { + serializedName: "powerOnBoot", type: { name: "String" } }, - templateId: { - serializedName: "properties.templateId", + networkMoRefId: { + serializedName: "networkMoRefId", + readOnly: true, type: { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + networkMoName: { + serializedName: "networkMoName", + readOnly: true, type: { name: "String" } }, - placementProfile: { - serializedName: "properties.placementProfile", + deviceKey: { + serializedName: "deviceKey", type: { - name: "Composite", - className: "PlacementProfile" + name: "Number" } }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OsProfile" - } - }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkProfile" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - guestAgentProfile: { - serializedName: "properties.guestAgentProfile", - type: { - name: "Composite", - className: "GuestAgentProfile" - } - }, - securityProfile: { - serializedName: "properties.securityProfile", - type: { - name: "Composite", - className: "SecurityProfile" - } - }, - moRefId: { - serializedName: "properties.moRefId", - type: { - name: "String" - } - }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", - type: { - name: "String" - } - }, - moName: { - serializedName: "properties.moName", - readOnly: true, - type: { - name: "String" - } - }, - folderPath: { - serializedName: "properties.folderPath", - readOnly: true, - type: { - name: "String" - } - }, - instanceUuid: { - serializedName: "properties.instanceUuid", - readOnly: true, - type: { - name: "String" - } - }, - smbiosUuid: { - serializedName: "properties.smbiosUuid", - type: { - name: "String" - } - }, - firmwareType: { - serializedName: "properties.firmwareType", - type: { - name: "String" - } - }, - powerState: { - serializedName: "properties.powerState", - readOnly: true, - type: { - name: "String" - } - }, - customResourceName: { - serializedName: "properties.customResourceName", - readOnly: true, - type: { - name: "String" - } - }, - uuid: { - serializedName: "properties.uuid", - readOnly: true, - type: { - name: "String" - } - }, - statuses: { - serializedName: "properties.statuses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - vmId: { - serializedName: "properties.vmId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PlacementProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementProfile", - modelProperties: { - resourcePoolId: { - serializedName: "resourcePoolId", - type: { - name: "String" - } - }, - clusterId: { - serializedName: "clusterId", - type: { - name: "String" - } - }, - hostId: { - serializedName: "hostId", - type: { - name: "String" - } - }, - datastoreId: { - serializedName: "datastoreId", - type: { - name: "String" - } - } - } - } -}; - -export const OsProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfile", - modelProperties: { - computerName: { - serializedName: "computerName", - type: { - name: "String" - } - }, - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String" - } - }, - adminPassword: { - serializedName: "adminPassword", - type: { - name: "String" - } - }, - guestId: { - serializedName: "guestId", - type: { - name: "String" - } - }, - allowExtensionOperations: { - serializedName: "allowExtensionOperations", - readOnly: true, - type: { - name: "Boolean" - } - }, - osType: { - serializedName: "osType", - type: { - name: "String" - } - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String" - } - }, - toolsRunningStatus: { - serializedName: "toolsRunningStatus", - readOnly: true, - type: { - name: "String" - } - }, - toolsVersionStatus: { - serializedName: "toolsVersionStatus", - readOnly: true, - type: { - name: "String" - } - }, - toolsVersion: { - serializedName: "toolsVersion", - readOnly: true, - type: { - name: "String" - } - }, - windowsConfiguration: { - serializedName: "windowsConfiguration", - type: { - name: "Composite", - className: "OsProfileWindowsConfiguration" - } - }, - linuxConfiguration: { - serializedName: "linuxConfiguration", - type: { - name: "Composite", - className: "OsProfileLinuxConfiguration" - } - } - } - } -}; - -export const OsProfileWindowsConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileWindowsConfiguration", - modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", - type: { - name: "String" - } - }, - patchMode: { - serializedName: "patchSettings.patchMode", - type: { - name: "String" - } - } - } - } -}; - -export const OsProfileLinuxConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileLinuxConfiguration", - modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", - type: { - name: "String" - } - }, - patchMode: { - serializedName: "patchSettings.patchMode", - type: { - name: "String" - } - } - } - } -}; - -export const HardwareProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareProfile", - modelProperties: { - memorySizeMB: { - serializedName: "memorySizeMB", - type: { - name: "Number" - } - }, - numCPUs: { - serializedName: "numCPUs", - type: { - name: "Number" - } - }, - numCoresPerSocket: { - serializedName: "numCoresPerSocket", - type: { - name: "Number" - } - }, - cpuHotAddEnabled: { - serializedName: "cpuHotAddEnabled", - readOnly: true, - type: { - name: "Boolean" - } - }, - cpuHotRemoveEnabled: { - serializedName: "cpuHotRemoveEnabled", - readOnly: true, - type: { - name: "Boolean" - } - }, - memoryHotAddEnabled: { - serializedName: "memoryHotAddEnabled", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const NetworkProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfile", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface" - } - } - } - } - } - } -}; - -export const NetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterface", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - label: { - serializedName: "label", - readOnly: true, - type: { - name: "String" - } - }, - ipAddresses: { - serializedName: "ipAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String" - } - }, - networkId: { - serializedName: "networkId", - type: { - name: "String" - } - }, - nicType: { - serializedName: "nicType", - type: { - name: "String" - } - }, - powerOnBoot: { - serializedName: "powerOnBoot", - type: { - name: "String" - } - }, - networkMoRefId: { - serializedName: "networkMoRefId", - readOnly: true, - type: { - name: "String" - } - }, - networkMoName: { - serializedName: "networkMoName", - readOnly: true, - type: { - name: "String" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - }, - ipSettings: { - serializedName: "ipSettings", - type: { - name: "Composite", - className: "NicIPSettings" - } - } - } - } -}; - -export const NicIPSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NicIPSettings", - modelProperties: { - allocationMethod: { - serializedName: "allocationMethod", - type: { - name: "String" - } - }, - dnsServers: { - serializedName: "dnsServers", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - gateway: { - serializedName: "gateway", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } - }, - subnetMask: { - serializedName: "subnetMask", - type: { - name: "String" - } - }, - primaryWinsServer: { - serializedName: "primaryWinsServer", - readOnly: true, - type: { - name: "String" - } - }, - secondaryWinsServer: { - serializedName: "secondaryWinsServer", - readOnly: true, - type: { - name: "String" - } - }, - ipAddressInfo: { - serializedName: "ipAddressInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NicIPAddressSettings" - } - } - } - } - } - } -}; - -export const NicIPAddressSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NicIPAddressSettings", - modelProperties: { - allocationMethod: { - serializedName: "allocationMethod", - readOnly: true, - type: { - name: "String" - } - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String" - } - }, - subnetMask: { - serializedName: "subnetMask", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const StorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - disks: { - serializedName: "disks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDisk" - } - } - } - }, - scsiControllers: { - serializedName: "scsiControllers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualScsiController" - } - } - } - } - } - } -}; - -export const VirtualDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualDisk", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - label: { - serializedName: "label", - readOnly: true, - type: { - name: "String" - } - }, - diskObjectId: { - serializedName: "diskObjectId", - readOnly: true, - type: { - name: "String" - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - }, - diskMode: { - serializedName: "diskMode", - type: { - name: "String" - } - }, - controllerKey: { - serializedName: "controllerKey", - type: { - name: "Number" - } - }, - unitNumber: { - serializedName: "unitNumber", - type: { - name: "Number" - } - }, - deviceName: { - serializedName: "deviceName", - type: { - name: "String" - } - }, - diskType: { - serializedName: "diskType", - type: { - name: "String" - } - } - } - } -}; - -export const VirtualScsiController: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualScsiController", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - controllerKey: { - serializedName: "controllerKey", - type: { - name: "Number" - } - }, - busNumber: { - serializedName: "busNumber", - type: { - name: "Number" - } - }, - scsiCtlrUnitNumber: { - serializedName: "scsiCtlrUnitNumber", - type: { - name: "Number" - } - }, - sharing: { - serializedName: "sharing", - type: { - name: "String" - } - } - } - } -}; - -export const GuestAgentProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgentProfile", - modelProperties: { - vmUuid: { - serializedName: "vmUuid", - readOnly: true, - type: { - name: "String" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String" - } - }, - lastStatusChange: { - serializedName: "lastStatusChange", - readOnly: true, - type: { - name: "DateTime" - } - }, - agentVersion: { - serializedName: "agentVersion", - readOnly: true, - type: { - name: "String" - } - }, - errorDetails: { - serializedName: "errorDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } - } - } -}; - -export const SecurityProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityProfile", - modelProperties: { - uefiSettings: { - serializedName: "uefiSettings", - type: { - name: "Composite", - className: "UefiSettings" - } - } - } - } -}; - -export const UefiSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UefiSettings", - modelProperties: { - secureBootEnabled: { - serializedName: "secureBootEnabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, + ipSettings: { + serializedName: "ipSettings", type: { - name: "String" + name: "Composite", + className: "NicIPSettings" } } } } }; -export const VirtualMachineUpdate: coreClient.CompositeMapper = { +export const NicIPSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineUpdate", + className: "NicIPSettings", modelProperties: { - tags: { - serializedName: "tags", + allocationMethod: { + serializedName: "allocationMethod", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - identity: { - serializedName: "identity", + dnsServers: { + serializedName: "dnsServers", type: { - name: "Composite", - className: "Identity" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", + gateway: { + serializedName: "gateway", type: { - name: "Composite", - className: "HardwareProfile" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - osProfile: { - serializedName: "properties.osProfile", + ipAddress: { + serializedName: "ipAddress", type: { - name: "Composite", - className: "OsProfileUpdate" + name: "String" } }, - storageProfile: { - serializedName: "properties.storageProfile", + subnetMask: { + serializedName: "subnetMask", type: { - name: "Composite", - className: "StorageProfileUpdate" + name: "String" } }, - networkProfile: { - serializedName: "properties.networkProfile", + primaryWinsServer: { + serializedName: "primaryWinsServer", + readOnly: true, type: { - name: "Composite", - className: "NetworkProfileUpdate" + name: "String" } - } - } - } -}; - -export const OsProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileUpdate", - modelProperties: { - windowsConfiguration: { - serializedName: "windowsConfiguration", + }, + secondaryWinsServer: { + serializedName: "secondaryWinsServer", + readOnly: true, type: { - name: "Composite", - className: "OsProfileUpdateWindowsConfiguration" + name: "String" } }, - linuxConfiguration: { - serializedName: "linuxConfiguration", + ipAddressInfo: { + serializedName: "ipAddressInfo", + readOnly: true, type: { - name: "Composite", - className: "OsProfileUpdateLinuxConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NicIPAddressSettings" + } + } } } } } }; -export const OsProfileUpdateWindowsConfiguration: coreClient.CompositeMapper = { +export const NicIPAddressSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OsProfileUpdateWindowsConfiguration", + className: "NicIPAddressSettings", modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", + allocationMethod: { + serializedName: "allocationMethod", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + readOnly: true, type: { name: "String" } }, - patchMode: { - serializedName: "patchSettings.patchMode", + subnetMask: { + serializedName: "subnetMask", + readOnly: true, type: { name: "String" } @@ -2588,55 +1738,27 @@ export const OsProfileUpdateWindowsConfiguration: coreClient.CompositeMapper = { } }; -export const OsProfileUpdateLinuxConfiguration: coreClient.CompositeMapper = { +export const VirtualDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OsProfileUpdateLinuxConfiguration", + className: "VirtualDisk", modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", + name: { + serializedName: "name", type: { name: "String" } }, - patchMode: { - serializedName: "patchSettings.patchMode", + label: { + serializedName: "label", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const StorageProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfileUpdate", - modelProperties: { - disks: { - serializedName: "disks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDiskUpdate" - } - } - } - } - } - } -}; - -export const VirtualDiskUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualDiskUpdate", - modelProperties: { - name: { - serializedName: "name", + }, + diskObjectId: { + serializedName: "diskObjectId", + readOnly: true, type: { name: "String" } @@ -2687,86 +1809,10 @@ export const VirtualDiskUpdate: coreClient.CompositeMapper = { } }; -export const NetworkProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfileUpdate", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceUpdate" - } - } - } - } - } - } -}; - -export const NetworkInterfaceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceUpdate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - networkId: { - serializedName: "networkId", - type: { - name: "String" - } - }, - nicType: { - serializedName: "nicType", - type: { - name: "String" - } - }, - powerOnBoot: { - serializedName: "powerOnBoot", - type: { - name: "String" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - } - } - } -}; - -export const StopVirtualMachineOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StopVirtualMachineOptions", - modelProperties: { - skipShutdown: { - defaultValue: false, - serializedName: "skipShutdown", - type: { - name: "Boolean" - } - } - } - } -}; - -export const VirtualMachinesList: coreClient.CompositeMapper = { +export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachinesList", + className: "VirtualMachineTemplatesList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -2782,7 +1828,7 @@ export const VirtualMachinesList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualMachine" + className: "VirtualMachineTemplate" } } } @@ -2791,10 +1837,10 @@ export const VirtualMachinesList: coreClient.CompositeMapper = { } }; -export const VirtualMachineTemplate: coreClient.CompositeMapper = { +export const VirtualNetwork: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplate", + className: "VirtualNetwork", modelProperties: { location: { serializedName: "location", @@ -2861,152 +1907,174 @@ export const VirtualMachineTemplate: coreClient.CompositeMapper = { vCenterId: { serializedName: "properties.vCenterId", type: { - name: "String" - } - }, - moRefId: { - serializedName: "properties.moRefId", - type: { - name: "String" - } - }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", - type: { - name: "String" - } - }, - moName: { - serializedName: "properties.moName", - readOnly: true, - type: { - name: "String" - } - }, - memorySizeMB: { - serializedName: "properties.memorySizeMB", - readOnly: true, - type: { - name: "Number" - } - }, - numCPUs: { - serializedName: "properties.numCPUs", - readOnly: true, - type: { - name: "Number" + name: "String" } }, - numCoresPerSocket: { - serializedName: "properties.numCoresPerSocket", - readOnly: true, + moRefId: { + serializedName: "properties.moRefId", type: { - name: "Number" + name: "String" } }, - osType: { - serializedName: "properties.osType", - readOnly: true, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - osName: { - serializedName: "properties.osName", + moName: { + serializedName: "properties.moName", readOnly: true, type: { name: "String" } }, - folderPath: { - serializedName: "properties.folderPath", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", + statuses: { + serializedName: "properties.statuses", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "NetworkInterface" + className: "ResourceStatus" } } } }, - disks: { - serializedName: "properties.disks", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualDisk" + className: "VirtualNetwork" } } } + } + } + } +}; + +export const InventoryItemProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InventoryItemProperties", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: { + serializedName: "inventoryType", + clientName: "inventoryType" + }, + modelProperties: { + inventoryType: { + serializedName: "inventoryType", + required: true, + type: { + name: "String" + } }, - customResourceName: { - serializedName: "properties.customResourceName", - readOnly: true, + managedResourceId: { + serializedName: "managedResourceId", type: { name: "String" } }, - toolsVersionStatus: { - serializedName: "properties.toolsVersionStatus", - readOnly: true, + moRefId: { + serializedName: "moRefId", type: { name: "String" } }, - toolsVersion: { - serializedName: "properties.toolsVersion", - readOnly: true, + moName: { + serializedName: "moName", type: { name: "String" } }, - firmwareType: { - serializedName: "properties.firmwareType", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - statuses: { - serializedName: "properties.statuses", + name: { + serializedName: "name", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { +export const InventoryItemsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplatesList", + className: "InventoryItemsList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -3022,7 +2090,7 @@ export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualMachineTemplate" + className: "InventoryItem" } } } @@ -3031,149 +2099,201 @@ export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { } }; -export const VirtualNetwork: coreClient.CompositeMapper = { +export const PlacementProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetwork", + className: "PlacementProfile", modelProperties: { - location: { - serializedName: "location", - required: true, + resourcePoolId: { + serializedName: "resourcePoolId", type: { name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + clusterId: { + serializedName: "clusterId", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - systemData: { - serializedName: "systemData", + hostId: { + serializedName: "hostId", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - tags: { - serializedName: "tags", + datastoreId: { + serializedName: "datastoreId", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + } + } + } +}; + +export const OsProfileForVMInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProfileForVMInstance", + modelProperties: { + computerName: { + serializedName: "computerName", + type: { + name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + adminUsername: { + serializedName: "adminUsername", type: { name: "String" } }, - id: { - serializedName: "id", - readOnly: true, + adminPassword: { + serializedName: "adminPassword", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + guestId: { + serializedName: "guestId", type: { name: "String" } }, - kind: { - serializedName: "kind", + osType: { + serializedName: "osType", type: { name: "String" } }, - uuid: { - serializedName: "properties.uuid", + osSku: { + serializedName: "osSku", readOnly: true, type: { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + toolsRunningStatus: { + serializedName: "toolsRunningStatus", + readOnly: true, type: { name: "String" } }, - moRefId: { - serializedName: "properties.moRefId", + toolsVersionStatus: { + serializedName: "toolsVersionStatus", + readOnly: true, type: { name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + toolsVersion: { + serializedName: "toolsVersion", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const HardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HardwareProfile", + modelProperties: { + memorySizeMB: { + serializedName: "memorySizeMB", + type: { + name: "Number" + } }, - moName: { - serializedName: "properties.moName", + numCPUs: { + serializedName: "numCPUs", + type: { + name: "Number" + } + }, + numCoresPerSocket: { + serializedName: "numCoresPerSocket", + type: { + name: "Number" + } + }, + cpuHotAddEnabled: { + serializedName: "cpuHotAddEnabled", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - customResourceName: { - serializedName: "properties.customResourceName", + cpuHotRemoveEnabled: { + serializedName: "cpuHotRemoveEnabled", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - statuses: { - serializedName: "properties.statuses", + memoryHotAddEnabled: { + serializedName: "memoryHotAddEnabled", readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const NetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceStatus" + className: "NetworkInterface" } } } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } } } } }; -export const VirtualNetworksList: coreClient.CompositeMapper = { +export const StorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksList", + className: "StorageProfile", modelProperties: { - nextLink: { - serializedName: "nextLink", + disks: { + serializedName: "disks", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } } }, - value: { - serializedName: "value", - required: true, + scsiControllers: { + serializedName: "scsiControllers", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualNetwork" + className: "VirtualScsiController" } } } @@ -3182,44 +2302,37 @@ export const VirtualNetworksList: coreClient.CompositeMapper = { } }; -export const InventoryItemProperties: coreClient.CompositeMapper = { +export const VirtualScsiController: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemProperties", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: { - serializedName: "inventoryType", - clientName: "inventoryType" - }, + className: "VirtualScsiController", modelProperties: { - inventoryType: { - serializedName: "inventoryType", - required: true, + type: { + serializedName: "type", type: { name: "String" } }, - managedResourceId: { - serializedName: "managedResourceId", + controllerKey: { + serializedName: "controllerKey", type: { - name: "String" + name: "Number" } }, - moRefId: { - serializedName: "moRefId", + busNumber: { + serializedName: "busNumber", type: { - name: "String" + name: "Number" } }, - moName: { - serializedName: "moName", + scsiCtlrUnitNumber: { + serializedName: "scsiCtlrUnitNumber", type: { - name: "String" + name: "Number" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + sharing: { + serializedName: "sharing", type: { name: "String" } @@ -3228,309 +2341,346 @@ export const InventoryItemProperties: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const SecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "SecurityProfile", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + uefiSettings: { + serializedName: "uefiSettings", type: { - name: "String" + name: "Composite", + className: "UefiSettings" } } } } }; -export const InventoryItemsList: coreClient.CompositeMapper = { +export const UefiSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemsList", + className: "UefiSettings", modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, + secureBootEnabled: { + serializedName: "secureBootEnabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InventoryItem" - } - } + name: "Boolean" } } } } }; -export const HybridIdentityMetadataList: coreClient.CompositeMapper = { +export const InfrastructureProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridIdentityMetadataList", + className: "InfrastructureProfile", modelProperties: { - nextLink: { - serializedName: "nextLink", + templateId: { + serializedName: "templateId", type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + vCenterId: { + serializedName: "vCenterId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HybridIdentityMetadata" - } - } + name: "String" } - } - } - } -}; - -export const MachineExtension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtension", - modelProperties: { - location: { - serializedName: "location", + }, + moRefId: { + serializedName: "moRefId", + readOnly: true, type: { name: "String" } }, - systemData: { - serializedName: "systemData", + inventoryItemId: { + serializedName: "inventoryItemId", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - tags: { - serializedName: "tags", + moName: { + serializedName: "moName", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - name: { - serializedName: "name", + folderPath: { + serializedName: "folderPath", readOnly: true, type: { name: "String" } }, - id: { - serializedName: "id", + instanceUuid: { + serializedName: "instanceUuid", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + smbiosUuid: { + serializedName: "smbiosUuid", + type: { + name: "String" + } + }, + firmwareType: { + serializedName: "firmwareType", + type: { + name: "String" + } + }, + customResourceName: { + serializedName: "customResourceName", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const VirtualMachineInstanceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceUpdate", + modelProperties: { + hardwareProfile: { + serializedName: "properties.hardwareProfile", + type: { + name: "Composite", + className: "HardwareProfile" + } + }, + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "StorageProfileUpdate" + } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfileUpdate" + } + } + } + } +}; + +export const StorageProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageProfileUpdate", + modelProperties: { + disks: { + serializedName: "disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDiskUpdate" + } + } + } + } + } + } +}; + +export const VirtualDiskUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualDiskUpdate", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - typePropertiesType: { - serializedName: "properties.type", + deviceKey: { + serializedName: "deviceKey", type: { - name: "String" + name: "Number" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + diskMode: { + serializedName: "diskMode", type: { name: "String" } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + controllerKey: { + serializedName: "controllerKey", type: { - name: "Boolean" + name: "Number" } }, - settings: { - serializedName: "properties.settings", + unitNumber: { + serializedName: "unitNumber", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + deviceName: { + serializedName: "deviceName", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + diskType: { + serializedName: "diskType", type: { name: "String" } - }, - instanceView: { - serializedName: "properties.instanceView", + } + } + } +}; + +export const NetworkProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileUpdate", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "Composite", - className: "MachineExtensionPropertiesInstanceView" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterfaceUpdate" + } + } } } } } }; -export const MachineExtensionInstanceView: coreClient.CompositeMapper = { +export const NetworkInterfaceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionInstanceView", + className: "NetworkInterfaceUpdate", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + networkId: { + serializedName: "networkId", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", - readOnly: true, + nicType: { + serializedName: "nicType", type: { name: "String" } }, - status: { - serializedName: "status", + powerOnBoot: { + serializedName: "powerOnBoot", type: { - name: "Composite", - className: "MachineExtensionInstanceViewStatus" + name: "String" + } + }, + deviceKey: { + serializedName: "deviceKey", + type: { + name: "Number" } } } } }; -export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { +export const VirtualMachineInstancesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionInstanceViewStatus", + className: "VirtualMachineInstancesList", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - level: { - serializedName: "level", - readOnly: true, - type: { - name: "String" - } - }, - displayStatus: { - serializedName: "displayStatus", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineInstance" + } + } } - }, - time: { - serializedName: "time", - readOnly: true, + } + } + } +}; + +export const StopVirtualMachineOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StopVirtualMachineOptions", + modelProperties: { + skipShutdown: { + defaultValue: false, + serializedName: "skipShutdown", type: { - name: "DateTime" + name: "Boolean" } } } } }; -export const MachineExtensionsListResult: coreClient.CompositeMapper = { +export const VmInstanceHybridIdentityMetadataList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "VmInstanceHybridIdentityMetadataList", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtension" + className: "VmInstanceHybridIdentityMetadata" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } @@ -3653,66 +2803,12 @@ export const InventoryItemDetails: coreClient.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const MachineExtensionUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionUpdate", - modelProperties: { - ...ResourcePatch.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.publisher", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - type: { - name: "String" - } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + inventoryType: { + serializedName: "inventoryType", type: { name: "String" } - }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "properties.protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } } } } @@ -3792,6 +2888,13 @@ export const VirtualMachineInventoryItem: coreClient.CompositeMapper = { className: "InventoryItemDetails" } }, + cluster: { + serializedName: "cluster", + type: { + name: "Composite", + className: "InventoryItemDetails" + } + }, instanceUuid: { serializedName: "instanceUuid", type: { @@ -3876,6 +2979,20 @@ export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { name: "String" } }, + toolsVersionStatus: { + serializedName: "toolsVersionStatus", + readOnly: true, + type: { + name: "String" + } + }, + toolsVersion: { + serializedName: "toolsVersion", + readOnly: true, + type: { + name: "String" + } + }, folderPath: { serializedName: "folderPath", type: { @@ -3971,86 +3088,162 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; -export const MachineExtensionPropertiesInstanceView: coreClient.CompositeMapper = { +export const InventoryItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionPropertiesInstanceView", + className: "InventoryItem", modelProperties: { - ...MachineExtensionInstanceView.type.modelProperties + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + inventoryType: { + serializedName: "properties.inventoryType", + required: true, + type: { + name: "String" + } + }, + managedResourceId: { + serializedName: "properties.managedResourceId", + type: { + name: "String" + } + }, + moRefId: { + serializedName: "properties.moRefId", + type: { + name: "String" + } + }, + moName: { + serializedName: "properties.moName", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const InventoryItem: coreClient.CompositeMapper = { +export const VirtualMachineInstance: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItem", + className: "VirtualMachineInstance", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + placementProfile: { + serializedName: "properties.placementProfile", type: { name: "Composite", - className: "SystemData" + className: "PlacementProfile" } }, - kind: { - serializedName: "kind", + osProfile: { + serializedName: "properties.osProfile", type: { - name: "String" + name: "Composite", + className: "OsProfileForVMInstance" } }, - inventoryType: { - serializedName: "properties.inventoryType", - required: true, + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { - name: "String" + name: "Composite", + className: "HardwareProfile" } }, - managedResourceId: { - serializedName: "properties.managedResourceId", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "NetworkProfile" } }, - moRefId: { - serializedName: "properties.moRefId", + storageProfile: { + serializedName: "properties.storageProfile", type: { - name: "String" + name: "Composite", + className: "StorageProfile" } }, - moName: { - serializedName: "properties.moName", + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "SecurityProfile" + } + }, + infrastructureProfile: { + serializedName: "properties.infrastructureProfile", + type: { + name: "Composite", + className: "InfrastructureProfile" + } + }, + powerState: { + serializedName: "properties.powerState", + readOnly: true, type: { name: "String" } }, + statuses: { + serializedName: "properties.statuses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } + }, + resourceUid: { + serializedName: "properties.resourceUid", + readOnly: true, + type: { + name: "String" + } } } } }; -export const HybridIdentityMetadata: coreClient.CompositeMapper = { +export const VmInstanceHybridIdentityMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridIdentityMetadata", + className: "VmInstanceHybridIdentityMetadata", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - vmId: { - serializedName: "properties.vmId", + resourceUid: { + serializedName: "properties.resourceUid", type: { name: "String" } @@ -4061,13 +3254,6 @@ export const HybridIdentityMetadata: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "properties.identity", - type: { - name: "Composite", - className: "Identity" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -4085,13 +3271,6 @@ export const GuestAgent: coreClient.CompositeMapper = { className: "GuestAgent", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, uuid: { serializedName: "properties.uuid", readOnly: true, @@ -4106,6 +3285,12 @@ export const GuestAgent: coreClient.CompositeMapper = { className: "GuestCredential" } }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + }, httpProxyConfig: { serializedName: "properties.httpProxyConfig", type: { @@ -4157,6 +3342,201 @@ export const GuestAgent: coreClient.CompositeMapper = { } }; +export const ResourcePoolsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePoolsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const HostsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DatastoresDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatastoresDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VCentersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VCentersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineTemplatesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineTemplatesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VMInstanceGuestAgentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMInstanceGuestAgentsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { InventoryItemProperties: InventoryItemProperties, "InventoryItemProperties.ResourcePool": ResourcePoolInventoryItem, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts index 5aa8366991c1..bddd680571b7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts @@ -12,10 +12,6 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - VirtualMachineInstallPatchesParameters as VirtualMachineInstallPatchesParametersMapper, - VirtualMachine as VirtualMachineMapper, - VirtualMachineUpdate as VirtualMachineUpdateMapper, - StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, ResourcePool as ResourcePoolMapper, ResourcePatch as ResourcePatchMapper, Cluster as ClusterMapper, @@ -25,9 +21,9 @@ import { VirtualMachineTemplate as VirtualMachineTemplateMapper, VirtualNetwork as VirtualNetworkMapper, InventoryItem as InventoryItemMapper, - HybridIdentityMetadata as HybridIdentityMetadataMapper, - MachineExtension as MachineExtensionMapper, - MachineExtensionUpdate as MachineExtensionUpdateMapper, + VirtualMachineInstance as VirtualMachineInstanceMapper, + VirtualMachineInstanceUpdate as VirtualMachineInstanceUpdateMapper, + StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, GuestAgent as GuestAgentMapper } from "../models/mappers"; @@ -58,7 +54,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-01-10-preview", + defaultValue: "2023-10-01", isConstant: true, serializedName: "api-version", type: { @@ -79,32 +75,27 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - serializedName: "subscriptionId", - required: true, + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - serializedName: "resourceGroupName", - required: true, - type: { - name: "String" - } - } +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ResourcePoolMapper }; -export const name: OperationURLParameter = { - parameterPath: "name", +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "name", + serializedName: "subscriptionId", required: true, type: { name: "String" @@ -112,32 +103,21 @@ export const name: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", + serializedName: "resourceGroupName", + required: true, type: { name: "String" } } }; -export const installPatchesInput: OperationParameter = { - parameterPath: "installPatchesInput", - mapper: VirtualMachineInstallPatchesParametersMapper -}; - -export const body: OperationParameter = { - parameterPath: ["options", "body"], - mapper: VirtualMachineMapper -}; - -export const virtualMachineName: OperationURLParameter = { - parameterPath: "virtualMachineName", +export const resourcePoolName: OperationURLParameter = { + parameterPath: "resourcePoolName", mapper: { - serializedName: "virtualMachineName", + serializedName: "resourcePoolName", required: true, type: { name: "String" @@ -147,7 +127,7 @@ export const virtualMachineName: OperationURLParameter = { export const body1: OperationParameter = { parameterPath: ["options", "body"], - mapper: VirtualMachineUpdateMapper + mapper: ResourcePatchMapper }; export const force: OperationQueryParameter = { @@ -160,43 +140,7 @@ export const force: OperationQueryParameter = { } }; -export const retain: OperationQueryParameter = { - parameterPath: ["options", "retain"], - mapper: { - serializedName: "retain", - type: { - name: "Boolean" - } - } -}; - export const body2: OperationParameter = { - parameterPath: ["options", "body"], - mapper: StopVirtualMachineOptionsMapper -}; - -export const body3: OperationParameter = { - parameterPath: ["options", "body"], - mapper: ResourcePoolMapper -}; - -export const resourcePoolName: OperationURLParameter = { - parameterPath: "resourcePoolName", - mapper: { - serializedName: "resourcePoolName", - required: true, - type: { - name: "String" - } - } -}; - -export const body4: OperationParameter = { - parameterPath: ["options", "body"], - mapper: ResourcePatchMapper -}; - -export const body5: OperationParameter = { parameterPath: ["options", "body"], mapper: ClusterMapper }; @@ -212,7 +156,7 @@ export const clusterName: OperationURLParameter = { } }; -export const body6: OperationParameter = { +export const body3: OperationParameter = { parameterPath: ["options", "body"], mapper: HostMapper }; @@ -228,7 +172,7 @@ export const hostName: OperationURLParameter = { } }; -export const body7: OperationParameter = { +export const body4: OperationParameter = { parameterPath: ["options", "body"], mapper: DatastoreMapper }; @@ -244,7 +188,7 @@ export const datastoreName: OperationURLParameter = { } }; -export const body8: OperationParameter = { +export const body5: OperationParameter = { parameterPath: ["options", "body"], mapper: VCenterMapper }; @@ -260,7 +204,7 @@ export const vcenterName: OperationURLParameter = { } }; -export const body9: OperationParameter = { +export const body6: OperationParameter = { parameterPath: ["options", "body"], mapper: VirtualMachineTemplateMapper }; @@ -276,7 +220,7 @@ export const virtualMachineTemplateName: OperationURLParameter = { } }; -export const body10: OperationParameter = { +export const body7: OperationParameter = { parameterPath: ["options", "body"], mapper: VirtualNetworkMapper }; @@ -292,7 +236,7 @@ export const virtualNetworkName: OperationURLParameter = { } }; -export const body11: OperationParameter = { +export const body8: OperationParameter = { parameterPath: ["options", "body"], mapper: InventoryItemMapper }; @@ -308,54 +252,44 @@ export const inventoryItemName: OperationURLParameter = { } }; -export const body12: OperationParameter = { +export const body9: OperationParameter = { parameterPath: ["options", "body"], - mapper: HybridIdentityMetadataMapper + mapper: VirtualMachineInstanceMapper }; -export const metadataName: OperationURLParameter = { - parameterPath: "metadataName", +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", mapper: { - serializedName: "metadataName", + serializedName: "resourceUri", required: true, type: { name: "String" } - } + }, + skipEncoding: true }; -export const extensionParameters: OperationParameter = { - parameterPath: "extensionParameters", - mapper: MachineExtensionMapper +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VirtualMachineInstanceUpdateMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const deleteFromHost: OperationQueryParameter = { + parameterPath: ["options", "deleteFromHost"], mapper: { - serializedName: "extensionName", - required: true, + serializedName: "deleteFromHost", type: { - name: "String" + name: "Boolean" } } }; -export const extensionParameters1: OperationParameter = { - parameterPath: "extensionParameters", - mapper: MachineExtensionUpdateMapper -}; - -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], - mapper: { - serializedName: "$expand", - type: { - name: "String" - } - } +export const body11: OperationParameter = { + parameterPath: ["options", "body"], + mapper: StopVirtualMachineOptionsMapper }; -export const body13: OperationParameter = { +export const body12: OperationParameter = { parameterPath: ["options", "body"], mapper: GuestAgentMapper }; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts index b23619904dca..de8f996b5244 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Cluster, ClustersListNextOptionalParams, @@ -181,8 +185,8 @@ export class ClustersImpl implements Clusters { clusterName: string, options?: ClustersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateResponse > > { @@ -192,7 +196,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body5, + requestBody: Parameters.body2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts index 543e48b36310..87c124e3e954 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Datastore, DatastoresListNextOptionalParams, @@ -181,8 +185,8 @@ export class DatastoresImpl implements Datastores { datastoreName: string, options?: DatastoresCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatastoresCreateResponse > > { @@ -192,7 +196,7 @@ export class DatastoresImpl implements Datastores { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class DatastoresImpl implements Datastores { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, datastoreName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, datastoreName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + DatastoresCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class DatastoresImpl implements Datastores { resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class DatastoresImpl implements Datastores { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, datastoreName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, datastoreName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body7, + requestBody: Parameters.body4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts index d191cc7f8c2e..5161c0c87142 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Host, HostsListNextOptionalParams, @@ -181,7 +185,7 @@ export class HostsImpl implements Hosts { hostName: string, options?: HostsCreateOptionalParams ): Promise< - PollerLike, HostsCreateResponse> + SimplePollerLike, HostsCreateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -189,7 +193,7 @@ export class HostsImpl implements Hosts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -222,15 +226,18 @@ export class HostsImpl implements Hosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + HostsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -295,14 +302,14 @@ export class HostsImpl implements Hosts { resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,13 +342,13 @@ export class HostsImpl implements Hosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -442,7 +449,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body6, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -488,7 +495,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts deleted file mode 100644 index 22193589fe04..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { HybridIdentityMetadataOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { - HybridIdentityMetadata, - HybridIdentityMetadataListByVmNextOptionalParams, - HybridIdentityMetadataListByVmOptionalParams, - HybridIdentityMetadataListByVmResponse, - HybridIdentityMetadataCreateOptionalParams, - HybridIdentityMetadataCreateResponse, - HybridIdentityMetadataGetOptionalParams, - HybridIdentityMetadataGetResponse, - HybridIdentityMetadataDeleteOptionalParams, - HybridIdentityMetadataListByVmNextResponse -} from "../models"; - -/// -/** Class containing HybridIdentityMetadataOperations operations. */ -export class HybridIdentityMetadataOperationsImpl - implements HybridIdentityMetadataOperations { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class HybridIdentityMetadataOperations class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - public listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByVmPagingAll( - resourceGroupName, - virtualMachineName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options, - settings - ); - } - }; - } - - private async *listByVmPagingPage( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: HybridIdentityMetadataListByVmResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVm( - resourceGroupName, - virtualMachineName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVmNext( - resourceGroupName, - virtualMachineName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVmPagingAll( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options - )) { - yield* page; - } - } - - /** - * Create Or Update HybridIdentityMetadata. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the hybridIdentityMetadata. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - createOperationSpec - ); - } - - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - getOperationSpec - ); - } - - /** - * Implements HybridIdentityMetadata DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - deleteOperationSpec - ); - } - - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - private _listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - listByVmOperationSpec - ); - } - - /** - * ListByVmNext - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param nextLink The nextLink from the previous successful call to the ListByVm method. - * @param options The options parameters. - */ - private _listByVmNext( - resourceGroupName: string, - virtualMachineName: string, - nextLink: string, - options?: HybridIdentityMetadataListByVmNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, nextLink, options }, - listByVmNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadata - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadata - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByVmOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadataList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByVmNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadataList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts index 5adaf861d073..6d0f6f8da9e9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts @@ -7,7 +7,6 @@ */ export * from "./operations"; -export * from "./virtualMachines"; export * from "./resourcePools"; export * from "./clusters"; export * from "./hosts"; @@ -16,6 +15,6 @@ export * from "./vCenters"; export * from "./virtualMachineTemplates"; export * from "./virtualNetworks"; export * from "./inventoryItems"; -export * from "./hybridIdentityMetadataOperations"; -export * from "./machineExtensions"; -export * from "./guestAgents"; +export * from "./virtualMachineInstances"; +export * from "./vmInstanceHybridIdentityMetadataOperations"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts index 77985bb2bee1..dff6631b7437 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts @@ -231,7 +231,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body11, + requestBody: Parameters.body8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts deleted file mode 100644 index 82b9cc99600a..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts +++ /dev/null @@ -1,615 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { MachineExtensions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - MachineExtension, - MachineExtensionsListNextOptionalParams, - MachineExtensionsListOptionalParams, - MachineExtensionsListResponse, - MachineExtensionsCreateOrUpdateOptionalParams, - MachineExtensionsCreateOrUpdateResponse, - MachineExtensionUpdate, - MachineExtensionsUpdateOptionalParams, - MachineExtensionsUpdateResponse, - MachineExtensionsDeleteOptionalParams, - MachineExtensionsGetOptionalParams, - MachineExtensionsGetResponse, - MachineExtensionsListNextResponse -} from "../models"; - -/// -/** Class containing MachineExtensions operations. */ -export class MachineExtensionsImpl implements MachineExtensions { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class MachineExtensions class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, name, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, name, options, settings); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: MachineExtensionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, name, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - name, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - name, - options - )) { - yield* page; - } - } - - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, name, extensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - name, - extensionName, - extensionParameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, name, extensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - name, - extensionName, - extensionParameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, name, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - name, - extensionName, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to get the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, extensionName, options }, - getOperationSpec - ); - } - - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - name: string, - nextLink: string, - options?: MachineExtensionsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - 201: { - bodyMapper: Mappers.MachineExtension - }, - 202: { - bodyMapper: Mappers.MachineExtension - }, - 204: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extensionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - 201: { - bodyMapper: Mappers.MachineExtension - }, - 202: { - bodyMapper: Mappers.MachineExtension - }, - 204: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extensionParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtensionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtensionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts index 6110b916818c..da9f72cc022e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ResourcePool, ResourcePoolsListNextOptionalParams, @@ -181,8 +185,8 @@ export class ResourcePoolsImpl implements ResourcePools { resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ResourcePoolsCreateResponse > > { @@ -192,7 +196,7 @@ export class ResourcePoolsImpl implements ResourcePools { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class ResourcePoolsImpl implements ResourcePools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourcePoolName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourcePoolName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ResourcePoolsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class ResourcePoolsImpl implements ResourcePools { resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class ResourcePoolsImpl implements ResourcePools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourcePoolName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourcePoolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body3, + requestBody: Parameters.body, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts index ef32d63e04fa..d3b5b1030e77 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VCenter, VCentersListNextOptionalParams, @@ -181,8 +185,8 @@ export class VCentersImpl implements VCenters { vcenterName: string, options?: VCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VCentersCreateResponse > > { @@ -192,7 +196,7 @@ export class VCentersImpl implements VCenters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VCentersImpl implements VCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vcenterName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vcenterName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VCentersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VCentersImpl implements VCenters { resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VCentersImpl implements VCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vcenterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vcenterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body8, + requestBody: Parameters.body5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts similarity index 51% rename from sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts rename to sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts index 5afb43fd2e45..2ca59f4a37ab 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts @@ -8,33 +8,38 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { GuestAgents } from "../operationsInterfaces"; +import { VMInstanceGuestAgents } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { GuestAgent, - GuestAgentsListByVmNextOptionalParams, - GuestAgentsListByVmOptionalParams, - GuestAgentsListByVmResponse, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsDeleteOptionalParams, - GuestAgentsListByVmNextResponse + VMInstanceGuestAgentsListNextOptionalParams, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsListResponse, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams, + VMInstanceGuestAgentsDeleteResponse, + VMInstanceGuestAgentsListNextResponse } from "../models"; /// -/** Class containing GuestAgents operations. */ -export class GuestAgentsImpl implements GuestAgents { +/** Class containing VMInstanceGuestAgents operations. */ +export class VMInstanceGuestAgentsImpl implements VMInstanceGuestAgents { private readonly client: AzureArcVMwareManagementServiceAPI; /** - * Initialize a new instance of the class GuestAgents class. + * Initialize a new instance of the class VMInstanceGuestAgents class. * @param client Reference to the service client */ constructor(client: AzureArcVMwareManagementServiceAPI) { @@ -43,20 +48,15 @@ export class GuestAgentsImpl implements GuestAgents { /** * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ - public listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams + public list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByVmPagingAll( - resourceGroupName, - virtualMachineName, - options - ); + const iter = this.listPagingAll(resourceUri, options); return { next() { return iter.next(); @@ -68,42 +68,27 @@ export class GuestAgentsImpl implements GuestAgents { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options, - settings - ); + return this.listPagingPage(resourceUri, options, settings); } }; } - private async *listByVmPagingPage( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams, + private async *listPagingPage( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: GuestAgentsListByVmResponse; + let result: VMInstanceGuestAgentsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByVm( - resourceGroupName, - virtualMachineName, - options - ); + result = await this._list(resourceUri, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByVmNext( - resourceGroupName, - virtualMachineName, - continuationToken, - options - ); + result = await this._listNext(resourceUri, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -111,45 +96,37 @@ export class GuestAgentsImpl implements GuestAgents { } } - private async *listByVmPagingAll( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams + private async *listPagingAll( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options - )) { + for await (const page of this.listPagingPage(resourceUri, options)) { yield* page; } } /** * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginCreate( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, - GuestAgentsCreateResponse + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -182,15 +159,18 @@ export class GuestAgentsImpl implements GuestAgents { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, name, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VMInstanceGuestAgentsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -198,65 +178,56 @@ export class GuestAgentsImpl implements GuestAgents { /** * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - virtualMachineName, - name, - options - ); + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate(resourceUri, options); return poller.pollUntilDone(); } /** * Implements GuestAgent GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ get( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsGetOptionalParams - ): Promise { + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, name, options }, + { resourceUri, options }, getOperationSpec ); } /** * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise, void>> { + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -289,13 +260,16 @@ export class GuestAgentsImpl implements GuestAgents { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, name, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VMInstanceGuestAgentsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -304,59 +278,49 @@ export class GuestAgentsImpl implements GuestAgents { /** * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - name, - options - ); + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); return poller.pollUntilDone(); } /** * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ - private _listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams - ): Promise { + private _list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - listByVmOperationSpec + { resourceUri, options }, + listOperationSpec ); } /** - * ListByVmNext - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param nextLink The nextLink from the previous successful call to the ListByVm method. + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByVmNext( - resourceGroupName: string, - virtualMachineName: string, + private _listNext( + resourceUri: string, nextLink: string, - options?: GuestAgentsListByVmNextOptionalParams - ): Promise { + options?: VMInstanceGuestAgentsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, nextLink, options }, - listByVmNextOperationSpec + { resourceUri, nextLink, options }, + listNextOperationSpec ); } } @@ -365,7 +329,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "PUT", responses: { 200: { @@ -384,22 +348,16 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body13, + requestBody: Parameters.body12, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "GET", responses: { 200: { @@ -410,43 +368,39 @@ const getOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 201: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 202: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 204: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; -const listByVmOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents", httpMethod: "GET", responses: { 200: { @@ -457,16 +411,11 @@ const listByVmOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; -const listByVmNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -480,9 +429,7 @@ const listByVmNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName + Parameters.resourceUri ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts new file mode 100644 index 000000000000..f3b1481ba3eb --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts @@ -0,0 +1,899 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VirtualMachineInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListNextOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesListResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse, + VirtualMachineInstancesListNextResponse +} from "../models"; + +/// +/** Class containing VirtualMachineInstances operations. */ +export class VirtualMachineInstancesImpl implements VirtualMachineInstances { + private readonly client: AzureArcVMwareManagementServiceAPI; + + /** + * Initialize a new instance of the class VirtualMachineInstances class. + * @param client Reference to the service client + */ + constructor(client: AzureArcVMwareManagementServiceAPI) { + this.client = client; + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualMachineInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesRestartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VirtualMachineInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.force, + Parameters.deleteFromHost + ], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts index f4fa0b961f08..69a0878fc8be 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualMachineTemplate, VirtualMachineTemplatesListNextOptionalParams, @@ -181,8 +185,8 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateResponse > > { @@ -192,7 +196,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineTemplatesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body9, + requestBody: Parameters.body6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts deleted file mode 100644 index 0827cbca9c38..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts +++ /dev/null @@ -1,1264 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { VirtualMachines } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - VirtualMachine, - VirtualMachinesListNextOptionalParams, - VirtualMachinesListOptionalParams, - VirtualMachinesListResponse, - VirtualMachinesListByResourceGroupNextOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesListByResourceGroupResponse, - VirtualMachinesAssessPatchesOptionalParams, - VirtualMachinesAssessPatchesResponse, - VirtualMachineInstallPatchesParameters, - VirtualMachinesInstallPatchesOptionalParams, - VirtualMachinesInstallPatchesResponse, - VirtualMachinesCreateOptionalParams, - VirtualMachinesCreateResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams, - VirtualMachinesListNextResponse, - VirtualMachinesListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing VirtualMachines operations. */ -export class VirtualMachinesImpl implements VirtualMachines { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class VirtualMachines class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - public list( - options?: VirtualMachinesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: VirtualMachinesListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualMachinesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - async beginAssessPatches( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesAssessPatchesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, name, options }, - assessPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - async beginAssessPatchesAndWait( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise { - const poller = await this.beginAssessPatches( - resourceGroupName, - name, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - async beginInstallPatches( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesInstallPatchesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, name, installPatchesInput, options }, - installPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - async beginInstallPatchesAndWait( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise { - const poller = await this.beginInstallPatches( - resourceGroupName, - name, - installPatchesInput, - options - ); - return poller.pollUntilDone(); - } - - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Implements virtual machine GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - getOperationSpec - ); - } - - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise { - const poller = await this.beginStart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise { - const poller = await this.beginRestart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - private _list( - options?: VirtualMachinesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualMachinesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The Resource Group Name. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualMachinesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const assessPatchesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 201: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 202: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 204: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const installPatchesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 201: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 202: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 204: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.installPatchesInput, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.force, Parameters.retain], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const startOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/start", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/restart", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts index bfba70f8c546..81550f54e808 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualNetwork, VirtualNetworksListNextOptionalParams, @@ -181,8 +185,8 @@ export class VirtualNetworksImpl implements VirtualNetworks { virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateResponse > > { @@ -192,7 +196,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VirtualNetworksImpl implements VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body10, + requestBody: Parameters.body7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..0df1394cf9e2 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VmInstanceHybridIdentityMetadataOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; +import { + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataListNextOptionalParams, + VmInstanceHybridIdentityMetadataListOptionalParams, + VmInstanceHybridIdentityMetadataListResponse, + VmInstanceHybridIdentityMetadataGetOptionalParams, + VmInstanceHybridIdentityMetadataGetResponse, + VmInstanceHybridIdentityMetadataListNextResponse +} from "../models"; + +/// +/** Class containing VmInstanceHybridIdentityMetadataOperations operations. */ +export class VmInstanceHybridIdentityMetadataOperationsImpl + implements VmInstanceHybridIdentityMetadataOperations { + private readonly client: AzureArcVMwareManagementServiceAPI; + + /** + * Initialize a new instance of the class VmInstanceHybridIdentityMetadataOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureArcVMwareManagementServiceAPI) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VmInstanceHybridIdentityMetadataListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VmInstanceHybridIdentityMetadataListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts index faf01b7f2f6d..8aea19fc6e33 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Cluster, ClustersListOptionalParams, @@ -51,8 +51,8 @@ export interface Clusters { clusterName: string, options?: ClustersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateResponse > >; @@ -99,7 +99,7 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements cluster DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts index a1a38711b1e2..5457e08a69af 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Datastore, DatastoresListOptionalParams, @@ -51,8 +51,8 @@ export interface Datastores { datastoreName: string, options?: DatastoresCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatastoresCreateResponse > >; @@ -99,7 +99,7 @@ export interface Datastores { resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements datastore DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts deleted file mode 100644 index d6119b3a49c4..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - GuestAgent, - GuestAgentsListByVmOptionalParams, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a GuestAgents. */ -export interface GuestAgents { - /** - * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - GuestAgentsCreateResponse - > - >; - /** - * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise; - /** - * Implements GuestAgent GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsGetOptionalParams - ): Promise; - /** - * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise, void>>; - /** - * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts index 101dc6a8237b..69068b6bad55 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Host, HostsListOptionalParams, @@ -49,7 +49,7 @@ export interface Hosts { hostName: string, options?: HostsCreateOptionalParams ): Promise< - PollerLike, HostsCreateResponse> + SimplePollerLike, HostsCreateResponse> >; /** * Create Or Update host. @@ -94,7 +94,7 @@ export interface Hosts { resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements host DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts deleted file mode 100644 index 899c06efe1bf..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - HybridIdentityMetadata, - HybridIdentityMetadataListByVmOptionalParams, - HybridIdentityMetadataCreateOptionalParams, - HybridIdentityMetadataCreateResponse, - HybridIdentityMetadataGetOptionalParams, - HybridIdentityMetadataGetResponse, - HybridIdentityMetadataDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a HybridIdentityMetadataOperations. */ -export interface HybridIdentityMetadataOperations { - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create Or Update HybridIdentityMetadata. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the hybridIdentityMetadata. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataCreateOptionalParams - ): Promise; - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataGetOptionalParams - ): Promise; - /** - * Implements HybridIdentityMetadata DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts index 5adaf861d073..6d0f6f8da9e9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts @@ -7,7 +7,6 @@ */ export * from "./operations"; -export * from "./virtualMachines"; export * from "./resourcePools"; export * from "./clusters"; export * from "./hosts"; @@ -16,6 +15,6 @@ export * from "./vCenters"; export * from "./virtualMachineTemplates"; export * from "./virtualNetworks"; export * from "./inventoryItems"; -export * from "./hybridIdentityMetadataOperations"; -export * from "./machineExtensions"; -export * from "./guestAgents"; +export * from "./virtualMachineInstances"; +export * from "./vmInstanceHybridIdentityMetadataOperations"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts deleted file mode 100644 index c7d8fa7b6b61..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - MachineExtension, - MachineExtensionsListOptionalParams, - MachineExtensionsCreateOrUpdateOptionalParams, - MachineExtensionsCreateOrUpdateResponse, - MachineExtensionUpdate, - MachineExtensionsUpdateOptionalParams, - MachineExtensionsUpdateResponse, - MachineExtensionsDeleteOptionalParams, - MachineExtensionsGetOptionalParams, - MachineExtensionsGetResponse -} from "../models"; - -/// -/** Interface representing a MachineExtensions. */ -export interface MachineExtensions { - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsCreateOrUpdateResponse - > - >; - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise; - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsUpdateResponse - > - >; - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise; - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>>; - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise; - /** - * The operation to get the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsGetOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts index f38af51a4768..e0cac4cdae09 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ResourcePool, ResourcePoolsListOptionalParams, @@ -51,8 +51,8 @@ export interface ResourcePools { resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ResourcePoolsCreateResponse > >; @@ -99,7 +99,7 @@ export interface ResourcePools { resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements resourcePool DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts index 9e64ad5f4f79..9c814367deb9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VCenter, VCentersListOptionalParams, @@ -51,8 +51,8 @@ export interface VCenters { vcenterName: string, options?: VCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VCentersCreateResponse > >; @@ -99,7 +99,7 @@ export interface VCenters { resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements vCenter DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts new file mode 100644 index 000000000000..2e3359c69b21 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GuestAgent, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams, + VMInstanceGuestAgentsDeleteResponse +} from "../models"; + +/// +/** Interface representing a VMInstanceGuestAgents. */ +export interface VMInstanceGuestAgents { + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreate( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse + > + >; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise; + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsDeleteResponse + > + >; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts new file mode 100644 index 000000000000..8a67d2bac737 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts @@ -0,0 +1,205 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineInstances. */ +export interface VirtualMachineInstances { + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + >; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + >; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + >; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + >; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + >; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts index 3ede0b5755fd..c1d47c1f59a3 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineTemplate, VirtualMachineTemplatesListOptionalParams, @@ -51,8 +51,8 @@ export interface VirtualMachineTemplates { virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateResponse > >; @@ -99,7 +99,7 @@ export interface VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements virtual machine template DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts deleted file mode 100644 index 198d86b32801..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - VirtualMachine, - VirtualMachinesListOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesAssessPatchesOptionalParams, - VirtualMachinesAssessPatchesResponse, - VirtualMachineInstallPatchesParameters, - VirtualMachinesInstallPatchesOptionalParams, - VirtualMachinesInstallPatchesResponse, - VirtualMachinesCreateOptionalParams, - VirtualMachinesCreateResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams -} from "../models"; - -/// -/** Interface representing a VirtualMachines. */ -export interface VirtualMachines { - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - list( - options?: VirtualMachinesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - beginAssessPatches( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesAssessPatchesResponse - > - >; - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - beginAssessPatchesAndWait( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise; - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - beginInstallPatches( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesInstallPatchesResponse - > - >; - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - beginInstallPatchesAndWait( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise; - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateResponse - > - >; - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise; - /** - * Implements virtual machine GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise; - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - >; - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise; - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>>; - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise; - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise, void>>; - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise; - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise, void>>; - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise; - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise, void>>; - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts index a777b889ed4f..44465ed20eae 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualNetwork, VirtualNetworksListOptionalParams, @@ -51,8 +51,8 @@ export interface VirtualNetworks { virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateResponse > >; @@ -99,7 +99,7 @@ export interface VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements virtual network DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..994aa7724cb3 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataListOptionalParams, + VmInstanceHybridIdentityMetadataGetOptionalParams, + VmInstanceHybridIdentityMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a VmInstanceHybridIdentityMetadataOperations. */ +export interface VmInstanceHybridIdentityMetadataOperations { + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/tsconfig.json b/sdk/connectedvmware/arm-connectedvmware/tsconfig.json index 4a017261a66a..3e6ae96443f3 100644 --- a/sdk/connectedvmware/arm-connectedvmware/tsconfig.json +++ b/sdk/connectedvmware/arm-connectedvmware/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-connectedvmware": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"