diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 87cd47a1d0ac..5c400208c58b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2554,7 +2554,7 @@ packages: version: 0.0.0 '@rush-temp/ai-text-analytics@file:projects/ai-text-analytics.tgz': - resolution: {integrity: sha512-1jGgJPXpBnqpTnDegMjesgQibCkWWP+sIHe9EH3z+SW5Z3EJ53VljlaafiWwNz+9z+8a+P0lnsC0J07hwnVINQ==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-gkyef86U6fABbjY5iPYkRyjDu+KvYLoGMbZRQ+N6rTvDM8pE8XxZ8ll54rRk0lxqMAO3wHBhuFfAuNgDhhTluw==, tarball: file:projects/ai-text-analytics.tgz} version: 0.0.0 '@rush-temp/ai-translation-document@file:projects/ai-translation-document.tgz': @@ -3390,7 +3390,7 @@ packages: version: 0.0.0 '@rush-temp/arm-scvmm@file:projects/arm-scvmm.tgz': - resolution: {integrity: sha512-9HXMkLY30hJDFTHF4gRnJnGz/7RlK8dzH6IAKTjHrZds1agjqJeA8P71rjM9lT+9OTEjfEuGUj7MbKlrlOp6+w==, tarball: file:projects/arm-scvmm.tgz} + resolution: {integrity: sha512-l+VPqblDJY8JdndYnGJdVTkor9NSqpIzN9QOc05+0Ehpv1eqCWT0iQUCy9UF1IkNHvmXjIoIp0/ref798YUZfg==, tarball: file:projects/arm-scvmm.tgz} version: 0.0.0 '@rush-temp/arm-search@file:projects/arm-search.tgz': @@ -3762,7 +3762,7 @@ packages: version: 0.0.0 '@rush-temp/functions-authentication-events@file:projects/functions-authentication-events.tgz': - resolution: {integrity: sha512-3z+Wn2tFhy1O3WnYtoshPxE8VZmpkx/LCJCQsP1kqYPotgzBWU92XQ1vVex4akjvDMaDiqL5sbs5kfmmDT7LBQ==, tarball: file:projects/functions-authentication-events.tgz} + resolution: {integrity: sha512-SancGMuk0aVOLc2LqvEqXKdkohnaud5TIHxy1D5x/AWaDlA88RCsdWfMwAutVVz972Dpf0v5w88w3pqsTiCAMw==, tarball: file:projects/functions-authentication-events.tgz} version: 0.0.0 '@rush-temp/health-deidentification@file:projects/health-deidentification.tgz': @@ -4018,19 +4018,19 @@ packages: version: 0.0.0 '@rush-temp/quantum-jobs@file:projects/quantum-jobs.tgz': - resolution: {integrity: sha512-zHtPe9OjzXX4THRvBVecPTzBM/VsSsjguLMgSQYk0Uy4Ll4myk/LoUpZZwc9nIblkPCiePJh8270MZO5H6KOOA==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-x6bNUk9vu8zvYVXAVFfol08i1y10LkjNUzJZWK5219WTOFHX0YkDjmZk7ZOEOoqBl9lA+/iBWSEu5ejYUQbYAw==, tarball: file:projects/quantum-jobs.tgz} version: 0.0.0 '@rush-temp/schema-registry-avro@file:projects/schema-registry-avro.tgz': - resolution: {integrity: sha512-pXsOSqgPhJlk4sQdIe5htRBCNPm4HnaZFgtcoEq1wFBJ2rQ/2sVV9YssxvsHBZwjcl+68iRpRMzfHq0xXN7pyg==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-hdHZ0SJ7TRPDoof/ywC1v5P5T4Qtz6npoA4P2yFaNlhXIHEbmpxSS8bdk9t9oBOe5+wTx1Syz1CWbPNhpoGjdQ==, tarball: file:projects/schema-registry-avro.tgz} version: 0.0.0 '@rush-temp/schema-registry-json@file:projects/schema-registry-json.tgz': - resolution: {integrity: sha512-ZwFbFtIFKLrC3h+7A7Ct8dPokgFmUaCKXsxIIFETiJCMcoBGxAvvAmP59/E5S8l4AgeE7RcQuw4FdN/ySLbwBg==, tarball: file:projects/schema-registry-json.tgz} + resolution: {integrity: sha512-d/3GcklBP2GOnxwkWrBmQJrpJsEOTZzK7cqlzXavChVF2HfOy/a+DpNfF8APLp43f7PVpXeqkToFHXSkdEG9bg==, tarball: file:projects/schema-registry-json.tgz} version: 0.0.0 '@rush-temp/schema-registry@file:projects/schema-registry.tgz': - resolution: {integrity: sha512-N8FsEoIwUNgbuQGPFtJ90JTn7qYPpk2HD7AmhgGD5SlLS6Im9t8cc+/5A74nzrSKdPiko7p8Ht2LWSGzI6WWxw==, tarball: file:projects/schema-registry.tgz} + resolution: {integrity: sha512-oI5hZC61oj/rnBpFxm7PdT9EefXIWFNZF5wQfFOjKL75XUP4TXpr7cRU5G/jLYM7CDYOrQVPgrRZN0iuNFy0VQ==, tarball: file:projects/schema-registry.tgz} version: 0.0.0 '@rush-temp/search-documents@file:projects/search-documents.tgz': @@ -17427,14 +17427,15 @@ snapshots: '@rush-temp/arm-scvmm@file:projects/arm-scvmm.tgz(@types/debug@4.1.12)(msw@2.7.2(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(yaml@2.7.0)': dependencies: - '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.50.1(@types/node@18.19.76) '@types/node': 18.19.76 - '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.7.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) + '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.6.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) '@vitest/coverage-istanbul': 3.0.6(vitest@3.0.6) dotenv: 16.4.7 + eslint: 9.21.0 playwright: 1.50.1 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.6.3 vitest: 3.0.6(@types/debug@4.1.12)(@types/node@18.19.76)(@vitest/browser@3.0.6)(msw@2.7.2(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - '@edge-runtime/vm' diff --git a/sdk/scvmm/arm-scvmm/CHANGELOG.md b/sdk/scvmm/arm-scvmm/CHANGELOG.md deleted file mode 100644 index 5b01b392c183..000000000000 --- a/sdk/scvmm/arm-scvmm/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Release History - -## 1.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0 (2024-06-25) - -### Features Added - -The package of @azure/arm-scvmm is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/scvmm/arm-scvmm/LICENSE b/sdk/scvmm/arm-scvmm/LICENSE index b2f52a2bad4e..2ad4de7b17f0 100644 --- a/sdk/scvmm/arm-scvmm/LICENSE +++ b/sdk/scvmm/arm-scvmm/LICENSE @@ -1,6 +1,6 @@ -Copyright (c) Microsoft Corporation. +The MIT License (MIT) -MIT License +Copyright (c) 2025 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 @@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/README.md b/sdk/scvmm/arm-scvmm/README.md index 905343965710..b664424fcd29 100644 --- a/sdk/scvmm/arm-scvmm/README.md +++ b/sdk/scvmm/arm-scvmm/README.md @@ -4,10 +4,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f The Microsoft.ScVmm Rest API spec. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-scvmm) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-scvmm) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-scvmm) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview) ## Getting started @@ -30,7 +31,7 @@ Install the Azure ScVmm client library for JavaScript with `npm`: npm install @azure/arm-scvmm ``` -### Create and authenticate a `ScVmm` +### Create and authenticate a `ScVmmClient` To create a client object to access the Azure ScVmm API, you will need the `endpoint` of your Azure ScVmm resource and a `credential`. The Azure ScVmm client can use Azure Active Directory credentials to authenticate. You can find the endpoint for your Azure ScVmm resource in the [Azure Portal][azure_portal]. @@ -44,43 +45,34 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ScVmm** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). -Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. - -```ts snippet:ReadmeSampleCreateClient_Node -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; +```javascript +const { ScVmmClient } = require("@azure/arm-scvmm"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new ScVmm(new DefaultAzureCredential(), subscriptionId); +const client = new ScVmmClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new ScVmmClient(credential, subscriptionId); ``` -For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. - -```ts snippet:ReadmeSampleCreateClient_Browser -import { InteractiveBrowserCredential } from "@azure/identity"; -import { ScVmm } from "@azure/arm-scvmm"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", -}); -const client = new ScVmm(credential, subscriptionId); -``` ### JavaScript Bundle - To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts -### ScVmm +### ScVmmClient -`ScVmm` is the primary interface for developers using the Azure ScVmm client library. Explore the methods on this client object to understand the different features of the Azure ScVmm service that you can access. +`ScVmmClient` is the primary interface for developers using the Azure ScVmm client library. Explore the methods on this client object to understand the different features of the Azure ScVmm service that you can access. ## Troubleshooting @@ -88,17 +80,13 @@ To use this client library in the browser, first you need to use a bundler. For Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: -```ts snippet:SetLogLevel -import { setLogLevel } from "@azure/logger"; - +```javascript +const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); ``` For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). -## Next steps - -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. ## Contributing @@ -108,10 +96,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/scvmm/arm-scvmm/_meta.json b/sdk/scvmm/arm-scvmm/_meta.json deleted file mode 100644 index 79a83344421d..000000000000 --- a/sdk/scvmm/arm-scvmm/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "768c1f32bbfdcea80bdadf92dc2fba2c114c2dda", - "readme": "specification/scvmm/resource-manager/readme.md", - "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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\scvmm\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.23" -} \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/assets.json b/sdk/scvmm/arm-scvmm/assets.json deleted file mode 100644 index 9a7b719e9037..000000000000 --- a/sdk/scvmm/arm-scvmm/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/scvmm/arm-scvmm", - "Tag": "js/scvmm/arm-scvmm_f8729cd47c" -} diff --git a/sdk/scvmm/arm-scvmm/eslint.config.mjs b/sdk/scvmm/arm-scvmm/eslint.config.mjs new file mode 100644 index 000000000000..a9fcfbef11ff --- /dev/null +++ b/sdk/scvmm/arm-scvmm/eslint.config.mjs @@ -0,0 +1,16 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/scvmm/arm-scvmm/package.json b/sdk/scvmm/arm-scvmm/package.json index 3bcb4ba25f8f..7e07e3e8fdaf 100644 --- a/sdk/scvmm/arm-scvmm/package.json +++ b/sdk/scvmm/arm-scvmm/package.json @@ -1,144 +1,113 @@ { "name": "@azure/arm-scvmm", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for ScVmm.", "version": "1.0.1", + "description": "A generated SDK for ScVmmClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.19.0", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/scVmmContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.19.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", - "@azure/logger": "^1.1.4", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.7.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.5", - "@vitest/coverage-istanbul": "^3.0.5", + "@vitest/browser": "^3.0.6", + "@vitest/coverage-istanbul": "^3.0.6", "dotenv": "^16.0.0", + "eslint": "^9.9.0", "playwright": "^1.50.1", - "typescript": "~5.7.2", - "vitest": "^3.0.5" + "typescript": "~5.6.2", + "vitest": "^3.0.6" }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", + "build:samples": "echo skipped", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "dev-tool run test:vitest --esm", - "lint": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "dev-tool run update-snippets" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/scVmm.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview" - }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false + "update-snippets": "echo skipped" }, "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - } + "react-native": "./dist/react-native/index.js" } diff --git a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md b/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md deleted file mode 100644 index e8c1fb3c5f77..000000000000 --- a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md +++ /dev/null @@ -1,1571 +0,0 @@ -## API Report File for "@azure/arm-scvmm" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -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 { SimplePollerLike } from '@azure/core-lro'; - -// @public -export type ActionType = string; - -// @public -export type AllocationMethod = string; - -// @public -export interface AvailabilitySet extends TrackedResource { - extendedLocation: ExtendedLocation; - properties?: AvailabilitySetProperties; -} - -// @public -export interface AvailabilitySetListItem { - id?: string; - name?: string; -} - -// @public -export interface AvailabilitySetListResult { - readonly nextLink?: string; - value: AvailabilitySet[]; -} - -// @public -export interface AvailabilitySetProperties { - availabilitySetName?: string; - readonly provisioningState?: ProvisioningState; - vmmServerId?: string; -} - -// @public -export interface AvailabilitySets { - beginCreateOrUpdate(resourceGroupName: string, availabilitySetResourceName: string, resource: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise, AvailabilitySetsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, availabilitySetResourceName: string, resource: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise, AvailabilitySetsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, availabilitySetResourceName: string, properties: AvailabilitySetTagsUpdate, options?: AvailabilitySetsUpdateOptionalParams): Promise, AvailabilitySetsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, availabilitySetResourceName: string, properties: AvailabilitySetTagsUpdate, options?: AvailabilitySetsUpdateOptionalParams): Promise; - get(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AvailabilitySetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AvailabilitySetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AvailabilitySetsCreateOrUpdateHeaders { - azureAsyncOperation?: string; - retryAfter?: number; -} - -// @public -export interface AvailabilitySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; - -// @public -export interface AvailabilitySetsDeleteHeaders { - azureAsyncOperation?: string; - location?: string; - retryAfter?: number; -} - -// @public -export interface AvailabilitySetsDeleteOptionalParams extends coreClient.OperationOptions { - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AvailabilitySetsDeleteResponse = AvailabilitySetsDeleteHeaders; - -// @public -export interface AvailabilitySetsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailabilitySetsGetResponse = AvailabilitySet; - -// @public -export interface AvailabilitySetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailabilitySetsListByResourceGroupNextResponse = AvailabilitySetListResult; - -// @public -export interface AvailabilitySetsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailabilitySetsListByResourceGroupResponse = AvailabilitySetListResult; - -// @public -export interface AvailabilitySetsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult; - -// @public -export interface AvailabilitySetsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; - -// @public -export interface AvailabilitySetsUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface AvailabilitySetsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AvailabilitySetsUpdateResponse = AvailabilitySet; - -// @public -export interface AvailabilitySetTagsUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface Checkpoint { - checkpointId?: string; - description?: string; - name?: string; - parentCheckpointId?: string; -} - -// @public -export interface Cloud extends TrackedResource { - extendedLocation: ExtendedLocation; - properties?: CloudProperties; -} - -// @public -export interface CloudCapacity { - readonly cpuCount?: number; - readonly memoryMB?: number; - readonly vmCount?: number; -} - -// @public -export interface CloudInventoryItem extends InventoryItemProperties { - inventoryType: "Cloud"; -} - -// @public -export interface CloudListResult { - readonly nextLink?: string; - value: Cloud[]; -} - -// @public -export interface CloudProperties { - readonly cloudCapacity?: CloudCapacity; - readonly cloudName?: string; - inventoryItemId?: string; - readonly provisioningState?: ProvisioningState; - readonly storageQosPolicies?: StorageQosPolicy[]; - uuid?: string; - vmmServerId?: string; -} - -// @public -export interface Clouds { - beginCreateOrUpdate(resourceGroupName: string, cloudResourceName: string, resource: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise, CloudsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, cloudResourceName: string, resource: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, cloudResourceName: string, options?: CloudsDeleteOptionalParams): Promise, CloudsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, cloudResourceName: string, options?: CloudsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, cloudResourceName: string, properties: CloudTagsUpdate, options?: CloudsUpdateOptionalParams): Promise, CloudsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, cloudResourceName: string, properties: CloudTagsUpdate, options?: CloudsUpdateOptionalParams): Promise; - get(resourceGroupName: string, cloudResourceName: string, options?: CloudsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: CloudsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: CloudsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface CloudsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface CloudsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type CloudsCreateOrUpdateResponse = Cloud; - -// @public -export interface CloudsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface CloudsDeleteOptionalParams extends coreClient.OperationOptions { - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type CloudsDeleteResponse = CloudsDeleteHeaders; - -// @public -export interface CloudsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudsGetResponse = Cloud; - -// @public -export interface CloudsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudsListByResourceGroupNextResponse = CloudListResult; - -// @public -export interface CloudsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudsListByResourceGroupResponse = CloudListResult; - -// @public -export interface CloudsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudsListBySubscriptionNextResponse = CloudListResult; - -// @public -export interface CloudsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudsListBySubscriptionResponse = CloudListResult; - -// @public -export interface CloudsUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface CloudsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type CloudsUpdateResponse = Cloud; - -// @public -export interface CloudTagsUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export type CreatedByType = string; - -// @public -export type CreateDiffDisk = string; - -// @public -export type DeleteFromHost = string; - -// @public -export type DynamicMemoryEnabled = string; - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorResponse { - error?: ErrorDetail; -} - -// @public -export interface ExtendedLocation { - name?: string; - type?: string; -} - -// @public -export type ForceDelete = string; - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface GuestAgent extends ProxyResource { - properties?: GuestAgentProperties; -} - -// @public -export interface GuestAgentListResult { - readonly nextLink?: string; - value: GuestAgent[]; -} - -// @public -export interface GuestAgentProperties { - credentials?: GuestCredential; - readonly customResourceName?: string; - httpProxyConfig?: HttpProxyConfiguration; - provisioningAction?: ProvisioningAction; - readonly provisioningState?: ProvisioningState; - readonly status?: string; - readonly uuid?: string; -} - -// @public -export interface GuestAgents { - beginCreate(resourceUri: string, resource: GuestAgent, options?: GuestAgentsCreateOptionalParams): Promise, GuestAgentsCreateResponse>>; - beginCreateAndWait(resourceUri: string, resource: GuestAgent, options?: GuestAgentsCreateOptionalParams): Promise; - delete(resourceUri: string, options?: GuestAgentsDeleteOptionalParams): Promise; - get(resourceUri: string, options?: GuestAgentsGetOptionalParams): Promise; - listByVirtualMachineInstance(resourceUri: string, options?: GuestAgentsListByVirtualMachineInstanceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GuestAgentsCreateHeaders { - retryAfter?: number; -} - -// @public -export interface GuestAgentsCreateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GuestAgentsCreateResponse = GuestAgent; - -// @public -export interface GuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GuestAgentsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsGetResponse = GuestAgent; - -// @public -export interface GuestAgentsListByVirtualMachineInstanceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVirtualMachineInstanceNextResponse = GuestAgentListResult; - -// @public -export interface GuestAgentsListByVirtualMachineInstanceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVirtualMachineInstanceResponse = GuestAgentListResult; - -// @public -export interface GuestCredential { - password: string; - username: string; -} - -// @public -export interface HardwareProfile { - cpuCount?: number; - dynamicMemoryEnabled?: DynamicMemoryEnabled; - dynamicMemoryMaxMB?: number; - dynamicMemoryMinMB?: number; - readonly isHighlyAvailable?: IsHighlyAvailable; - limitCpuForMigration?: LimitCpuForMigration; - memoryMB?: number; -} - -// @public -export interface HardwareProfileUpdate { - cpuCount?: number; - dynamicMemoryEnabled?: DynamicMemoryEnabled; - dynamicMemoryMaxMB?: number; - dynamicMemoryMinMB?: number; - limitCpuForMigration?: LimitCpuForMigration; - memoryMB?: number; -} - -// @public -export interface HttpProxyConfiguration { - httpsProxy?: string; -} - -// @public -export interface InfrastructureProfile { - biosGuid?: string; - readonly checkpoints?: Checkpoint[]; - checkpointType?: string; - cloudId?: string; - generation?: number; - inventoryItemId?: string; - readonly lastRestoredVmCheckpoint?: Checkpoint; - templateId?: string; - uuid?: string; - vmmServerId?: string; - vmName?: string; -} - -// @public -export interface InfrastructureProfileUpdate { - checkpointType?: string; -} - -// @public -export interface InventoryItem extends ProxyResource { - kind?: string; - properties?: InventoryItemPropertiesUnion; -} - -// @public -export interface InventoryItemDetails { - inventoryItemId?: string; - inventoryItemName?: string; -} - -// @public -export interface InventoryItemListResult { - readonly nextLink?: string; - value: InventoryItem[]; -} - -// @public -export interface InventoryItemProperties { - readonly inventoryItemName?: string; - inventoryType: "Cloud" | "VirtualMachine" | "VirtualMachineTemplate" | "VirtualNetwork"; - readonly managedResourceId?: string; - readonly provisioningState?: ProvisioningState; - readonly uuid?: string; -} - -// @public (undocumented) -export type InventoryItemPropertiesUnion = InventoryItemProperties | CloudInventoryItem | VirtualMachineInventoryItem | VirtualMachineTemplateInventoryItem | VirtualNetworkInventoryItem; - -// @public -export interface InventoryItems { - create(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, resource: InventoryItem, options?: InventoryItemsCreateOptionalParams): Promise; - delete(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, options?: InventoryItemsDeleteOptionalParams): Promise; - get(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, options?: InventoryItemsGetOptionalParams): Promise; - listByVmmServer(resourceGroupName: string, vmmServerName: string, options?: InventoryItemsListByVmmServerOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface InventoryItemsCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InventoryItemsCreateResponse = InventoryItem; - -// @public -export interface InventoryItemsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface InventoryItemsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InventoryItemsGetResponse = InventoryItem; - -// @public -export interface InventoryItemsListByVmmServerNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InventoryItemsListByVmmServerNextResponse = InventoryItemListResult; - -// @public -export interface InventoryItemsListByVmmServerOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type InventoryItemsListByVmmServerResponse = InventoryItemListResult; - -// @public -export type InventoryType = string; - -// @public -export type IsCustomizable = string; - -// @public -export type IsHighlyAvailable = string; - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownAllocationMethod { - Dynamic = "Dynamic", - Static = "Static" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownCreateDiffDisk { - False = "false", - True = "true" -} - -// @public -export enum KnownDeleteFromHost { - False = "false", - True = "true" -} - -// @public -export enum KnownDynamicMemoryEnabled { - False = "false", - True = "true" -} - -// @public -export enum KnownForceDelete { - False = "false", - True = "true" -} - -// @public -export enum KnownInventoryType { - Cloud = "Cloud", - VirtualMachine = "VirtualMachine", - VirtualMachineTemplate = "VirtualMachineTemplate", - VirtualNetwork = "VirtualNetwork" -} - -// @public -export enum KnownIsCustomizable { - False = "false", - True = "true" -} - -// @public -export enum KnownIsHighlyAvailable { - False = "false", - True = "true" -} - -// @public -export enum KnownLimitCpuForMigration { - False = "false", - True = "true" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export enum KnownOsType { - Linux = "Linux", - Other = "Other", - Windows = "Windows" -} - -// @public -export enum KnownProvisioningAction { - Install = "install", - Repair = "repair", - Uninstall = "uninstall" -} - -// @public -export enum KnownProvisioningState { - Accepted = "Accepted", - Canceled = "Canceled", - Created = "Created", - Deleting = "Deleting", - Failed = "Failed", - Provisioning = "Provisioning", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownSkipShutdown { - False = "false", - True = "true" -} - -// @public -export type LimitCpuForMigration = string; - -// @public -export interface NetworkInterface { - readonly displayName?: string; - readonly ipv4Addresses?: string[]; - ipv4AddressType?: AllocationMethod; - readonly ipv6Addresses?: string[]; - ipv6AddressType?: AllocationMethod; - macAddress?: string; - macAddressType?: AllocationMethod; - name?: string; - readonly networkName?: string; - nicId?: string; - virtualNetworkId?: string; -} - -// @public -export interface NetworkInterfaceUpdate { - ipv4AddressType?: AllocationMethod; - ipv6AddressType?: AllocationMethod; - macAddress?: string; - macAddressType?: AllocationMethod; - name?: string; - nicId?: string; - virtualNetworkId?: string; -} - -// @public -export interface NetworkProfile { - networkInterfaces?: NetworkInterface[]; -} - -// @public -export interface NetworkProfileUpdate { - networkInterfaces?: NetworkInterfaceUpdate[]; -} - -// @public -export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; -} - -// @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} - -// @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - -// @public -export type Origin = string; - -// @public -export interface OsProfileForVmInstance { - adminPassword?: string; - computerName?: string; - readonly osSku?: string; - readonly osType?: OsType; - readonly osVersion?: string; -} - -// @public -export type OsType = string; - -// @public -export type ProvisioningAction = string; - -// @public -export type ProvisioningState = string; - -// @public -export interface ProxyResource extends Resource { -} - -// @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public (undocumented) -export class ScVmm extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ScVmmOptionalParams); - constructor(credentials: coreAuth.TokenCredential, options?: ScVmmOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - availabilitySets: AvailabilitySets; - // (undocumented) - clouds: Clouds; - // (undocumented) - guestAgents: GuestAgents; - // (undocumented) - inventoryItems: InventoryItems; - // (undocumented) - operations: Operations; - // (undocumented) - subscriptionId?: string; - // (undocumented) - virtualMachineInstances: VirtualMachineInstances; - // (undocumented) - virtualMachineTemplates: VirtualMachineTemplates; - // (undocumented) - virtualNetworks: VirtualNetworks; - // (undocumented) - vmInstanceHybridIdentityMetadatas: VmInstanceHybridIdentityMetadatas; - // (undocumented) - vmmServers: VmmServers; -} - -// @public -export interface ScVmmOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} - -// @public -export type SkipShutdown = string; - -// @public -export interface StopVirtualMachineOptions { - skipShutdown?: SkipShutdown; -} - -// @public -export interface StorageProfile { - disks?: VirtualDisk[]; -} - -// @public -export interface StorageProfileUpdate { - disks?: VirtualDiskUpdate[]; -} - -// @public -export interface StorageQosPolicy { - bandwidthLimit?: number; - id?: string; - iopsMaximum?: number; - iopsMinimum?: number; - name?: string; - policyId?: string; -} - -// @public -export interface StorageQosPolicyDetails { - id?: string; - name?: string; -} - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VirtualDisk { - bus?: number; - busType?: string; - createDiffDisk?: CreateDiffDisk; - diskId?: string; - diskSizeGB?: number; - readonly displayName?: string; - lun?: number; - readonly maxDiskSizeGB?: number; - name?: string; - storageQosPolicy?: StorageQosPolicyDetails; - templateDiskId?: string; - readonly vhdFormatType?: string; - vhdType?: string; - readonly volumeType?: string; -} - -// @public -export interface VirtualDiskUpdate { - bus?: number; - busType?: string; - diskId?: string; - diskSizeGB?: number; - lun?: number; - name?: string; - storageQosPolicy?: StorageQosPolicyDetails; - vhdType?: string; -} - -// @public -export interface VirtualMachineCreateCheckpoint { - description?: string; - name?: string; -} - -// @public -export interface VirtualMachineDeleteCheckpoint { - id?: string; -} - -// @public -export interface VirtualMachineInstance extends ProxyResource { - extendedLocation: ExtendedLocation; - properties?: VirtualMachineInstanceProperties; -} - -// @public -export interface VirtualMachineInstanceListResult { - readonly nextLink?: string; - value: VirtualMachineInstance[]; -} - -// @public -export interface VirtualMachineInstanceProperties { - availabilitySets?: AvailabilitySetListItem[]; - hardwareProfile?: HardwareProfile; - infrastructureProfile?: InfrastructureProfile; - networkProfile?: NetworkProfile; - osProfile?: OsProfileForVmInstance; - readonly powerState?: string; - readonly provisioningState?: ProvisioningState; - storageProfile?: StorageProfile; -} - -// @public -export interface VirtualMachineInstances { - beginCreateCheckpoint(resourceUri: string, body: VirtualMachineCreateCheckpoint, options?: VirtualMachineInstancesCreateCheckpointOptionalParams): Promise, VirtualMachineInstancesCreateCheckpointResponse>>; - beginCreateCheckpointAndWait(resourceUri: string, body: VirtualMachineCreateCheckpoint, options?: VirtualMachineInstancesCreateCheckpointOptionalParams): Promise; - beginCreateOrUpdate(resourceUri: string, resource: VirtualMachineInstance, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise, VirtualMachineInstancesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceUri: string, resource: VirtualMachineInstance, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise, VirtualMachineInstancesDeleteResponse>>; - beginDeleteAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise; - beginDeleteCheckpoint(resourceUri: string, body: VirtualMachineDeleteCheckpoint, options?: VirtualMachineInstancesDeleteCheckpointOptionalParams): Promise, VirtualMachineInstancesDeleteCheckpointResponse>>; - beginDeleteCheckpointAndWait(resourceUri: string, body: VirtualMachineDeleteCheckpoint, options?: VirtualMachineInstancesDeleteCheckpointOptionalParams): Promise; - beginRestart(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise, VirtualMachineInstancesRestartResponse>>; - beginRestartAndWait(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise; - beginRestoreCheckpoint(resourceUri: string, body: VirtualMachineRestoreCheckpoint, options?: VirtualMachineInstancesRestoreCheckpointOptionalParams): Promise, VirtualMachineInstancesRestoreCheckpointResponse>>; - beginRestoreCheckpointAndWait(resourceUri: string, body: VirtualMachineRestoreCheckpoint, options?: VirtualMachineInstancesRestoreCheckpointOptionalParams): Promise; - beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; - beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; - beginStop(resourceUri: string, body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; - beginStopAndWait(resourceUri: string, body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams): Promise; - beginUpdate(resourceUri: string, properties: VirtualMachineInstanceUpdate, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; - beginUpdateAndWait(resourceUri: string, properties: VirtualMachineInstanceUpdate, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; - get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; - list(resourceUri: string, options?: VirtualMachineInstancesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualMachineInstancesCreateCheckpointHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesCreateCheckpointOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesCreateCheckpointResponse = VirtualMachineInstancesCreateCheckpointHeaders; - -// @public -export interface VirtualMachineInstancesCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; - -// @public -export interface VirtualMachineInstancesDeleteCheckpointHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesDeleteCheckpointOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesDeleteCheckpointResponse = VirtualMachineInstancesDeleteCheckpointHeaders; - -// @public -export interface VirtualMachineInstancesDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { - deleteFromHost?: DeleteFromHost; - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; - -// @public -export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; - -// @public -export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; - -// @public -export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; - -// @public -export interface VirtualMachineInstancesRestartHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; - -// @public -export interface VirtualMachineInstancesRestoreCheckpointHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesRestoreCheckpointOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesRestoreCheckpointResponse = VirtualMachineInstancesRestoreCheckpointHeaders; - -// @public -export interface VirtualMachineInstancesStartHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; - -// @public -export interface VirtualMachineInstancesStopHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; - -// @public -export interface VirtualMachineInstancesUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; - -// @public -export interface VirtualMachineInstanceUpdate { - properties?: VirtualMachineInstanceUpdateProperties; -} - -// @public -export interface VirtualMachineInstanceUpdateProperties { - availabilitySets?: AvailabilitySetListItem[]; - hardwareProfile?: HardwareProfileUpdate; - infrastructureProfile?: InfrastructureProfileUpdate; - networkProfile?: NetworkProfileUpdate; - storageProfile?: StorageProfileUpdate; -} - -// @public -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - readonly biosGuid?: string; - cloud?: InventoryItemDetails; - inventoryType: "VirtualMachine"; - ipAddresses?: string[]; - readonly managedMachineResourceId?: string; - readonly osName?: string; - readonly osType?: OsType; - readonly osVersion?: string; - readonly powerState?: string; -} - -// @public -export interface VirtualMachineRestoreCheckpoint { - id?: string; -} - -// @public -export interface VirtualMachineTemplate extends TrackedResource { - extendedLocation: ExtendedLocation; - properties?: VirtualMachineTemplateProperties; -} - -// @public -export interface VirtualMachineTemplateInventoryItem extends InventoryItemProperties { - readonly cpuCount?: number; - inventoryType: "VirtualMachineTemplate"; - readonly memoryMB?: number; - readonly osName?: string; - readonly osType?: OsType; -} - -// @public -export interface VirtualMachineTemplateListResult { - readonly nextLink?: string; - value: VirtualMachineTemplate[]; -} - -// @public -export interface VirtualMachineTemplateProperties { - readonly computerName?: string; - readonly cpuCount?: number; - readonly disks?: VirtualDisk[]; - readonly dynamicMemoryEnabled?: DynamicMemoryEnabled; - readonly dynamicMemoryMaxMB?: number; - readonly dynamicMemoryMinMB?: number; - readonly generation?: number; - inventoryItemId?: string; - readonly isCustomizable?: IsCustomizable; - readonly isHighlyAvailable?: IsHighlyAvailable; - readonly limitCpuForMigration?: LimitCpuForMigration; - readonly memoryMB?: number; - readonly networkInterfaces?: NetworkInterface[]; - readonly osName?: string; - readonly osType?: OsType; - readonly provisioningState?: ProvisioningState; - uuid?: string; - vmmServerId?: string; -} - -// @public -export interface VirtualMachineTemplates { - beginCreateOrUpdate(resourceGroupName: string, virtualMachineTemplateName: string, resource: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams): Promise, VirtualMachineTemplatesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, resource: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, VirtualMachineTemplatesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineTemplateName: string, properties: VirtualMachineTemplateTagsUpdate, options?: VirtualMachineTemplatesUpdateOptionalParams): Promise, VirtualMachineTemplatesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, properties: VirtualMachineTemplateTagsUpdate, options?: VirtualMachineTemplatesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VirtualMachineTemplatesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VirtualMachineTemplatesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualMachineTemplatesCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineTemplatesCreateOrUpdateResponse = VirtualMachineTemplate; - -// @public -export interface VirtualMachineTemplatesDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineTemplatesDeleteOptionalParams extends coreClient.OperationOptions { - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineTemplatesDeleteResponse = VirtualMachineTemplatesDeleteHeaders; - -// @public -export interface VirtualMachineTemplatesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineTemplatesGetResponse = VirtualMachineTemplate; - -// @public -export interface VirtualMachineTemplatesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineTemplatesListByResourceGroupNextResponse = VirtualMachineTemplateListResult; - -// @public -export interface VirtualMachineTemplatesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineTemplatesListByResourceGroupResponse = VirtualMachineTemplateListResult; - -// @public -export interface VirtualMachineTemplatesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineTemplatesListBySubscriptionNextResponse = VirtualMachineTemplateListResult; - -// @public -export interface VirtualMachineTemplatesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachineTemplatesListBySubscriptionResponse = VirtualMachineTemplateListResult; - -// @public -export interface VirtualMachineTemplatesUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; - -// @public -export interface VirtualMachineTemplateTagsUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VirtualNetwork extends TrackedResource { - extendedLocation: ExtendedLocation; - properties?: VirtualNetworkProperties; -} - -// @public -export interface VirtualNetworkInventoryItem extends InventoryItemProperties { - inventoryType: "VirtualNetwork"; -} - -// @public -export interface VirtualNetworkListResult { - readonly nextLink?: string; - value: VirtualNetwork[]; -} - -// @public -export interface VirtualNetworkProperties { - inventoryItemId?: string; - readonly networkName?: string; - readonly provisioningState?: ProvisioningState; - uuid?: string; - vmmServerId?: string; -} - -// @public -export interface VirtualNetworks { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, resource: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, resource: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, VirtualNetworksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualNetworkName: string, properties: VirtualNetworkTagsUpdate, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, properties: VirtualNetworkTagsUpdate, options?: VirtualNetworksUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VirtualNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualNetworksCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; - -// @public -export interface VirtualNetworksDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; - -// @public -export interface VirtualNetworksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksGetResponse = VirtualNetwork; - -// @public -export interface VirtualNetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListByResourceGroupNextResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListByResourceGroupResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListBySubscriptionNextResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualNetworksListBySubscriptionResponse = VirtualNetworkListResult; - -// @public -export interface VirtualNetworksUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VirtualNetworksUpdateResponse = VirtualNetwork; - -// @public -export interface VirtualNetworkTagsUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VmInstanceHybridIdentityMetadata extends ProxyResource { - properties?: VmInstanceHybridIdentityMetadataProperties; -} - -// @public -export interface VmInstanceHybridIdentityMetadataListResult { - readonly nextLink?: string; - value: VmInstanceHybridIdentityMetadata[]; -} - -// @public -export interface VmInstanceHybridIdentityMetadataProperties { - readonly provisioningState?: ProvisioningState; - publicKey?: string; - resourceUid?: string; -} - -// @public -export interface VmInstanceHybridIdentityMetadatas { - get(resourceUri: string, options?: VmInstanceHybridIdentityMetadatasGetOptionalParams): Promise; - listByVirtualMachineInstance(resourceUri: string, options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VmInstanceHybridIdentityMetadatasGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmInstanceHybridIdentityMetadatasGetResponse = VmInstanceHybridIdentityMetadata; - -// @public -export interface VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextResponse = VmInstanceHybridIdentityMetadataListResult; - -// @public -export interface VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceResponse = VmInstanceHybridIdentityMetadataListResult; - -// @public -export interface VmmCredential { - password?: string; - username?: string; -} - -// @public -export interface VmmServer extends TrackedResource { - extendedLocation: ExtendedLocation; - properties?: VmmServerProperties; -} - -// @public -export interface VmmServerListResult { - readonly nextLink?: string; - value: VmmServer[]; -} - -// @public -export interface VmmServerProperties { - readonly connectionStatus?: string; - credentials?: VmmCredential; - readonly errorMessage?: string; - fqdn: string; - port?: number; - readonly provisioningState?: ProvisioningState; - readonly uuid?: string; - readonly version?: string; -} - -// @public -export interface VmmServers { - beginCreateOrUpdate(resourceGroupName: string, vmmServerName: string, resource: VmmServer, options?: VmmServersCreateOrUpdateOptionalParams): Promise, VmmServersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, vmmServerName: string, resource: VmmServer, options?: VmmServersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise, VmmServersDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmmServerName: string, properties: VmmServerTagsUpdate, options?: VmmServersUpdateOptionalParams): Promise, VmmServersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, vmmServerName: string, properties: VmmServerTagsUpdate, options?: VmmServersUpdateOptionalParams): Promise; - get(resourceGroupName: string, vmmServerName: string, options?: VmmServersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VmmServersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VmmServersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VmmServersCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface VmmServersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VmmServersCreateOrUpdateResponse = VmmServer; - -// @public -export interface VmmServersDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VmmServersDeleteOptionalParams extends coreClient.OperationOptions { - force?: ForceDelete; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VmmServersDeleteResponse = VmmServersDeleteHeaders; - -// @public -export interface VmmServersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmmServersGetResponse = VmmServer; - -// @public -export interface VmmServersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmmServersListByResourceGroupNextResponse = VmmServerListResult; - -// @public -export interface VmmServersListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmmServersListByResourceGroupResponse = VmmServerListResult; - -// @public -export interface VmmServersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmmServersListBySubscriptionNextResponse = VmmServerListResult; - -// @public -export interface VmmServersListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VmmServersListBySubscriptionResponse = VmmServerListResult; - -// @public -export interface VmmServersUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VmmServersUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type VmmServersUpdateResponse = VmmServer; - -// @public -export interface VmmServerTagsUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/scvmm/arm-scvmm/sample.env b/sdk/scvmm/arm-scvmm/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/scvmm/arm-scvmm/sample.env +++ b/sdk/scvmm/arm-scvmm/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsCreateOrUpdateSample.ts deleted file mode 100644 index baae813af0ad..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,77 +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 type { AvailabilitySet } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const resource: AvailabilitySet = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "jelevilan", - properties: { - availabilitySetName: "njrpftunzo", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key5701: "cldtxloqh" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MinimumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "_"; - const resource: AvailabilitySet = { - extendedLocation: {}, - location: "jelevilan", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await availabilitySetsCreateOrUpdateMaximumSet(); - await availabilitySetsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsDeleteSample.ts deleted file mode 100644 index f6ac924593ab..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsDeleteSample.ts +++ /dev/null @@ -1,61 +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 type { AvailabilitySetsDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MaximumSet_Gen.json - */ -async function availabilitySetsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const availabilitySetResourceName = "_"; - const options: AvailabilitySetsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MinimumSet_Gen.json - */ -async function availabilitySetsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "6"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - ); - console.log(result); -} - -async function main(): Promise { - await availabilitySetsDeleteMaximumSet(); - await availabilitySetsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsGetSample.ts deleted file mode 100644 index 7505a33d3bc9..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsGetSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MaximumSet_Gen.json - */ -async function availabilitySetsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get(resourceGroupName, availabilitySetResourceName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MinimumSet_Gen.json - */ -async function availabilitySetsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "V"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get(resourceGroupName, availabilitySetResourceName); - console.log(result); -} - -async function main(): Promise { - await availabilitySetsGetMaximumSet(); - await availabilitySetsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListByResourceGroupSample.ts deleted file mode 100644 index 94d2dced4ee8..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListByResourceGroupSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availabilitySets.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MinimumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availabilitySets.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await availabilitySetsListByResourceGroupMaximumSet(); - await availabilitySetsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListBySubscriptionSample.ts deleted file mode 100644 index 2ca6ec54447f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsListBySubscriptionSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MinimumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await availabilitySetsListBySubscriptionMaximumSet(); - await availabilitySetsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsUpdateSample.ts deleted file mode 100644 index 12f5d5d2e210..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/availabilitySetsUpdateSample.ts +++ /dev/null @@ -1,64 +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 type { AvailabilitySetTagsUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MaximumSet_Gen.json - */ -async function availabilitySetsUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const properties: AvailabilitySetTagsUpdate = { - tags: { key1460: "vcbwibkvr" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MinimumSet_Gen.json - */ -async function availabilitySetsUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "1"; - const properties: AvailabilitySetTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - await availabilitySetsUpdateMaximumSet(); - await availabilitySetsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsCreateOrUpdateSample.ts deleted file mode 100644 index 394f3285ec3e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsCreateOrUpdateSample.ts +++ /dev/null @@ -1,76 +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 type { Cloud } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MaximumSet_Gen.json - */ -async function cloudsCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "2"; - const resource: Cloud = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "khwsdmaxfhmbu", - properties: { - cloudCapacity: {}, - inventoryItemId: "qjd", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key4295: "wngosgcbdifaxdobufuuqxtho" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MinimumSet_Gen.json - */ -async function cloudsCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "-"; - const resource: Cloud = { extendedLocation: {}, location: "khwsdmaxfhmbu" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await cloudsCreateOrUpdateMaximumSet(); - await cloudsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsDeleteSample.ts deleted file mode 100644 index 73ca75d8615b..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsDeleteSample.ts +++ /dev/null @@ -1,58 +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 type { CloudsDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json - */ -async function cloudsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const cloudResourceName = "-"; - const options: CloudsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait( - resourceGroupName, - cloudResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MinimumSet_Gen.json - */ -async function cloudsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait(resourceGroupName, cloudResourceName); - console.log(result); -} - -async function main(): Promise { - await cloudsDeleteMaximumSet(); - await cloudsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsGetSample.ts deleted file mode 100644 index 51b465605218..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsGetSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json - */ -async function cloudsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MinimumSet_Gen.json - */ -async function cloudsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "i"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -async function main(): Promise { - await cloudsGetMaximumSet(); - await cloudsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsListByResourceGroupSample.ts deleted file mode 100644 index edf07bc05516..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsListByResourceGroupSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MaximumSet_Gen.json - */ -async function cloudsListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MinimumSet_Gen.json - */ -async function cloudsListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await cloudsListByResourceGroupMaximumSet(); - await cloudsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsListBySubscriptionSample.ts deleted file mode 100644 index 96886c5559e0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsListBySubscriptionSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MaximumSet_Gen.json - */ -async function cloudsListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MinimumSet_Gen.json - */ -async function cloudsListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await cloudsListBySubscriptionMaximumSet(); - await cloudsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/cloudsUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/cloudsUpdateSample.ts deleted file mode 100644 index 04701a83d08e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/cloudsUpdateSample.ts +++ /dev/null @@ -1,64 +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 type { CloudTagsUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json - */ -async function cloudsUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "P"; - const properties: CloudTagsUpdate = { - tags: { key5266: "hjpcnwmpnixsolrxnbl" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MinimumSet_Gen.json - */ -async function cloudsUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const properties: CloudTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - await cloudsUpdateMaximumSet(); - await cloudsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsCreateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsCreateSample.ts deleted file mode 100644 index b1109eb74254..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsCreateSample.ts +++ /dev/null @@ -1,57 +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 type { GuestAgent } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen.json - */ -async function guestAgentsCreateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: GuestAgent = { - properties: { - credentials: { - password: "SecretPlaceholder", - username: "jqxuwirrcpfv", - }, - httpProxyConfig: { httpsProxy: "uoyzyticmohohomlkwct" }, - provisioningAction: "install", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait(resourceUri, resource); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MinimumSet_Gen.json - */ -async function guestAgentsCreateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: GuestAgent = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait(resourceUri, resource); - console.log(result); -} - -async function main(): Promise { - await guestAgentsCreateMaximumSet(); - await guestAgentsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsDeleteSample.ts deleted file mode 100644 index a6db7a7f08fd..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsDeleteSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen.json - */ -async function guestAgentsDeleteMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MinimumSet_Gen.json - */ -async function guestAgentsDeleteMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -async function main(): Promise { - await guestAgentsDeleteMaximumSet(); - await guestAgentsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsGetSample.ts deleted file mode 100644 index dfd3596d4a39..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsGetSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen.json - */ -async function guestAgentsGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MinimumSet_Gen.json - */ -async function guestAgentsGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - await guestAgentsGetMaximumSet(); - await guestAgentsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsListByVirtualMachineInstanceSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsListByVirtualMachineInstanceSample.ts deleted file mode 100644 index ddc99f615d7f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/guestAgentsListByVirtualMachineInstanceSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.guestAgents.listByVirtualMachineInstance(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.guestAgents.listByVirtualMachineInstance(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await guestAgentsListByVirtualMachineInstanceMaximumSet(); - await guestAgentsListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsCreateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsCreateSample.ts deleted file mode 100644 index e8ebce63150a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsCreateSample.ts +++ /dev/null @@ -1,69 +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 type { InventoryItem } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MaximumSet_Gen.json - */ -async function inventoryItemsCreateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "O"; - const inventoryItemResourceName = "1BdDc2Ab-bDd9-Ebd6-bfdb-C0dbbdB5DEDf"; - const resource: InventoryItem = { - kind: "M\\d_,V.", - properties: { inventoryType: "Cloud" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MinimumSet_Gen.json - */ -async function inventoryItemsCreateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const inventoryItemResourceName = "bbFb0cBb-50ce-4bfc-3eeD-bC26AbCC257a"; - const resource: InventoryItem = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await inventoryItemsCreateMaximumSet(); - await inventoryItemsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsDeleteSample.ts deleted file mode 100644 index f4098dfe181f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsDeleteSample.ts +++ /dev/null @@ -1,61 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MaximumSet_Gen.json - */ -async function inventoryItemsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "b"; - const inventoryItemResourceName = "EcECadfd-Eaaa-e5Ce-ebdA-badeEd3c6af1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MinimumSet_Gen.json - */ -async function inventoryItemsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cDBcbae6-BC3d-52fe-CedC-7eFeaBFabb82"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main(): Promise { - await inventoryItemsDeleteMaximumSet(); - await inventoryItemsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsGetSample.ts deleted file mode 100644 index 8f81d78dfc82..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsGetSample.ts +++ /dev/null @@ -1,61 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen.json - */ -async function inventoryItemsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "1"; - const inventoryItemResourceName = "2bFBede6-EEf8-becB-dBbd-B96DbBFdB3f3"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MinimumSet_Gen.json - */ -async function inventoryItemsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cacb8Ceb-efAC-bebb-ae7C-dec8C5Bb7100"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main(): Promise { - await inventoryItemsGetMaximumSet(); - await inventoryItemsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsListByVmmServerSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsListByVmmServerSample.ts deleted file mode 100644 index f0ca704321c3..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/inventoryItemsListByVmmServerSample.ts +++ /dev/null @@ -1,63 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MaximumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "X"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inventoryItems.listByVmmServer( - resourceGroupName, - vmmServerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MinimumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "H"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.inventoryItems.listByVmmServer( - resourceGroupName, - vmmServerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await inventoryItemsListByVmmServerMaximumSet(); - await inventoryItemsListByVmmServerMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/operationsListSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/operationsListSample.ts deleted file mode 100644 index f8f46b9ec3c6..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await operationsListMaximumSet(); - await operationsListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateCheckpointSample.ts deleted file mode 100644 index bad2febc3d0b..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateCheckpointSample.ts +++ /dev/null @@ -1,57 +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 type { VirtualMachineCreateCheckpoint } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineCreateCheckpoint = { - name: "ilvltf", - description: "zoozhfbepldrgpjqsbhpqebtodrhvy", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineCreateCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesCreateCheckpointMaximumSet(); - await virtualMachineInstancesCreateCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts deleted file mode 100644 index 857fa59167b7..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,131 +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 type { VirtualMachineInstance } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: VirtualMachineInstance = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - isHighlyAvailable: "true", - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { - biosGuid: "xixivxifyql", - checkpointType: "jkbpzjxpeegackhsvikrnlnwqz", - cloudId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/clouds/cloudResourceName", - generation: 28, - inventoryItemId: "ihkkqmg", - lastRestoredVmCheckpoint: { - name: "keqn", - description: "qurzfrgyflrh", - checkpointId: "wsqmrje", - parentCheckpointId: "hqhhzikoxunuqguouw", - }, - templateId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName", - uuid: "hrpw", - vmName: "qovpayfydhcvfrhe", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - osProfile: { - adminPassword: "vavtppmmhlspydtkzxda", - computerName: "uuxpcxuxcufllc", - osType: "Windows", - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - createDiffDisk: "true", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - templateDiskId: "lcdwrokpyvekqccclf", - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: VirtualMachineInstance = { extendedLocation: {} }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesCreateOrUpdateMaximumSet(); - await virtualMachineInstancesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteCheckpointSample.ts deleted file mode 100644 index 2b43fef4229d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteCheckpointSample.ts +++ /dev/null @@ -1,56 +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 type { VirtualMachineDeleteCheckpoint } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineDeleteCheckpoint = { - id: "eenfflimcbgqfsebdusophahjpk", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineDeleteCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesDeleteCheckpointMaximumSet(); - await virtualMachineInstancesDeleteCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteSample.ts deleted file mode 100644 index 3785b54f73d7..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesDeleteSample.ts +++ /dev/null @@ -1,52 +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 type { VirtualMachineInstancesDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const force = "true"; - const deleteFromHost = "true"; - const options: VirtualMachineInstancesDeleteOptionalParams = { - force, - deleteFromHost, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteAndWait(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesDeleteMaximumSet(); - await virtualMachineInstancesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesGetSample.ts deleted file mode 100644 index 1d23869de95c..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesGetSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MaximumSet_Gen.json - */ -async function virtualMachineInstancesGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MinimumSet_Gen.json - */ -async function virtualMachineInstancesGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesGetMaximumSet(); - await virtualMachineInstancesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesListSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesListSample.ts deleted file mode 100644 index 7c8ee099e5c9..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesListSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MaximumSet_Gen.json - */ -async function virtualMachineInstancesListMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MinimumSet_Gen.json - */ -async function virtualMachineInstancesListMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualMachineInstancesListMaximumSet(); - await virtualMachineInstancesListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestartSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestartSample.ts deleted file mode 100644 index 188042946678..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestartSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestartMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestartMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesRestartMaximumSet(); - await virtualMachineInstancesRestartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestoreCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestoreCheckpointSample.ts deleted file mode 100644 index c6f770188b16..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesRestoreCheckpointSample.ts +++ /dev/null @@ -1,54 +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 type { VirtualMachineRestoreCheckpoint } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineRestoreCheckpoint = { id: "rweqduwzsn" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineRestoreCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesRestoreCheckpointMaximumSet(); - await virtualMachineInstancesRestoreCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStartSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStartSample.ts deleted file mode 100644 index d86f9f7c998e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStartSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStartMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStartMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesStartMaximumSet(); - await virtualMachineInstancesStartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStopSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStopSample.ts deleted file mode 100644 index 9489293233f4..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesStopSample.ts +++ /dev/null @@ -1,48 +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 type { StopVirtualMachineOptions } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStopMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: StopVirtualMachineOptions = { skipShutdown: "true" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait(resourceUri, body); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStopMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: StopVirtualMachineOptions = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait(resourceUri, body); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesStopMaximumSet(); - await virtualMachineInstancesStopMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesUpdateSample.ts deleted file mode 100644 index 4cc754ba1f4a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineInstancesUpdateSample.ts +++ /dev/null @@ -1,94 +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 type { VirtualMachineInstanceUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MaximumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const properties: VirtualMachineInstanceUpdate = { - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { checkpointType: "jkbpzjxpeegackhsvikrnlnwqz" }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait(resourceUri, properties); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MinimumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const properties: VirtualMachineInstanceUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait(resourceUri, properties); - console.log(result); -} - -async function main(): Promise { - await virtualMachineInstancesUpdateMaximumSet(); - await virtualMachineInstancesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesCreateOrUpdateSample.ts deleted file mode 100644 index 42227f613718..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,83 +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 type { VirtualMachineTemplate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "6"; - const resource: VirtualMachineTemplate = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "ayxsyduviotylbojh", - properties: { - dynamicMemoryEnabled: "true", - inventoryItemId: "qjrykoogccwlgkd", - isCustomizable: "true", - isHighlyAvailable: "true", - limitCpuForMigration: "true", - osType: "Windows", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key9494: "kkbmfpwhmvlobm" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "P"; - const resource: VirtualMachineTemplate = { - extendedLocation: {}, - location: "ayxsyduviotylbojh", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineTemplatesCreateOrUpdateMaximumSet(); - await virtualMachineTemplatesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesDeleteSample.ts deleted file mode 100644 index 01f915c7a115..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesDeleteSample.ts +++ /dev/null @@ -1,61 +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 type { VirtualMachineTemplatesDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualMachineTemplateName = "6"; - const options: VirtualMachineTemplatesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "5"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineTemplatesDeleteMaximumSet(); - await virtualMachineTemplatesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesGetSample.ts deleted file mode 100644 index 4e41de84753e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesGetSample.ts +++ /dev/null @@ -1,57 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "4"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "m"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineTemplatesGetMaximumSet(); - await virtualMachineTemplatesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts deleted file mode 100644 index 33e4f6434221..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualMachineTemplates.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualMachineTemplates.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualMachineTemplatesListByResourceGroupMaximumSet(); - await virtualMachineTemplatesListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListBySubscriptionSample.ts deleted file mode 100644 index e087fc9c0cb7..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesListBySubscriptionSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualMachineTemplatesListBySubscriptionMaximumSet(); - await virtualMachineTemplatesListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesUpdateSample.ts deleted file mode 100644 index cacccb9774f2..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualMachineTemplatesUpdateSample.ts +++ /dev/null @@ -1,64 +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 type { VirtualMachineTemplateTagsUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "g"; - const properties: VirtualMachineTemplateTagsUpdate = { - tags: { key6634: "wwfhrg" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "-"; - const properties: VirtualMachineTemplateTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - await virtualMachineTemplatesUpdateMaximumSet(); - await virtualMachineTemplatesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 58bce2b1528a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +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 type { VirtualNetwork } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "_"; - const resource: VirtualNetwork = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "fky", - properties: { - inventoryItemId: "bxn", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key705: "apgplvjdyocx" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const resource: VirtualNetwork = { extendedLocation: {}, location: "fky" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworksCreateOrUpdateMaximumSet(); - await virtualNetworksCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksDeleteSample.ts deleted file mode 100644 index 7f9454e7eb72..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,61 +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 type { VirtualNetworksDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MaximumSet_Gen.json - */ -async function virtualNetworksDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualNetworkName = "."; - const options: VirtualNetworksDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MinimumSet_Gen.json - */ -async function virtualNetworksDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworksDeleteMaximumSet(); - await virtualNetworksDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksGetSample.ts deleted file mode 100644 index 3eda51536634..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksGetSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MaximumSet_Gen.json - */ -async function virtualNetworksGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "2"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MinimumSet_Gen.json - */ -async function virtualNetworksGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -async function main(): Promise { - await virtualNetworksGetMaximumSet(); - await virtualNetworksGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListByResourceGroupSample.ts deleted file mode 100644 index 5bac1c4efb36..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworksListByResourceGroupMaximumSet(); - await virtualNetworksListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListBySubscriptionSample.ts deleted file mode 100644 index 2021e08568dd..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await virtualNetworksListBySubscriptionMaximumSet(); - await virtualNetworksListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksUpdateSample.ts deleted file mode 100644 index 63d169a4f59a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/virtualNetworksUpdateSample.ts +++ /dev/null @@ -1,62 +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 type { VirtualNetworkTagsUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MaximumSet_Gen.json - */ -async function virtualNetworksUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "S"; - const properties: VirtualNetworkTagsUpdate = { tags: { key9516: "oxduo" } }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MinimumSet_Gen.json - */ -async function virtualNetworksUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const properties: VirtualNetworkTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - await virtualNetworksUpdateMaximumSet(); - await virtualNetworksUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasGetSample.ts deleted file mode 100644 index 22e3fdcd120f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasGetSample.ts +++ /dev/null @@ -1,45 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - await vmInstanceHybridIdentityMetadatasGetMaximumSet(); - await vmInstanceHybridIdentityMetadatasGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts deleted file mode 100644 index 8f9e631dd53d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (const item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet(); - await vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersCreateOrUpdateSample.ts deleted file mode 100644 index 551162dfdfcb..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersCreateOrUpdateSample.ts +++ /dev/null @@ -1,77 +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 type { VmmServer } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MaximumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "-"; - const resource: VmmServer = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "hslxkyzktvwpqbypvs", - properties: { - credentials: { password: "SecretPlaceholder", username: "jbuoltypmrgqfi" }, - fqdn: "pvzcjaqrswbvptgx", - port: 4, - }, - tags: { key4834: "vycgfkzjcyyuotwwq" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MinimumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "w"; - const resource: VmmServer = { - extendedLocation: {}, - location: "hslxkyzktvwpqbypvs", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - await vmmServersCreateOrUpdateMaximumSet(); - await vmmServersCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersDeleteSample.ts deleted file mode 100644 index 7f7445f06d43..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersDeleteSample.ts +++ /dev/null @@ -1,58 +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 type { VmmServersDeleteOptionalParams } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen.json - */ -async function vmmServersDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const vmmServerName = "."; - const options: VmmServersDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait( - resourceGroupName, - vmmServerName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MinimumSet_Gen.json - */ -async function vmmServersDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "8"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait(resourceGroupName, vmmServerName); - console.log(result); -} - -async function main(): Promise { - await vmmServersDeleteMaximumSet(); - await vmmServersDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersGetSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersGetSample.ts deleted file mode 100644 index cf04ff453dfb..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersGetSample.ts +++ /dev/null @@ -1,51 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen.json - */ -async function vmmServersGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MinimumSet_Gen.json - */ -async function vmmServersGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "D"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -async function main(): Promise { - await vmmServersGetMaximumSet(); - await vmmServersGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListByResourceGroupSample.ts deleted file mode 100644 index 224442770b3b..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListByResourceGroupSample.ts +++ /dev/null @@ -1,55 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MaximumSet_Gen.json - */ -async function vmmServersListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vmmServers.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MinimumSet_Gen.json - */ -async function vmmServersListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vmmServers.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vmmServersListByResourceGroupMaximumSet(); - await vmmServersListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListBySubscriptionSample.ts deleted file mode 100644 index c397e7d4fb53..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersListBySubscriptionSample.ts +++ /dev/null @@ -1,53 +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 { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MaximumSet_Gen.json - */ -async function vmmServersListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MinimumSet_Gen.json - */ -async function vmmServersListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vmmServersListBySubscriptionMaximumSet(); - await vmmServersListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples-dev/vmmServersUpdateSample.ts deleted file mode 100644 index 5402a633bcc3..000000000000 --- a/sdk/scvmm/arm-scvmm/samples-dev/vmmServersUpdateSample.ts +++ /dev/null @@ -1,64 +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 type { VmmServerTagsUpdate } from "@azure/arm-scvmm"; -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen.json - */ -async function vmmServersUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "Y"; - const properties: VmmServerTagsUpdate = { - tags: { key7187: "oktnfvklfchnquelzzdagtpwfskzc" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MinimumSet_Gen.json - */ -async function vmmServersUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const properties: VmmServerTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - await vmmServersUpdateMaximumSet(); - await vmmServersUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/README.md b/sdk/scvmm/arm-scvmm/samples/v1/javascript/README.md deleted file mode 100644 index a866182dadb7..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [availabilitySetsCreateOrUpdateSample.js][availabilitysetscreateorupdatesample] | Onboards the ScVmm availability set as an Azure resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json | -| [availabilitySetsDeleteSample.js][availabilitysetsdeletesample] | Deregisters the ScVmm availability set from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MaximumSet_Gen.json | -| [availabilitySetsGetSample.js][availabilitysetsgetsample] | Implements AvailabilitySet GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MaximumSet_Gen.json | -| [availabilitySetsListByResourceGroupSample.js][availabilitysetslistbyresourcegroupsample] | List of AvailabilitySets in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json | -| [availabilitySetsListBySubscriptionSample.js][availabilitysetslistbysubscriptionsample] | List of AvailabilitySets in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json | -| [availabilitySetsUpdateSample.js][availabilitysetsupdatesample] | Updates the AvailabilitySets resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MaximumSet_Gen.json | -| [cloudsCreateOrUpdateSample.js][cloudscreateorupdatesample] | Onboards the ScVmm fabric cloud as an Azure cloud resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MaximumSet_Gen.json | -| [cloudsDeleteSample.js][cloudsdeletesample] | Deregisters the ScVmm fabric cloud from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json | -| [cloudsGetSample.js][cloudsgetsample] | Implements Cloud GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json | -| [cloudsListByResourceGroupSample.js][cloudslistbyresourcegroupsample] | List of Clouds in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MaximumSet_Gen.json | -| [cloudsListBySubscriptionSample.js][cloudslistbysubscriptionsample] | List of Clouds in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MaximumSet_Gen.json | -| [cloudsUpdateSample.js][cloudsupdatesample] | Updates the Clouds resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json | -| [guestAgentsCreateSample.js][guestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen.json | -| [guestAgentsDeleteSample.js][guestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen.json | -| [guestAgentsGetSample.js][guestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen.json | -| [guestAgentsListByVirtualMachineInstanceSample.js][guestagentslistbyvirtualmachineinstancesample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json | -| [inventoryItemsCreateSample.js][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MaximumSet_Gen.json | -| [inventoryItemsDeleteSample.js][inventoryitemsdeletesample] | Deletes an inventoryItem. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MaximumSet_Gen.json | -| [inventoryItemsGetSample.js][inventoryitemsgetsample] | Shows an inventory item. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen.json | -| [inventoryItemsListByVmmServerSample.js][inventoryitemslistbyvmmserversample] | Returns the list of inventoryItems in the given VmmServer. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen.json | -| [virtualMachineInstancesCreateCheckpointSample.js][virtualmachineinstancescreatecheckpointsample] | Creates a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesCreateOrUpdateSample.js][virtualmachineinstancescreateorupdatesample] | The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineInstancesDeleteCheckpointSample.js][virtualmachineinstancesdeletecheckpointsample] | Deletes a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesDeleteSample.js][virtualmachineinstancesdeletesample] | The operation to delete a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MaximumSet_Gen.json | -| [virtualMachineInstancesGetSample.js][virtualmachineinstancesgetsample] | Retrieves information about a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MaximumSet_Gen.json | -| [virtualMachineInstancesListSample.js][virtualmachineinstanceslistsample] | Lists all of the virtual machine instances within the specified parent resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MaximumSet_Gen.json | -| [virtualMachineInstancesRestartSample.js][virtualmachineinstancesrestartsample] | The operation to restart a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MaximumSet_Gen.json | -| [virtualMachineInstancesRestoreCheckpointSample.js][virtualmachineinstancesrestorecheckpointsample] | Restores to a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesStartSample.js][virtualmachineinstancesstartsample] | The operation to start a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MaximumSet_Gen.json | -| [virtualMachineInstancesStopSample.js][virtualmachineinstancesstopsample] | The operation to power off (stop) a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MaximumSet_Gen.json | -| [virtualMachineInstancesUpdateSample.js][virtualmachineinstancesupdatesample] | The operation to update a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MaximumSet_Gen.json | -| [virtualMachineTemplatesCreateOrUpdateSample.js][virtualmachinetemplatescreateorupdatesample] | Onboards the ScVmm VM Template as an Azure VM Template resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineTemplatesDeleteSample.js][virtualmachinetemplatesdeletesample] | Deregisters the ScVmm VM Template from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MaximumSet_Gen.json | -| [virtualMachineTemplatesGetSample.js][virtualmachinetemplatesgetsample] | Implements VirtualMachineTemplate GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MaximumSet_Gen.json | -| [virtualMachineTemplatesListByResourceGroupSample.js][virtualmachinetemplateslistbyresourcegroupsample] | List of VirtualMachineTemplates in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json | -| [virtualMachineTemplatesListBySubscriptionSample.js][virtualmachinetemplateslistbysubscriptionsample] | List of VirtualMachineTemplates in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json | -| [virtualMachineTemplatesUpdateSample.js][virtualmachinetemplatesupdatesample] | Updates the VirtualMachineTemplate resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MaximumSet_Gen.json | -| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Onboards the ScVmm virtual network as an Azure virtual network resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deregisters the ScVmm virtual network from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MaximumSet_Gen.json | -| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Implements VirtualNetwork GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MaximumSet_Gen.json | -| [virtualNetworksListByResourceGroupSample.js][virtualnetworkslistbyresourcegroupsample] | List of VirtualNetworks in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json | -| [virtualNetworksListBySubscriptionSample.js][virtualnetworkslistbysubscriptionsample] | List of VirtualNetworks in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json | -| [virtualNetworksUpdateSample.js][virtualnetworksupdatesample] | Updates the VirtualNetworks resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MaximumSet_Gen.json | -| [vmInstanceHybridIdentityMetadatasGetSample.js][vminstancehybrididentitymetadatasgetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json | -| [vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.js][vminstancehybrididentitymetadataslistbyvirtualmachineinstancesample] | Returns the list of HybridIdentityMetadata of the given VM. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json | -| [vmmServersCreateOrUpdateSample.js][vmmserverscreateorupdatesample] | Onboards the SCVmm fabric as an Azure VmmServer resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MaximumSet_Gen.json | -| [vmmServersDeleteSample.js][vmmserversdeletesample] | Removes the SCVmm fabric from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen.json | -| [vmmServersGetSample.js][vmmserversgetsample] | Implements VmmServer GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen.json | -| [vmmServersListByResourceGroupSample.js][vmmserverslistbyresourcegroupsample] | List of VmmServers in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MaximumSet_Gen.json | -| [vmmServersListBySubscriptionSample.js][vmmserverslistbysubscriptionsample] | List of VmmServers in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MaximumSet_Gen.json | -| [vmmServersUpdateSample.js][vmmserversupdatesample] | Updates the VmmServers resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node availabilitySetsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env SCVMM_SUBSCRIPTION_ID="" SCVMM_RESOURCE_GROUP="" node availabilitySetsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availabilitysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsCreateOrUpdateSample.js -[availabilitysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsDeleteSample.js -[availabilitysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsGetSample.js -[availabilitysetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListByResourceGroupSample.js -[availabilitysetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListBySubscriptionSample.js -[availabilitysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsUpdateSample.js -[cloudscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsCreateOrUpdateSample.js -[cloudsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsDeleteSample.js -[cloudsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsGetSample.js -[cloudslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListByResourceGroupSample.js -[cloudslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListBySubscriptionSample.js -[cloudsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsUpdateSample.js -[guestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsCreateSample.js -[guestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsDeleteSample.js -[guestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsGetSample.js -[guestagentslistbyvirtualmachineinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsListByVirtualMachineInstanceSample.js -[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsCreateSample.js -[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsDeleteSample.js -[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsGetSample.js -[inventoryitemslistbyvmmserversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsListByVmmServerSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/operationsListSample.js -[virtualmachineinstancescreatecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateCheckpointSample.js -[virtualmachineinstancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js -[virtualmachineinstancesdeletecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteCheckpointSample.js -[virtualmachineinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteSample.js -[virtualmachineinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesGetSample.js -[virtualmachineinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesListSample.js -[virtualmachineinstancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestartSample.js -[virtualmachineinstancesrestorecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestoreCheckpointSample.js -[virtualmachineinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStartSample.js -[virtualmachineinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStopSample.js -[virtualmachineinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesUpdateSample.js -[virtualmachinetemplatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesCreateOrUpdateSample.js -[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js -[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesGetSample.js -[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js -[virtualmachinetemplateslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListBySubscriptionSample.js -[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksCreateOrUpdateSample.js -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksDeleteSample.js -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksGetSample.js -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js -[virtualnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListBySubscriptionSample.js -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksUpdateSample.js -[vminstancehybrididentitymetadatasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasGetSample.js -[vminstancehybrididentitymetadataslistbyvirtualmachineinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.js -[vmmserverscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersCreateOrUpdateSample.js -[vmmserversdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersDeleteSample.js -[vmmserversgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersGetSample.js -[vmmserverslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListByResourceGroupSample.js -[vmmserverslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListBySubscriptionSample.js -[vmmserversupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersUpdateSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/README.md diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsCreateOrUpdateSample.js deleted file mode 100644 index 218675a65f8f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsCreateOrUpdateSample.js +++ /dev/null @@ -1,79 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "jelevilan", - properties: { - availabilitySetName: "njrpftunzo", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key5701: "cldtxloqh" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MinimumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "_"; - const resource = { - extendedLocation: {}, - location: "jelevilan", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -async function main() { - availabilitySetsCreateOrUpdateMaximumSet(); - availabilitySetsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsDeleteSample.js deleted file mode 100644 index 550a5a5b4f06..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsDeleteSample.js +++ /dev/null @@ -1,63 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MaximumSet_Gen.json - */ -async function availabilitySetsDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const availabilitySetResourceName = "_"; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MinimumSet_Gen.json - */ -async function availabilitySetsDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "6"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - ); - console.log(result); -} - -async function main() { - availabilitySetsDeleteMaximumSet(); - availabilitySetsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsGetSample.js deleted file mode 100644 index 3fa190351368..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsGetSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MaximumSet_Gen.json - */ -async function availabilitySetsGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get(resourceGroupName, availabilitySetResourceName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MinimumSet_Gen.json - */ -async function availabilitySetsGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "V"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get(resourceGroupName, availabilitySetResourceName); - console.log(result); -} - -async function main() { - availabilitySetsGetMaximumSet(); - availabilitySetsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListByResourceGroupSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListByResourceGroupSample.js deleted file mode 100644 index c7afb199c406..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListByResourceGroupSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MinimumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - availabilitySetsListByResourceGroupMaximumSet(); - availabilitySetsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListBySubscriptionSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListBySubscriptionSample.js deleted file mode 100644 index f783a6d45e62..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsListBySubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MinimumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - availabilitySetsListBySubscriptionMaximumSet(); - availabilitySetsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsUpdateSample.js deleted file mode 100644 index 30bce88791ce..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/availabilitySetsUpdateSample.js +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MaximumSet_Gen.json - */ -async function availabilitySetsUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const properties = { - tags: { key1460: "vcbwibkvr" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MinimumSet_Gen.json - */ -async function availabilitySetsUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "1"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -async function main() { - availabilitySetsUpdateMaximumSet(); - availabilitySetsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsCreateOrUpdateSample.js deleted file mode 100644 index 1af414e9bd03..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsCreateOrUpdateSample.js +++ /dev/null @@ -1,78 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MaximumSet_Gen.json - */ -async function cloudsCreateOrUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "2"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "khwsdmaxfhmbu", - properties: { - cloudCapacity: {}, - inventoryItemId: "qjd", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key4295: "wngosgcbdifaxdobufuuqxtho" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MinimumSet_Gen.json - */ -async function cloudsCreateOrUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "-"; - const resource = { extendedLocation: {}, location: "khwsdmaxfhmbu" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -async function main() { - cloudsCreateOrUpdateMaximumSet(); - cloudsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsDeleteSample.js deleted file mode 100644 index 60980b4f6a90..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsDeleteSample.js +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json - */ -async function cloudsDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const cloudResourceName = "-"; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait( - resourceGroupName, - cloudResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MinimumSet_Gen.json - */ -async function cloudsDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait(resourceGroupName, cloudResourceName); - console.log(result); -} - -async function main() { - cloudsDeleteMaximumSet(); - cloudsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsGetSample.js deleted file mode 100644 index 993b25d21552..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsGetSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json - */ -async function cloudsGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MinimumSet_Gen.json - */ -async function cloudsGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "i"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -async function main() { - cloudsGetMaximumSet(); - cloudsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListByResourceGroupSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListByResourceGroupSample.js deleted file mode 100644 index 9172ede63b52..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListByResourceGroupSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MaximumSet_Gen.json - */ -async function cloudsListByResourceGroupMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MinimumSet_Gen.json - */ -async function cloudsListByResourceGroupMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - cloudsListByResourceGroupMaximumSet(); - cloudsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListBySubscriptionSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListBySubscriptionSample.js deleted file mode 100644 index 2abf7fe31be3..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsListBySubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MaximumSet_Gen.json - */ -async function cloudsListBySubscriptionMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MinimumSet_Gen.json - */ -async function cloudsListBySubscriptionMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - cloudsListBySubscriptionMaximumSet(); - cloudsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsUpdateSample.js deleted file mode 100644 index c320964b1dfc..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/cloudsUpdateSample.js +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json - */ -async function cloudsUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "P"; - const properties = { - tags: { key5266: "hjpcnwmpnixsolrxnbl" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MinimumSet_Gen.json - */ -async function cloudsUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -async function main() { - cloudsUpdateMaximumSet(); - cloudsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsCreateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsCreateSample.js deleted file mode 100644 index dcad0bbd0290..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsCreateSample.js +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen.json - */ -async function guestAgentsCreateMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const resource = { - properties: { - credentials: { - password: "SecretPlaceholder", - username: "jqxuwirrcpfv", - }, - httpProxyConfig: { httpsProxy: "uoyzyticmohohomlkwct" }, - provisioningAction: "install", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait(resourceUri, resource); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MinimumSet_Gen.json - */ -async function guestAgentsCreateMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const resource = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait(resourceUri, resource); - console.log(result); -} - -async function main() { - guestAgentsCreateMaximumSet(); - guestAgentsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsDeleteSample.js deleted file mode 100644 index 29622352e698..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsDeleteSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen.json - */ -async function guestAgentsDeleteMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MinimumSet_Gen.json - */ -async function guestAgentsDeleteMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -async function main() { - guestAgentsDeleteMaximumSet(); - guestAgentsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsGetSample.js deleted file mode 100644 index 1f7dcb8f1455..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsGetSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen.json - */ -async function guestAgentsGetMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MinimumSet_Gen.json - */ -async function guestAgentsGetMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -async function main() { - guestAgentsGetMaximumSet(); - guestAgentsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsListByVirtualMachineInstanceSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsListByVirtualMachineInstanceSample.js deleted file mode 100644 index 493e70c93e7d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/guestAgentsListByVirtualMachineInstanceSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.guestAgents.listByVirtualMachineInstance(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.guestAgents.listByVirtualMachineInstance(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - guestAgentsListByVirtualMachineInstanceMaximumSet(); - guestAgentsListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsCreateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsCreateSample.js deleted file mode 100644 index 2962931beb80..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsCreateSample.js +++ /dev/null @@ -1,71 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MaximumSet_Gen.json - */ -async function inventoryItemsCreateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "O"; - const inventoryItemResourceName = "1BdDc2Ab-bDd9-Ebd6-bfdb-C0dbbdB5DEDf"; - const resource = { - kind: "M\\d_,V.", - properties: { inventoryType: "Cloud" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MinimumSet_Gen.json - */ -async function inventoryItemsCreateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const inventoryItemResourceName = "bbFb0cBb-50ce-4bfc-3eeD-bC26AbCC257a"; - const resource = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -async function main() { - inventoryItemsCreateMaximumSet(); - inventoryItemsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsDeleteSample.js deleted file mode 100644 index d2c702651fb8..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsDeleteSample.js +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MaximumSet_Gen.json - */ -async function inventoryItemsDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "b"; - const inventoryItemResourceName = "EcECadfd-Eaaa-e5Ce-ebdA-badeEd3c6af1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MinimumSet_Gen.json - */ -async function inventoryItemsDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cDBcbae6-BC3d-52fe-CedC-7eFeaBFabb82"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main() { - inventoryItemsDeleteMaximumSet(); - inventoryItemsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsGetSample.js deleted file mode 100644 index 562b709ed197..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsGetSample.js +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen.json - */ -async function inventoryItemsGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "1"; - const inventoryItemResourceName = "2bFBede6-EEf8-becB-dBbd-B96DbBFdB3f3"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MinimumSet_Gen.json - */ -async function inventoryItemsGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cacb8Ceb-efAC-bebb-ae7C-dec8C5Bb7100"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main() { - inventoryItemsGetMaximumSet(); - inventoryItemsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsListByVmmServerSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsListByVmmServerSample.js deleted file mode 100644 index 38369c113a00..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/inventoryItemsListByVmmServerSample.js +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MaximumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "X"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.inventoryItems.listByVmmServer(resourceGroupName, vmmServerName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MinimumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "H"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.inventoryItems.listByVmmServer(resourceGroupName, vmmServerName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - inventoryItemsListByVmmServerMaximumSet(); - inventoryItemsListByVmmServerMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/operationsListSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index 0c7d6c31b123..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/operationsListSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsListMaximumSet(); - operationsListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/package.json b/sdk/scvmm/arm-scvmm/samples/v1/javascript/package.json deleted file mode 100644 index 62e92a311e9f..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-scvmm-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/scvmm/arm-scvmm" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm", - "dependencies": { - "@azure/arm-scvmm": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/sample.env b/sdk/scvmm/arm-scvmm/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateCheckpointSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateCheckpointSample.js deleted file mode 100644 index b6c3f0f354d4..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateCheckpointSample.js +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = { - name: "ilvltf", - description: "zoozhfbepldrgpjqsbhpqebtodrhvy", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main() { - virtualMachineInstancesCreateCheckpointMaximumSet(); - virtualMachineInstancesCreateCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js deleted file mode 100644 index dce98856da91..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js +++ /dev/null @@ -1,133 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - isHighlyAvailable: "true", - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { - biosGuid: "xixivxifyql", - checkpointType: "jkbpzjxpeegackhsvikrnlnwqz", - cloudId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/clouds/cloudResourceName", - generation: 28, - inventoryItemId: "ihkkqmg", - lastRestoredVmCheckpoint: { - name: "keqn", - description: "qurzfrgyflrh", - checkpointId: "wsqmrje", - parentCheckpointId: "hqhhzikoxunuqguouw", - }, - templateId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName", - uuid: "hrpw", - vmName: "qovpayfydhcvfrhe", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - osProfile: { - adminPassword: "vavtppmmhlspydtkzxda", - computerName: "uuxpcxuxcufllc", - osType: "Windows", - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - createDiffDisk: "true", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - templateDiskId: "lcdwrokpyvekqccclf", - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const resource = { extendedLocation: {} }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -async function main() { - virtualMachineInstancesCreateOrUpdateMaximumSet(); - virtualMachineInstancesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteCheckpointSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteCheckpointSample.js deleted file mode 100644 index fe2d03dc4819..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteCheckpointSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = { - id: "eenfflimcbgqfsebdusophahjpk", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main() { - virtualMachineInstancesDeleteCheckpointMaximumSet(); - virtualMachineInstancesDeleteCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteSample.js deleted file mode 100644 index 3f8914312da5..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesDeleteSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const force = "true"; - const deleteFromHost = "true"; - const options = { - force, - deleteFromHost, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteAndWait(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteAndWait(resourceUri); - console.log(result); -} - -async function main() { - virtualMachineInstancesDeleteMaximumSet(); - virtualMachineInstancesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesGetSample.js deleted file mode 100644 index 09e47fdbae37..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesGetSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MaximumSet_Gen.json - */ -async function virtualMachineInstancesGetMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MinimumSet_Gen.json - */ -async function virtualMachineInstancesGetMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -async function main() { - virtualMachineInstancesGetMaximumSet(); - virtualMachineInstancesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesListSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesListSample.js deleted file mode 100644 index b81ec63b0df8..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesListSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MaximumSet_Gen.json - */ -async function virtualMachineInstancesListMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MinimumSet_Gen.json - */ -async function virtualMachineInstancesListMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachineInstancesListMaximumSet(); - virtualMachineInstancesListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestartSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestartSample.js deleted file mode 100644 index 29e0e95bb513..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestartSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestartMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestartMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -async function main() { - virtualMachineInstancesRestartMaximumSet(); - virtualMachineInstancesRestartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestoreCheckpointSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestoreCheckpointSample.js deleted file mode 100644 index 721eaebcb7fc..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesRestoreCheckpointSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = { id: "rweqduwzsn" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main() { - virtualMachineInstancesRestoreCheckpointMaximumSet(); - virtualMachineInstancesRestoreCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStartSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStartSample.js deleted file mode 100644 index 9f67b92c7f56..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStartSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStartMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStartMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -async function main() { - virtualMachineInstancesStartMaximumSet(); - virtualMachineInstancesStartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStopSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStopSample.js deleted file mode 100644 index 058fccde193d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesStopSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStopMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = { skipShutdown: "true" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait(resourceUri, body); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStopMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const body = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait(resourceUri, body); - console.log(result); -} - -async function main() { - virtualMachineInstancesStopMaximumSet(); - virtualMachineInstancesStopMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesUpdateSample.js deleted file mode 100644 index 3a502f946ae4..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineInstancesUpdateSample.js +++ /dev/null @@ -1,96 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MaximumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const properties = { - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { checkpointType: "jkbpzjxpeegackhsvikrnlnwqz" }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait(resourceUri, properties); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MinimumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait(resourceUri, properties); - console.log(result); -} - -async function main() { - virtualMachineInstancesUpdateMaximumSet(); - virtualMachineInstancesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesCreateOrUpdateSample.js deleted file mode 100644 index 28de8981dcc2..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesCreateOrUpdateSample.js +++ /dev/null @@ -1,85 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "6"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "ayxsyduviotylbojh", - properties: { - dynamicMemoryEnabled: "true", - inventoryItemId: "qjrykoogccwlgkd", - isCustomizable: "true", - isHighlyAvailable: "true", - limitCpuForMigration: "true", - osType: "Windows", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key9494: "kkbmfpwhmvlobm" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "P"; - const resource = { - extendedLocation: {}, - location: "ayxsyduviotylbojh", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -async function main() { - virtualMachineTemplatesCreateOrUpdateMaximumSet(); - virtualMachineTemplatesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js deleted file mode 100644 index 2bf2dd217740..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js +++ /dev/null @@ -1,63 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualMachineTemplateName = "6"; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "5"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main() { - virtualMachineTemplatesDeleteMaximumSet(); - virtualMachineTemplatesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesGetSample.js deleted file mode 100644 index 895974f36b75..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesGetSample.js +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "4"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "m"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main() { - virtualMachineTemplatesGetMaximumSet(); - virtualMachineTemplatesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js deleted file mode 100644 index 628615eea65e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachineTemplatesListByResourceGroupMaximumSet(); - virtualMachineTemplatesListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListBySubscriptionSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListBySubscriptionSample.js deleted file mode 100644 index bae5dd168669..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesListBySubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachineTemplatesListBySubscriptionMaximumSet(); - virtualMachineTemplatesListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js deleted file mode 100644 index 20928c61d1c6..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "g"; - const properties = { - tags: { key6634: "wwfhrg" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "-"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -async function main() { - virtualMachineTemplatesUpdateMaximumSet(); - virtualMachineTemplatesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksCreateOrUpdateSample.js deleted file mode 100644 index b4f665636e20..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "_"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "fky", - properties: { - inventoryItemId: "bxn", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key705: "apgplvjdyocx" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const resource = { extendedLocation: {}, location: "fky" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -async function main() { - virtualNetworksCreateOrUpdateMaximumSet(); - virtualNetworksCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksDeleteSample.js deleted file mode 100644 index 2b689b5d25dc..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksDeleteSample.js +++ /dev/null @@ -1,63 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MaximumSet_Gen.json - */ -async function virtualNetworksDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualNetworkName = "."; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MinimumSet_Gen.json - */ -async function virtualNetworksDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main() { - virtualNetworksDeleteMaximumSet(); - virtualNetworksDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksGetSample.js deleted file mode 100644 index bb9b0ed77d27..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksGetSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MaximumSet_Gen.json - */ -async function virtualNetworksGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "2"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MinimumSet_Gen.json - */ -async function virtualNetworksGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get(resourceGroupName, virtualNetworkName); - console.log(result); -} - -async function main() { - virtualNetworksGetMaximumSet(); - virtualNetworksGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js deleted file mode 100644 index 6de4aa548b81..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualNetworksListByResourceGroupMaximumSet(); - virtualNetworksListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListBySubscriptionSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListBySubscriptionSample.js deleted file mode 100644 index ed348d77ea28..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksListBySubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualNetworksListBySubscriptionMaximumSet(); - virtualNetworksListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksUpdateSample.js deleted file mode 100644 index 8a41cf106179..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/virtualNetworksUpdateSample.js +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MaximumSet_Gen.json - */ -async function virtualNetworksUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "S"; - const properties = { tags: { key9516: "oxduo" } }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MinimumSet_Gen.json - */ -async function virtualNetworksUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -async function main() { - virtualNetworksUpdateMaximumSet(); - virtualNetworksUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasGetSample.js deleted file mode 100644 index 0a958c0713e0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasGetSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -async function main() { - vmInstanceHybridIdentityMetadatasGetMaximumSet(); - vmInstanceHybridIdentityMetadatasGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.js deleted file mode 100644 index 2a36abffb63a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet() { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet(); - vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersCreateOrUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersCreateOrUpdateSample.js deleted file mode 100644 index c0f14f07e2d5..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersCreateOrUpdateSample.js +++ /dev/null @@ -1,79 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MaximumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "-"; - const resource = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "hslxkyzktvwpqbypvs", - properties: { - credentials: { password: "SecretPlaceholder", username: "jbuoltypmrgqfi" }, - fqdn: "pvzcjaqrswbvptgx", - port: 4, - }, - tags: { key4834: "vycgfkzjcyyuotwwq" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MinimumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "w"; - const resource = { - extendedLocation: {}, - location: "hslxkyzktvwpqbypvs", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -async function main() { - vmmServersCreateOrUpdateMaximumSet(); - vmmServersCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersDeleteSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersDeleteSample.js deleted file mode 100644 index d40f733e2203..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersDeleteSample.js +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen.json - */ -async function vmmServersDeleteMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const vmmServerName = "."; - const options = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait( - resourceGroupName, - vmmServerName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MinimumSet_Gen.json - */ -async function vmmServersDeleteMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "8"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait(resourceGroupName, vmmServerName); - console.log(result); -} - -async function main() { - vmmServersDeleteMaximumSet(); - vmmServersDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersGetSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersGetSample.js deleted file mode 100644 index e08615ab695e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersGetSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen.json - */ -async function vmmServersGetMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MinimumSet_Gen.json - */ -async function vmmServersGetMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "D"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -async function main() { - vmmServersGetMaximumSet(); - vmmServersGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListByResourceGroupSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListByResourceGroupSample.js deleted file mode 100644 index b8494efb6ca8..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListByResourceGroupSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MaximumSet_Gen.json - */ -async function vmmServersListByResourceGroupMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MinimumSet_Gen.json - */ -async function vmmServersListByResourceGroupMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - vmmServersListByResourceGroupMaximumSet(); - vmmServersListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListBySubscriptionSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListBySubscriptionSample.js deleted file mode 100644 index 6a6a516c8df0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersListBySubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MaximumSet_Gen.json - */ -async function vmmServersListBySubscriptionMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MinimumSet_Gen.json - */ -async function vmmServersListBySubscriptionMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - vmmServersListBySubscriptionMaximumSet(); - vmmServersListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersUpdateSample.js b/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersUpdateSample.js deleted file mode 100644 index d501e61561d0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/javascript/vmmServersUpdateSample.js +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ScVmm } = require("@azure/arm-scvmm"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen.json - */ -async function vmmServersUpdateMaximumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "Y"; - const properties = { - tags: { key7187: "oktnfvklfchnquelzzdagtpwfskzc" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MinimumSet_Gen.json - */ -async function vmmServersUpdateMinimumSet() { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -async function main() { - vmmServersUpdateMaximumSet(); - vmmServersUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/README.md b/sdk/scvmm/arm-scvmm/samples/v1/typescript/README.md deleted file mode 100644 index 06c300ba6336..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [availabilitySetsCreateOrUpdateSample.ts][availabilitysetscreateorupdatesample] | Onboards the ScVmm availability set as an Azure resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json | -| [availabilitySetsDeleteSample.ts][availabilitysetsdeletesample] | Deregisters the ScVmm availability set from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MaximumSet_Gen.json | -| [availabilitySetsGetSample.ts][availabilitysetsgetsample] | Implements AvailabilitySet GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MaximumSet_Gen.json | -| [availabilitySetsListByResourceGroupSample.ts][availabilitysetslistbyresourcegroupsample] | List of AvailabilitySets in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json | -| [availabilitySetsListBySubscriptionSample.ts][availabilitysetslistbysubscriptionsample] | List of AvailabilitySets in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json | -| [availabilitySetsUpdateSample.ts][availabilitysetsupdatesample] | Updates the AvailabilitySets resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MaximumSet_Gen.json | -| [cloudsCreateOrUpdateSample.ts][cloudscreateorupdatesample] | Onboards the ScVmm fabric cloud as an Azure cloud resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MaximumSet_Gen.json | -| [cloudsDeleteSample.ts][cloudsdeletesample] | Deregisters the ScVmm fabric cloud from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json | -| [cloudsGetSample.ts][cloudsgetsample] | Implements Cloud GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json | -| [cloudsListByResourceGroupSample.ts][cloudslistbyresourcegroupsample] | List of Clouds in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MaximumSet_Gen.json | -| [cloudsListBySubscriptionSample.ts][cloudslistbysubscriptionsample] | List of Clouds in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MaximumSet_Gen.json | -| [cloudsUpdateSample.ts][cloudsupdatesample] | Updates the Clouds resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json | -| [guestAgentsCreateSample.ts][guestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen.json | -| [guestAgentsDeleteSample.ts][guestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen.json | -| [guestAgentsGetSample.ts][guestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen.json | -| [guestAgentsListByVirtualMachineInstanceSample.ts][guestagentslistbyvirtualmachineinstancesample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json | -| [inventoryItemsCreateSample.ts][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MaximumSet_Gen.json | -| [inventoryItemsDeleteSample.ts][inventoryitemsdeletesample] | Deletes an inventoryItem. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MaximumSet_Gen.json | -| [inventoryItemsGetSample.ts][inventoryitemsgetsample] | Shows an inventory item. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen.json | -| [inventoryItemsListByVmmServerSample.ts][inventoryitemslistbyvmmserversample] | Returns the list of inventoryItems in the given VmmServer. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen.json | -| [virtualMachineInstancesCreateCheckpointSample.ts][virtualmachineinstancescreatecheckpointsample] | Creates a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesCreateOrUpdateSample.ts][virtualmachineinstancescreateorupdatesample] | The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineInstancesDeleteCheckpointSample.ts][virtualmachineinstancesdeletecheckpointsample] | Deletes a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesDeleteSample.ts][virtualmachineinstancesdeletesample] | The operation to delete a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MaximumSet_Gen.json | -| [virtualMachineInstancesGetSample.ts][virtualmachineinstancesgetsample] | Retrieves information about a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MaximumSet_Gen.json | -| [virtualMachineInstancesListSample.ts][virtualmachineinstanceslistsample] | Lists all of the virtual machine instances within the specified parent resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MaximumSet_Gen.json | -| [virtualMachineInstancesRestartSample.ts][virtualmachineinstancesrestartsample] | The operation to restart a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MaximumSet_Gen.json | -| [virtualMachineInstancesRestoreCheckpointSample.ts][virtualmachineinstancesrestorecheckpointsample] | Restores to a checkpoint in virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json | -| [virtualMachineInstancesStartSample.ts][virtualmachineinstancesstartsample] | The operation to start a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MaximumSet_Gen.json | -| [virtualMachineInstancesStopSample.ts][virtualmachineinstancesstopsample] | The operation to power off (stop) a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MaximumSet_Gen.json | -| [virtualMachineInstancesUpdateSample.ts][virtualmachineinstancesupdatesample] | The operation to update a virtual machine instance. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MaximumSet_Gen.json | -| [virtualMachineTemplatesCreateOrUpdateSample.ts][virtualmachinetemplatescreateorupdatesample] | Onboards the ScVmm VM Template as an Azure VM Template resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineTemplatesDeleteSample.ts][virtualmachinetemplatesdeletesample] | Deregisters the ScVmm VM Template from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MaximumSet_Gen.json | -| [virtualMachineTemplatesGetSample.ts][virtualmachinetemplatesgetsample] | Implements VirtualMachineTemplate GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MaximumSet_Gen.json | -| [virtualMachineTemplatesListByResourceGroupSample.ts][virtualmachinetemplateslistbyresourcegroupsample] | List of VirtualMachineTemplates in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json | -| [virtualMachineTemplatesListBySubscriptionSample.ts][virtualmachinetemplateslistbysubscriptionsample] | List of VirtualMachineTemplates in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json | -| [virtualMachineTemplatesUpdateSample.ts][virtualmachinetemplatesupdatesample] | Updates the VirtualMachineTemplate resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MaximumSet_Gen.json | -| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Onboards the ScVmm virtual network as an Azure virtual network resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deregisters the ScVmm virtual network from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MaximumSet_Gen.json | -| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Implements VirtualNetwork GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MaximumSet_Gen.json | -| [virtualNetworksListByResourceGroupSample.ts][virtualnetworkslistbyresourcegroupsample] | List of VirtualNetworks in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json | -| [virtualNetworksListBySubscriptionSample.ts][virtualnetworkslistbysubscriptionsample] | List of VirtualNetworks in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json | -| [virtualNetworksUpdateSample.ts][virtualnetworksupdatesample] | Updates the VirtualNetworks resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MaximumSet_Gen.json | -| [vmInstanceHybridIdentityMetadatasGetSample.ts][vminstancehybrididentitymetadatasgetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json | -| [vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts][vminstancehybrididentitymetadataslistbyvirtualmachineinstancesample] | Returns the list of HybridIdentityMetadata of the given VM. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json | -| [vmmServersCreateOrUpdateSample.ts][vmmserverscreateorupdatesample] | Onboards the SCVmm fabric as an Azure VmmServer resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MaximumSet_Gen.json | -| [vmmServersDeleteSample.ts][vmmserversdeletesample] | Removes the SCVmm fabric from Azure. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen.json | -| [vmmServersGetSample.ts][vmmserversgetsample] | Implements VmmServer GET method. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen.json | -| [vmmServersListByResourceGroupSample.ts][vmmserverslistbyresourcegroupsample] | List of VmmServers in a resource group. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MaximumSet_Gen.json | -| [vmmServersListBySubscriptionSample.ts][vmmserverslistbysubscriptionsample] | List of VmmServers in a subscription. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MaximumSet_Gen.json | -| [vmmServersUpdateSample.ts][vmmserversupdatesample] | Updates the VmmServers resource. x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/availabilitySetsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env SCVMM_SUBSCRIPTION_ID="" SCVMM_RESOURCE_GROUP="" node dist/availabilitySetsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availabilitysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsCreateOrUpdateSample.ts -[availabilitysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsDeleteSample.ts -[availabilitysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsGetSample.ts -[availabilitysetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListByResourceGroupSample.ts -[availabilitysetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListBySubscriptionSample.ts -[availabilitysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsUpdateSample.ts -[cloudscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsCreateOrUpdateSample.ts -[cloudsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsDeleteSample.ts -[cloudsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsGetSample.ts -[cloudslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListByResourceGroupSample.ts -[cloudslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListBySubscriptionSample.ts -[cloudsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsUpdateSample.ts -[guestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsCreateSample.ts -[guestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsDeleteSample.ts -[guestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsGetSample.ts -[guestagentslistbyvirtualmachineinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsListByVirtualMachineInstanceSample.ts -[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsCreateSample.ts -[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsDeleteSample.ts -[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsGetSample.ts -[inventoryitemslistbyvmmserversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsListByVmmServerSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/operationsListSample.ts -[virtualmachineinstancescreatecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateCheckpointSample.ts -[virtualmachineinstancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts -[virtualmachineinstancesdeletecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteCheckpointSample.ts -[virtualmachineinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts -[virtualmachineinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts -[virtualmachineinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesListSample.ts -[virtualmachineinstancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts -[virtualmachineinstancesrestorecheckpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestoreCheckpointSample.ts -[virtualmachineinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts -[virtualmachineinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts -[virtualmachineinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts -[virtualmachinetemplatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesCreateOrUpdateSample.ts -[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts -[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts -[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts -[virtualmachinetemplateslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListBySubscriptionSample.ts -[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksCreateOrUpdateSample.ts -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksDeleteSample.ts -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksGetSample.ts -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts -[virtualnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListBySubscriptionSample.ts -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksUpdateSample.ts -[vminstancehybrididentitymetadatasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasGetSample.ts -[vminstancehybrididentitymetadataslistbyvirtualmachineinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts -[vmmserverscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersCreateOrUpdateSample.ts -[vmmserversdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersDeleteSample.ts -[vmmserversgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersGetSample.ts -[vmmserverslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListByResourceGroupSample.ts -[vmmserverslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListBySubscriptionSample.ts -[vmmserversupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersUpdateSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json b/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json deleted file mode 100644 index 5c3eeb1b3794..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-scvmm-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/scvmm/arm-scvmm" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm", - "dependencies": { - "@azure/arm-scvmm": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/sample.env b/sdk/scvmm/arm-scvmm/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsCreateOrUpdateSample.ts deleted file mode 100644 index 58c4dedad936..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AvailabilitySet, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const resource: AvailabilitySet = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "jelevilan", - properties: { - availabilitySetName: "njrpftunzo", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key5701: "cldtxloqh" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm availability set as an Azure resource. - * - * @summary Onboards the ScVmm availability set as an Azure resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_CreateOrUpdate_MinimumSet_Gen.json - */ -async function availabilitySetsCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "_"; - const resource: AvailabilitySet = { - extendedLocation: {}, - location: "jelevilan", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginCreateOrUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - availabilitySetsCreateOrUpdateMaximumSet(); - availabilitySetsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsDeleteSample.ts deleted file mode 100644 index 4e19b2ee5a89..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsDeleteSample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AvailabilitySetsDeleteOptionalParams, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MaximumSet_Gen.json - */ -async function availabilitySetsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const availabilitySetResourceName = "_"; - const options: AvailabilitySetsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm availability set from Azure. - * - * @summary Deregisters the ScVmm availability set from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Delete_MinimumSet_Gen.json - */ -async function availabilitySetsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "6"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginDeleteAndWait( - resourceGroupName, - availabilitySetResourceName, - ); - console.log(result); -} - -async function main(): Promise { - availabilitySetsDeleteMaximumSet(); - availabilitySetsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsGetSample.ts deleted file mode 100644 index e647bcc96cb7..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsGetSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MaximumSet_Gen.json - */ -async function availabilitySetsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get( - resourceGroupName, - availabilitySetResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Implements AvailabilitySet GET method. - * - * @summary Implements AvailabilitySet GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Get_MinimumSet_Gen.json - */ -async function availabilitySetsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "V"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.get( - resourceGroupName, - availabilitySetResourceName, - ); - console.log(result); -} - -async function main(): Promise { - availabilitySetsGetMaximumSet(); - availabilitySetsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListByResourceGroupSample.ts deleted file mode 100644 index 6cffdf807638..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListByResourceGroupSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a resource group. - * - * @summary List of AvailabilitySets in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListByResourceGroup_MinimumSet_Gen.json - */ -async function availabilitySetsListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - availabilitySetsListByResourceGroupMaximumSet(); - availabilitySetsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListBySubscriptionSample.ts deleted file mode 100644 index 205e344bf2a6..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsListBySubscriptionSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of AvailabilitySets in a subscription. - * - * @summary List of AvailabilitySets in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_ListBySubscription_MinimumSet_Gen.json - */ -async function availabilitySetsListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availabilitySets.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - availabilitySetsListBySubscriptionMaximumSet(); - availabilitySetsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsUpdateSample.ts deleted file mode 100644 index c5f66ba251e0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/availabilitySetsUpdateSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AvailabilitySetTagsUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MaximumSet_Gen.json - */ -async function availabilitySetsUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "-"; - const properties: AvailabilitySetTagsUpdate = { - tags: { key1460: "vcbwibkvr" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the AvailabilitySets resource. - * - * @summary Updates the AvailabilitySets resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/AvailabilitySets_Update_MinimumSet_Gen.json - */ -async function availabilitySetsUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const availabilitySetResourceName = "1"; - const properties: AvailabilitySetTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.availabilitySets.beginUpdateAndWait( - resourceGroupName, - availabilitySetResourceName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - availabilitySetsUpdateMaximumSet(); - availabilitySetsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsCreateOrUpdateSample.ts deleted file mode 100644 index 4e1427159be6..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsCreateOrUpdateSample.ts +++ /dev/null @@ -1,80 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Cloud, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MaximumSet_Gen.json - */ -async function cloudsCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "2"; - const resource: Cloud = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "khwsdmaxfhmbu", - properties: { - cloudCapacity: {}, - inventoryItemId: "qjd", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key4295: "wngosgcbdifaxdobufuuqxtho" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm fabric cloud as an Azure cloud resource. - * - * @summary Onboards the ScVmm fabric cloud as an Azure cloud resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_CreateOrUpdate_MinimumSet_Gen.json - */ -async function cloudsCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "-"; - const resource: Cloud = { extendedLocation: {}, location: "khwsdmaxfhmbu" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - cloudsCreateOrUpdateMaximumSet(); - cloudsCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsDeleteSample.ts deleted file mode 100644 index 19b3e4aa9adf..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsDeleteSample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudsDeleteOptionalParams, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json - */ -async function cloudsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const cloudResourceName = "-"; - const options: CloudsDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait( - resourceGroupName, - cloudResourceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm fabric cloud from Azure. - * - * @summary Deregisters the ScVmm fabric cloud from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MinimumSet_Gen.json - */ -async function cloudsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginDeleteAndWait( - resourceGroupName, - cloudResourceName, - ); - console.log(result); -} - -async function main(): Promise { - cloudsDeleteMaximumSet(); - cloudsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsGetSample.ts deleted file mode 100644 index bc2af4bccb05..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsGetSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json - */ -async function cloudsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements Cloud GET method. - * - * @summary Implements Cloud GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MinimumSet_Gen.json - */ -async function cloudsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "i"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.get(resourceGroupName, cloudResourceName); - console.log(result); -} - -async function main(): Promise { - cloudsGetMaximumSet(); - cloudsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListByResourceGroupSample.ts deleted file mode 100644 index ee1677a06306..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListByResourceGroupSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MaximumSet_Gen.json - */ -async function cloudsListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a resource group. - * - * @summary List of Clouds in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListByResourceGroup_MinimumSet_Gen.json - */ -async function cloudsListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - cloudsListByResourceGroupMaximumSet(); - cloudsListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListBySubscriptionSample.ts deleted file mode 100644 index e3cdd55dbb45..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsListBySubscriptionSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MaximumSet_Gen.json - */ -async function cloudsListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of Clouds in a subscription. - * - * @summary List of Clouds in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_ListBySubscription_MinimumSet_Gen.json - */ -async function cloudsListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clouds.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - cloudsListBySubscriptionMaximumSet(); - cloudsListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsUpdateSample.ts deleted file mode 100644 index 1df8d12fa2ff..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/cloudsUpdateSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudTagsUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json - */ -async function cloudsUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "P"; - const properties: CloudTagsUpdate = { - tags: { key5266: "hjpcnwmpnixsolrxnbl" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the Clouds resource. - * - * @summary Updates the Clouds resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MinimumSet_Gen.json - */ -async function cloudsUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const cloudResourceName = "_"; - const properties: CloudTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.clouds.beginUpdateAndWait( - resourceGroupName, - cloudResourceName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - cloudsUpdateMaximumSet(); - cloudsUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsCreateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsCreateSample.ts deleted file mode 100644 index d0cb3c171037..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsCreateSample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { GuestAgent, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen.json - */ -async function guestAgentsCreateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: GuestAgent = { - properties: { - credentials: { - password: "SecretPlaceholder", - username: "jqxuwirrcpfv", - }, - httpProxyConfig: { httpsProxy: "uoyzyticmohohomlkwct" }, - provisioningAction: "install", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update GuestAgent. - * - * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MinimumSet_Gen.json - */ -async function guestAgentsCreateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: GuestAgent = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.beginCreateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -async function main(): Promise { - guestAgentsCreateMaximumSet(); - guestAgentsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsDeleteSample.ts deleted file mode 100644 index 12392a15d9a5..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsDeleteSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen.json - */ -async function guestAgentsDeleteMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent DELETE method. - * - * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MinimumSet_Gen.json - */ -async function guestAgentsDeleteMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.delete(resourceUri); - console.log(result); -} - -async function main(): Promise { - guestAgentsDeleteMaximumSet(); - guestAgentsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsGetSample.ts deleted file mode 100644 index 76645714a7cb..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsGetSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen.json - */ -async function guestAgentsGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements GuestAgent GET method. - * - * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MinimumSet_Gen.json - */ -async function guestAgentsGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.guestAgents.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - guestAgentsGetMaximumSet(); - guestAgentsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsListByVirtualMachineInstanceSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsListByVirtualMachineInstanceSample.ts deleted file mode 100644 index 5772d9728b5c..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/guestAgentsListByVirtualMachineInstanceSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.guestAgents.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of GuestAgent of the given vm. - * - * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function guestAgentsListByVirtualMachineInstanceMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.guestAgents.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - guestAgentsListByVirtualMachineInstanceMaximumSet(); - guestAgentsListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsCreateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsCreateSample.ts deleted file mode 100644 index 95db7ad20cdd..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsCreateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { InventoryItem, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MaximumSet_Gen.json - */ -async function inventoryItemsCreateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "O"; - const inventoryItemResourceName = "1BdDc2Ab-bDd9-Ebd6-bfdb-C0dbbdB5DEDf"; - const resource: InventoryItem = { - kind: "M\\d_,V.", - properties: { inventoryType: "Cloud" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create Or Update InventoryItem. - * - * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Create_MinimumSet_Gen.json - */ -async function inventoryItemsCreateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const inventoryItemResourceName = "bbFb0cBb-50ce-4bfc-3eeD-bC26AbCC257a"; - const resource: InventoryItem = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.create( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - inventoryItemsCreateMaximumSet(); - inventoryItemsCreateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsDeleteSample.ts deleted file mode 100644 index 18a896110e35..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsDeleteSample.ts +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MaximumSet_Gen.json - */ -async function inventoryItemsDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "b"; - const inventoryItemResourceName = "EcECadfd-Eaaa-e5Ce-ebdA-badeEd3c6af1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes an inventoryItem. - * - * @summary Deletes an inventoryItem. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Delete_MinimumSet_Gen.json - */ -async function inventoryItemsDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cDBcbae6-BC3d-52fe-CedC-7eFeaBFabb82"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.delete( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main(): Promise { - inventoryItemsDeleteMaximumSet(); - inventoryItemsDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsGetSample.ts deleted file mode 100644 index e73d7578e93e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsGetSample.ts +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen.json - */ -async function inventoryItemsGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "1"; - const inventoryItemResourceName = "2bFBede6-EEf8-becB-dBbd-B96DbBFdB3f3"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Shows an inventory item. - * - * @summary Shows an inventory item. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MinimumSet_Gen.json - */ -async function inventoryItemsGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const inventoryItemResourceName = "cacb8Ceb-efAC-bebb-ae7C-dec8C5Bb7100"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.inventoryItems.get( - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - ); - console.log(result); -} - -async function main(): Promise { - inventoryItemsGetMaximumSet(); - inventoryItemsGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsListByVmmServerSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsListByVmmServerSample.ts deleted file mode 100644 index 003eebc4a09c..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/inventoryItemsListByVmmServerSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MaximumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "X"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.inventoryItems.listByVmmServer( - resourceGroupName, - vmmServerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of inventoryItems in the given VmmServer. - * - * @summary Returns the list of inventoryItems in the given VmmServer. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_ListByVmmServer_MinimumSet_Gen.json - */ -async function inventoryItemsListByVmmServerMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "H"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.inventoryItems.listByVmmServer( - resourceGroupName, - vmmServerName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - inventoryItemsListByVmmServerMaximumSet(); - inventoryItemsListByVmmServerMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/operationsListSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 08039ab3ab72..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - operationsListMaximumSet(); - operationsListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateCheckpointSample.ts deleted file mode 100644 index 15b34f20b460..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateCheckpointSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineCreateCheckpoint, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineCreateCheckpoint = { - name: "ilvltf", - description: "zoozhfbepldrgpjqsbhpqebtodrhvy", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a checkpoint in virtual machine instance. - * - * @summary Creates a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineCreateCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginCreateCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesCreateCheckpointMaximumSet(); - virtualMachineInstancesCreateCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts deleted file mode 100644 index 62a2902f8968..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,135 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineInstance, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: VirtualMachineInstance = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - isHighlyAvailable: "true", - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { - biosGuid: "xixivxifyql", - checkpointType: "jkbpzjxpeegackhsvikrnlnwqz", - cloudId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/clouds/cloudResourceName", - generation: 28, - inventoryItemId: "ihkkqmg", - lastRestoredVmCheckpoint: { - name: "keqn", - description: "qurzfrgyflrh", - checkpointId: "wsqmrje", - parentCheckpointId: "hqhhzikoxunuqguouw", - }, - templateId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName", - uuid: "hrpw", - vmName: "qovpayfydhcvfrhe", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - osProfile: { - adminPassword: "vavtppmmhlspydtkzxda", - computerName: "uuxpcxuxcufllc", - osType: "Windows", - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - createDiffDisk: "true", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - templateDiskId: "lcdwrokpyvekqccclf", - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * - * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineInstancesCreateOrUpdateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const resource: VirtualMachineInstance = { extendedLocation: {} }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginCreateOrUpdateAndWait( - resourceUri, - resource, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesCreateOrUpdateMaximumSet(); - virtualMachineInstancesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteCheckpointSample.ts deleted file mode 100644 index 2435f6e0c18a..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteCheckpointSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineDeleteCheckpoint, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineDeleteCheckpoint = { - id: "eenfflimcbgqfsebdusophahjpk", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deletes a checkpoint in virtual machine instance. - * - * @summary Deletes a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_DeleteCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineDeleteCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginDeleteCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesDeleteCheckpointMaximumSet(); - virtualMachineInstancesDeleteCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts deleted file mode 100644 index 8aa8dee03bfa..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineInstancesDeleteOptionalParams, - ScVmm, -} from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MaximumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const force = "true"; - const deleteFromHost = "true"; - const options: VirtualMachineInstancesDeleteOptionalParams = { - force, - deleteFromHost, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginDeleteAndWait( - resourceUri, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to delete a virtual machine instance. - * - * @summary The operation to delete a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Delete_MinimumSet_Gen.json - */ -async function virtualMachineInstancesDeleteMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginDeleteAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesDeleteMaximumSet(); - virtualMachineInstancesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts deleted file mode 100644 index 183f3acbd502..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MaximumSet_Gen.json - */ -async function virtualMachineInstancesGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves information about a virtual machine instance. - * - * @summary Retrieves information about a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Get_MinimumSet_Gen.json - */ -async function virtualMachineInstancesGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesGetMaximumSet(); - virtualMachineInstancesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesListSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesListSample.ts deleted file mode 100644 index 4c9888d66fd0..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesListSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MaximumSet_Gen.json - */ -async function virtualMachineInstancesListMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. - * - * @summary Lists all of the virtual machine instances within the specified parent resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_List_MinimumSet_Gen.json - */ -async function virtualMachineInstancesListMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.virtualMachineInstances.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - virtualMachineInstancesListMaximumSet(); - virtualMachineInstancesListMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts deleted file mode 100644 index 9f524f442ad9..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestartMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to restart a virtual machine instance. - * - * @summary The operation to restart a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Restart_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestartMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginRestartAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesRestartMaximumSet(); - virtualMachineInstancesRestartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestoreCheckpointSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestoreCheckpointSample.ts deleted file mode 100644 index 7a8c39ea6f86..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesRestoreCheckpointSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineRestoreCheckpoint, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineRestoreCheckpoint = { id: "rweqduwzsn" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Restores to a checkpoint in virtual machine instance. - * - * @summary Restores to a checkpoint in virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_RestoreCheckpoint_MinimumSet_Gen.json - */ -async function virtualMachineInstancesRestoreCheckpointMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: VirtualMachineRestoreCheckpoint = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginRestoreCheckpointAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesRestoreCheckpointMaximumSet(); - virtualMachineInstancesRestoreCheckpointMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts deleted file mode 100644 index 0136f4defa48..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStartMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to start a virtual machine instance. - * - * @summary The operation to start a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Start_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStartMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.virtualMachineInstances.beginStartAndWait(resourceUri); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesStartMaximumSet(); - virtualMachineInstancesStartMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts deleted file mode 100644 index 869f0482314e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { StopVirtualMachineOptions, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MaximumSet_Gen.json - */ -async function virtualMachineInstancesStopMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: StopVirtualMachineOptions = { skipShutdown: "true" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait( - resourceUri, - body, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. - * - * @summary The operation to power off (stop) a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Stop_MinimumSet_Gen.json - */ -async function virtualMachineInstancesStopMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const body: StopVirtualMachineOptions = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginStopAndWait( - resourceUri, - body, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesStopMaximumSet(); - virtualMachineInstancesStopMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts deleted file mode 100644 index 6b08093cc3bb..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts +++ /dev/null @@ -1,102 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineInstanceUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MaximumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const properties: VirtualMachineInstanceUpdate = { - properties: { - availabilitySets: [ - { - name: "lwbhaseo", - id: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/availabilitySets/availabilitySetResourceName", - }, - ], - hardwareProfile: { - cpuCount: 22, - dynamicMemoryEnabled: "true", - dynamicMemoryMaxMB: 2, - dynamicMemoryMinMB: 30, - limitCpuForMigration: "true", - memoryMB: 5, - }, - infrastructureProfile: { checkpointType: "jkbpzjxpeegackhsvikrnlnwqz" }, - networkProfile: { - networkInterfaces: [ - { - name: "kvofzqulbjlbtt", - ipv4AddressType: "Dynamic", - ipv6AddressType: "Dynamic", - macAddress: "oaeqqegt", - macAddressType: "Dynamic", - nicId: "roxpsvlo", - virtualNetworkId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName", - }, - ], - }, - storageProfile: { - disks: [ - { - name: "fgnckfymwdsqnfxkdvexuaobe", - bus: 8, - busType: "zu", - diskId: "ltdrwcfjklpsimhzqyh", - diskSizeGB: 30, - lun: 10, - storageQosPolicy: { name: "ceiyfrflu", id: "o" }, - vhdType: "cnbeeeylrvopigdynvgpkfp", - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait( - resourceUri, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to The operation to update a virtual machine instance. - * - * @summary The operation to update a virtual machine instance. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineInstances_Update_MinimumSet_Gen.json - */ -async function virtualMachineInstancesUpdateMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const properties: VirtualMachineInstanceUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = await client.virtualMachineInstances.beginUpdateAndWait( - resourceUri, - properties, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineInstancesUpdateMaximumSet(); - virtualMachineInstancesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesCreateOrUpdateSample.ts deleted file mode 100644 index 28b4f4e35b44..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,89 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineTemplate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "6"; - const resource: VirtualMachineTemplate = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "ayxsyduviotylbojh", - properties: { - dynamicMemoryEnabled: "true", - inventoryItemId: "qjrykoogccwlgkd", - isCustomizable: "true", - isHighlyAvailable: "true", - limitCpuForMigration: "true", - osType: "Windows", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key9494: "kkbmfpwhmvlobm" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = - await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm VM Template as an Azure VM Template resource. - * - * @summary Onboards the ScVmm VM Template as an Azure VM Template resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "P"; - const resource: VirtualMachineTemplate = { - extendedLocation: {}, - location: "ayxsyduviotylbojh", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = - await client.virtualMachineTemplates.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineTemplatesCreateOrUpdateMaximumSet(); - virtualMachineTemplatesCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts deleted file mode 100644 index bc83949d17dc..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineTemplatesDeleteOptionalParams, - ScVmm, -} from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualMachineTemplateName = "6"; - const options: VirtualMachineTemplatesDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm VM Template from Azure. - * - * @summary Deregisters the ScVmm VM Template from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Delete_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "5"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginDeleteAndWait( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineTemplatesDeleteMaximumSet(); - virtualMachineTemplatesDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts deleted file mode 100644 index 7503fa98df6d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "4"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualMachineTemplate GET method. - * - * @summary Implements VirtualMachineTemplate GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Get_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "m"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.get( - resourceGroupName, - virtualMachineTemplateName, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineTemplatesGetMaximumSet(); - virtualMachineTemplatesGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts deleted file mode 100644 index aa3ca2392f8e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a resource group. - * - * @summary List of VirtualMachineTemplates in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - virtualMachineTemplatesListByResourceGroupMaximumSet(); - virtualMachineTemplatesListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListBySubscriptionSample.ts deleted file mode 100644 index 66de7c8af748..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesListBySubscriptionSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualMachineTemplates in a subscription. - * - * @summary List of VirtualMachineTemplates in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachineTemplates.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - virtualMachineTemplatesListBySubscriptionMaximumSet(); - virtualMachineTemplatesListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts deleted file mode 100644 index b7bce43a32ec..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachineTemplateTagsUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MaximumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "g"; - const properties: VirtualMachineTemplateTagsUpdate = { - tags: { key6634: "wwfhrg" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualMachineTemplate resource. - * - * @summary Updates the VirtualMachineTemplate resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualMachineTemplates_Update_MinimumSet_Gen.json - */ -async function virtualMachineTemplatesUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualMachineTemplateName = "-"; - const properties: VirtualMachineTemplateTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualMachineTemplates.beginUpdateAndWait( - resourceGroupName, - virtualMachineTemplateName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - virtualMachineTemplatesUpdateMaximumSet(); - virtualMachineTemplatesUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index d896c3af3825..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualNetwork, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "_"; - const resource: VirtualNetwork = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "fky", - properties: { - inventoryItemId: "bxn", - uuid: "12345678-1234-1234-1234-12345678abcd", - vmmServerId: - "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName", - }, - tags: { key705: "apgplvjdyocx" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the ScVmm virtual network as an Azure virtual network resource. - * - * @summary Onboards the ScVmm virtual network as an Azure virtual network resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_CreateOrUpdate_MinimumSet_Gen.json - */ -async function virtualNetworksCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const resource: VirtualNetwork = { extendedLocation: {}, location: "fky" }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworkName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - virtualNetworksCreateOrUpdateMaximumSet(); - virtualNetworksCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksDeleteSample.ts deleted file mode 100644 index e3d9fd6ae621..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualNetworksDeleteOptionalParams, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MaximumSet_Gen.json - */ -async function virtualNetworksDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const virtualNetworkName = "."; - const options: VirtualNetworksDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deregisters the ScVmm virtual network from Azure. - * - * @summary Deregisters the ScVmm virtual network from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Delete_MinimumSet_Gen.json - */ -async function virtualNetworksDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "1"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginDeleteAndWait( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - virtualNetworksDeleteMaximumSet(); - virtualNetworksDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksGetSample.ts deleted file mode 100644 index ebf347d42cef..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksGetSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MaximumSet_Gen.json - */ -async function virtualNetworksGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "2"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VirtualNetwork GET method. - * - * @summary Implements VirtualNetwork GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Get_MinimumSet_Gen.json - */ -async function virtualNetworksGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.get( - resourceGroupName, - virtualNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - virtualNetworksGetMaximumSet(); - virtualNetworksGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts deleted file mode 100644 index e00f90490163..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a resource group. - * - * @summary List of VirtualNetworks in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListByResourceGroup_MinimumSet_Gen.json - */ -async function virtualNetworksListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - virtualNetworksListByResourceGroupMaximumSet(); - virtualNetworksListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListBySubscriptionSample.ts deleted file mode 100644 index 51a64f87efea..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VirtualNetworks in a subscription. - * - * @summary List of VirtualNetworks in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_ListBySubscription_MinimumSet_Gen.json - */ -async function virtualNetworksListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - virtualNetworksListBySubscriptionMaximumSet(); - virtualNetworksListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksUpdateSample.ts deleted file mode 100644 index e24dbe6ea796..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/virtualNetworksUpdateSample.ts +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualNetworkTagsUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MaximumSet_Gen.json - */ -async function virtualNetworksUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "S"; - const properties: VirtualNetworkTagsUpdate = { tags: { key9516: "oxduo" } }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VirtualNetworks resource. - * - * @summary Updates the VirtualNetworks resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VirtualNetworks_Update_MinimumSet_Gen.json - */ -async function virtualNetworksUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const virtualNetworkName = "-"; - const properties: VirtualNetworkTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.virtualNetworks.beginUpdateAndWait( - resourceGroupName, - virtualNetworkName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - virtualNetworksUpdateMaximumSet(); - virtualNetworksUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasGetSample.ts deleted file mode 100644 index f8296fd4546e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasGetSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata GET method. - * - * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_Get_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasGetMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const result = - await client.vmInstanceHybridIdentityMetadatas.get(resourceUri); - console.log(result); -} - -async function main(): Promise { - vmInstanceHybridIdentityMetadatasGetMaximumSet(); - vmInstanceHybridIdentityMetadatasGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts deleted file mode 100644 index 8ad29398fc9d..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given VM. - * - * @summary Returns the list of HybridIdentityMetadata of the given VM. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ -async function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet(): Promise { - const resourceUri = "gtgclehcbsyave"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential); - const resArray = new Array(); - for await (let item of client.vmInstanceHybridIdentityMetadatas.listByVirtualMachineInstance( - resourceUri, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet(); - vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersCreateOrUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersCreateOrUpdateSample.ts deleted file mode 100644 index bca69355163e..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VmmServer, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MaximumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "-"; - const resource: VmmServer = { - extendedLocation: { - name: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName", - type: "customLocation", - }, - location: "hslxkyzktvwpqbypvs", - properties: { - credentials: { password: "SecretPlaceholder", username: "jbuoltypmrgqfi" }, - fqdn: "pvzcjaqrswbvptgx", - port: 4, - }, - tags: { key4834: "vycgfkzjcyyuotwwq" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Onboards the SCVmm fabric as an Azure VmmServer resource. - * - * @summary Onboards the SCVmm fabric as an Azure VmmServer resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_CreateOrUpdate_MinimumSet_Gen.json - */ -async function vmmServersCreateOrUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "w"; - const resource: VmmServer = { - extendedLocation: {}, - location: "hslxkyzktvwpqbypvs", - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginCreateOrUpdateAndWait( - resourceGroupName, - vmmServerName, - resource, - ); - console.log(result); -} - -async function main(): Promise { - vmmServersCreateOrUpdateMaximumSet(); - vmmServersCreateOrUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersDeleteSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersDeleteSample.ts deleted file mode 100644 index 31f87d57b2b4..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersDeleteSample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VmmServersDeleteOptionalParams, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen.json - */ -async function vmmServersDeleteMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const force = "true"; - const vmmServerName = "."; - const options: VmmServersDeleteOptionalParams = { force }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait( - resourceGroupName, - vmmServerName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Removes the SCVmm fabric from Azure. - * - * @summary Removes the SCVmm fabric from Azure. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MinimumSet_Gen.json - */ -async function vmmServersDeleteMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "8"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginDeleteAndWait( - resourceGroupName, - vmmServerName, - ); - console.log(result); -} - -async function main(): Promise { - vmmServersDeleteMaximumSet(); - vmmServersDeleteMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersGetSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersGetSample.ts deleted file mode 100644 index 9ce9d49728db..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersGetSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen.json - */ -async function vmmServersGetMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "."; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -/** - * This sample demonstrates how to Implements VmmServer GET method. - * - * @summary Implements VmmServer GET method. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MinimumSet_Gen.json - */ -async function vmmServersGetMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "D"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.get(resourceGroupName, vmmServerName); - console.log(result); -} - -async function main(): Promise { - vmmServersGetMaximumSet(); - vmmServersGetMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListByResourceGroupSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListByResourceGroupSample.ts deleted file mode 100644 index 11f22bb9b809..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListByResourceGroupSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MaximumSet_Gen.json - */ -async function vmmServersListByResourceGroupMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a resource group. - * - * @summary List of VmmServers in a resource group. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListByResourceGroup_MinimumSet_Gen.json - */ -async function vmmServersListByResourceGroupMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - vmmServersListByResourceGroupMaximumSet(); - vmmServersListByResourceGroupMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListBySubscriptionSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListBySubscriptionSample.ts deleted file mode 100644 index 89ae337dd390..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersListBySubscriptionSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MaximumSet_Gen.json - */ -async function vmmServersListBySubscriptionMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List of VmmServers in a subscription. - * - * @summary List of VmmServers in a subscription. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_ListBySubscription_MinimumSet_Gen.json - */ -async function vmmServersListBySubscriptionMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vmmServers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - vmmServersListBySubscriptionMaximumSet(); - vmmServersListBySubscriptionMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersUpdateSample.ts b/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersUpdateSample.ts deleted file mode 100644 index b4710408d6ff..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/src/vmmServersUpdateSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VmmServerTagsUpdate, ScVmm } from "@azure/arm-scvmm"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen.json - */ -async function vmmServersUpdateMaximumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "Y"; - const properties: VmmServerTagsUpdate = { - tags: { key7187: "oktnfvklfchnquelzzdagtpwfskzc" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates the VmmServers resource. - * - * @summary Updates the VmmServers resource. - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MinimumSet_Gen.json - */ -async function vmmServersUpdateMinimumSet(): Promise { - const subscriptionId = - process.env["SCVMM_SUBSCRIPTION_ID"] || - "79332E5A-630B-480F-A266-A941C015AB19"; - const resourceGroupName = process.env["SCVMM_RESOURCE_GROUP"] || "rgscvmm"; - const vmmServerName = "_"; - const properties: VmmServerTagsUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new ScVmm(credential, subscriptionId); - const result = await client.vmmServers.beginUpdateAndWait( - resourceGroupName, - vmmServerName, - properties, - ); - console.log(result); -} - -async function main(): Promise { - vmmServersUpdateMaximumSet(); - vmmServersUpdateMinimumSet(); -} - -main().catch(console.error); diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/tsconfig.json b/sdk/scvmm/arm-scvmm/samples/v1/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/scvmm/arm-scvmm/src/api/availabilitySets/index.ts b/sdk/scvmm/arm-scvmm/src/api/availabilitySets/index.ts new file mode 100644 index 000000000000..d97843821823 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/availabilitySets/index.ts @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsGetOptionalParams, + AvailabilitySetsListByResourceGroupOptionalParams, + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsUpdateOptionalParams, + ScVmmContext as Client, +} from "../index.js"; +import { + errorResponseDeserializer, + AvailabilitySet, + availabilitySetSerializer, + availabilitySetDeserializer, + AvailabilitySetTagsUpdate, + availabilitySetTagsUpdateSerializer, + _AvailabilitySetListResult, + _availabilitySetListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _availabilitySetsListBySubscriptionSend( + context: Client, + options: AvailabilitySetsListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _availabilitySetsListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailabilitySetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _availabilitySetListResultDeserializer(result.body); +} + +/** List of AvailabilitySets in a subscription. */ +export function availabilitySetsListBySubscription( + context: Client, + options: AvailabilitySetsListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _availabilitySetsListBySubscriptionSend(context, options), + _availabilitySetsListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _availabilitySetsListByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: AvailabilitySetsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _availabilitySetsListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AvailabilitySetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _availabilitySetListResultDeserializer(result.body); +} + +/** List of AvailabilitySets in a resource group. */ +export function availabilitySetsListByResourceGroup( + context: Client, + resourceGroupName: string, + options: AvailabilitySetsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _availabilitySetsListByResourceGroupSend(context, resourceGroupName, options), + _availabilitySetsListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _availabilitySetsDeleteSend( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + options: AvailabilitySetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", + context.subscriptionId, + resourceGroupName, + availabilitySetResourceName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + }, + }); +} + +export async function _availabilitySetsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deregisters the ScVmm availability set from Azure. */ +export function availabilitySetsDelete( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + options: AvailabilitySetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _availabilitySetsDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _availabilitySetsDeleteSend(context, resourceGroupName, availabilitySetResourceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _availabilitySetsUpdateSend( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + properties: AvailabilitySetTagsUpdate, + options: AvailabilitySetsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", + context.subscriptionId, + resourceGroupName, + availabilitySetResourceName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: availabilitySetTagsUpdateSerializer(properties), + }); +} + +export async function _availabilitySetsUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return availabilitySetDeserializer(result.body); +} + +/** Updates the AvailabilitySets resource. */ +export function availabilitySetsUpdate( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + properties: AvailabilitySetTagsUpdate, + options: AvailabilitySetsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AvailabilitySet> { + return getLongRunningPoller(context, _availabilitySetsUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _availabilitySetsUpdateSend( + context, + resourceGroupName, + availabilitySetResourceName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, AvailabilitySet>; +} + +export function _availabilitySetsCreateOrUpdateSend( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + resource: AvailabilitySet, + options: AvailabilitySetsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", + context.subscriptionId, + resourceGroupName, + availabilitySetResourceName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: availabilitySetSerializer(resource), + }); +} + +export async function _availabilitySetsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return availabilitySetDeserializer(result.body); +} + +/** Onboards the ScVmm availability set as an Azure resource. */ +export function availabilitySetsCreateOrUpdate( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + resource: AvailabilitySet, + options: AvailabilitySetsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, AvailabilitySet> { + return getLongRunningPoller(context, _availabilitySetsCreateOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _availabilitySetsCreateOrUpdateSend( + context, + resourceGroupName, + availabilitySetResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, AvailabilitySet>; +} + +export function _availabilitySetsGetSend( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + options: AvailabilitySetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", + context.subscriptionId, + resourceGroupName, + availabilitySetResourceName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _availabilitySetsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return availabilitySetDeserializer(result.body); +} + +/** Implements AvailabilitySet GET method. */ +export async function availabilitySetsGet( + context: Client, + resourceGroupName: string, + availabilitySetResourceName: string, + options: AvailabilitySetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _availabilitySetsGetSend( + context, + resourceGroupName, + availabilitySetResourceName, + options, + ); + return _availabilitySetsGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/clouds/index.ts b/sdk/scvmm/arm-scvmm/src/api/clouds/index.ts new file mode 100644 index 000000000000..ab5d450ccde3 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/clouds/index.ts @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + CloudsCreateOrUpdateOptionalParams, + CloudsDeleteOptionalParams, + CloudsGetOptionalParams, + CloudsListByResourceGroupOptionalParams, + CloudsListBySubscriptionOptionalParams, + CloudsUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + Cloud, + cloudSerializer, + cloudDeserializer, + CloudTagsUpdate, + cloudTagsUpdateSerializer, + _CloudListResult, + _cloudListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _cloudsListBySubscriptionSend( + context: Client, + options: CloudsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _cloudsListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_CloudListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _cloudListResultDeserializer(result.body); +} + +/** List of Clouds in a subscription. */ +export function cloudsListBySubscription( + context: Client, + options: CloudsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _cloudsListBySubscriptionSend(context, options), + _cloudsListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _cloudsListByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: CloudsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _cloudsListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_CloudListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _cloudListResultDeserializer(result.body); +} + +/** List of Clouds in a resource group. */ +export function cloudsListByResourceGroup( + context: Client, + resourceGroupName: string, + options: CloudsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _cloudsListByResourceGroupSend(context, resourceGroupName, options), + _cloudsListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _cloudsDeleteSend( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + options: CloudsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", + context.subscriptionId, + resourceGroupName, + cloudResourceName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + }, + }); +} + +export async function _cloudsDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deregisters the ScVmm fabric cloud from Azure. */ +export function cloudsDelete( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + options: CloudsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _cloudsDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cloudsDeleteSend(context, resourceGroupName, cloudResourceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _cloudsUpdateSend( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + properties: CloudTagsUpdate, + options: CloudsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", + context.subscriptionId, + resourceGroupName, + cloudResourceName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: cloudTagsUpdateSerializer(properties), + }); +} + +export async function _cloudsUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return cloudDeserializer(result.body); +} + +/** Updates the Clouds resource. */ +export function cloudsUpdate( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + properties: CloudTagsUpdate, + options: CloudsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cloud> { + return getLongRunningPoller(context, _cloudsUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cloudsUpdateSend(context, resourceGroupName, cloudResourceName, properties, options), + resourceLocationConfig: "location", + }) as PollerLike, Cloud>; +} + +export function _cloudsCreateOrUpdateSend( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + resource: Cloud, + options: CloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", + context.subscriptionId, + resourceGroupName, + cloudResourceName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: cloudSerializer(resource), + }); +} + +export async function _cloudsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return cloudDeserializer(result.body); +} + +/** Onboards the ScVmm fabric cloud as an Azure cloud resource. */ +export function cloudsCreateOrUpdate( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + resource: Cloud, + options: CloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cloud> { + return getLongRunningPoller(context, _cloudsCreateOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cloudsCreateOrUpdateSend(context, resourceGroupName, cloudResourceName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Cloud>; +} + +export function _cloudsGetSend( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + options: CloudsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", + context.subscriptionId, + resourceGroupName, + cloudResourceName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _cloudsGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return cloudDeserializer(result.body); +} + +/** Implements Cloud GET method. */ +export async function cloudsGet( + context: Client, + resourceGroupName: string, + cloudResourceName: string, + options: CloudsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _cloudsGetSend(context, resourceGroupName, cloudResourceName, options); + return _cloudsGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/guestAgents/index.ts b/sdk/scvmm/arm-scvmm/src/api/guestAgents/index.ts new file mode 100644 index 000000000000..eef8c43730c4 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/guestAgents/index.ts @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + GuestAgentsCreateOptionalParams, + GuestAgentsDeleteOptionalParams, + GuestAgentsGetOptionalParams, + GuestAgentsListByVirtualMachineInstanceOptionalParams, +} from "../index.js"; +import { + GuestAgent, + guestAgentSerializer, + guestAgentDeserializer, + errorResponseDeserializer, + _GuestAgentListResult, + _guestAgentListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _guestAgentsListByVirtualMachineInstanceSend( + context: Client, + resourceUri: string, + options: GuestAgentsListByVirtualMachineInstanceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents", { + value: resourceUri, + allowReserved: true, + }) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _guestAgentsListByVirtualMachineInstanceDeserialize( + result: PathUncheckedResponse, +): Promise<_GuestAgentListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _guestAgentListResultDeserializer(result.body); +} + +/** Returns the list of GuestAgent of the given vm. */ +export function guestAgentsListByVirtualMachineInstance( + context: Client, + resourceUri: string, + options: GuestAgentsListByVirtualMachineInstanceOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _guestAgentsListByVirtualMachineInstanceSend(context, resourceUri, options), + _guestAgentsListByVirtualMachineInstanceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _guestAgentsDeleteSend( + context: Client, + resourceUri: string, + options: GuestAgentsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + { value: resourceUri, allowReserved: true }, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _guestAgentsDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Implements GuestAgent DELETE method. */ +export async function guestAgentsDelete( + context: Client, + resourceUri: string, + options: GuestAgentsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _guestAgentsDeleteSend(context, resourceUri, options); + return _guestAgentsDeleteDeserialize(result); +} + +export function _guestAgentsCreateSend( + context: Client, + resourceUri: string, + resource: GuestAgent, + options: GuestAgentsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + { value: resourceUri, allowReserved: true }, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: guestAgentSerializer(resource), + }); +} + +export async function _guestAgentsCreateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return guestAgentDeserializer(result.body); +} + +/** Create Or Update GuestAgent. */ +export function guestAgentsCreate( + context: Client, + resourceUri: string, + resource: GuestAgent, + options: GuestAgentsCreateOptionalParams = { requestOptions: {} }, +): PollerLike, GuestAgent> { + return getLongRunningPoller(context, _guestAgentsCreateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _guestAgentsCreateSend(context, resourceUri, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, GuestAgent>; +} + +export function _guestAgentsGetSend( + context: Client, + resourceUri: string, + options: GuestAgentsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + { value: resourceUri, allowReserved: true }, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _guestAgentsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return guestAgentDeserializer(result.body); +} + +/** Implements GuestAgent GET method. */ +export async function guestAgentsGet( + context: Client, + resourceUri: string, + options: GuestAgentsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _guestAgentsGetSend(context, resourceUri, options); + return _guestAgentsGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/index.ts b/sdk/scvmm/arm-scvmm/src/api/index.ts new file mode 100644 index 000000000000..2f0779ef864d --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/index.ts @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + GuestAgentsListByVirtualMachineInstanceOptionalParams, + GuestAgentsDeleteOptionalParams, + GuestAgentsCreateOptionalParams, + GuestAgentsGetOptionalParams, + VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, + VmInstanceHybridIdentityMetadatasGetOptionalParams, + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesGetOptionalParams, + InventoryItemsListByVmmServerOptionalParams, + InventoryItemsDeleteOptionalParams, + InventoryItemsCreateOptionalParams, + InventoryItemsGetOptionalParams, + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsListByResourceGroupOptionalParams, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsUpdateOptionalParams, + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsGetOptionalParams, + VirtualMachineTemplatesListBySubscriptionOptionalParams, + VirtualMachineTemplatesListByResourceGroupOptionalParams, + VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesUpdateOptionalParams, + VirtualMachineTemplatesCreateOrUpdateOptionalParams, + VirtualMachineTemplatesGetOptionalParams, + VirtualNetworksListBySubscriptionOptionalParams, + VirtualNetworksListByResourceGroupOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, + CloudsListBySubscriptionOptionalParams, + CloudsListByResourceGroupOptionalParams, + CloudsDeleteOptionalParams, + CloudsUpdateOptionalParams, + CloudsCreateOrUpdateOptionalParams, + CloudsGetOptionalParams, + VmmServersListBySubscriptionOptionalParams, + VmmServersListByResourceGroupOptionalParams, + VmmServersDeleteOptionalParams, + VmmServersUpdateOptionalParams, + VmmServersCreateOrUpdateOptionalParams, + VmmServersGetOptionalParams, + OperationsListOptionalParams, +} from "./options.js"; +export { createScVmm, ScVmmContext, ScVmmClientOptionalParams } from "./scVmmContext.js"; +export { + availabilitySetsListBySubscription, + availabilitySetsListByResourceGroup, + availabilitySetsDelete, + availabilitySetsUpdate, + availabilitySetsCreateOrUpdate, + availabilitySetsGet, +} from "./availabilitySets/index.js"; +export { + cloudsListBySubscription, + cloudsListByResourceGroup, + cloudsDelete, + cloudsUpdate, + cloudsCreateOrUpdate, + cloudsGet, +} from "./clouds/index.js"; +export { + guestAgentsListByVirtualMachineInstance, + guestAgentsDelete, + guestAgentsCreate, + guestAgentsGet, +} from "./guestAgents/index.js"; +export { + inventoryItemsListByVmmServer, + inventoryItemsDelete, + inventoryItemsCreate, + inventoryItemsGet, +} from "./inventoryItems/index.js"; +export { operationsList } from "./operations/index.js"; +export { + virtualMachineInstancesRestoreCheckpoint, + virtualMachineInstancesDeleteCheckpoint, + virtualMachineInstancesCreateCheckpoint, + virtualMachineInstancesRestart, + virtualMachineInstancesStart, + virtualMachineInstancesStop, + virtualMachineInstancesList, + virtualMachineInstancesDelete, + virtualMachineInstancesUpdate, + virtualMachineInstancesCreateOrUpdate, + virtualMachineInstancesGet, +} from "./virtualMachineInstances/index.js"; +export { + virtualMachineTemplatesListBySubscription, + virtualMachineTemplatesListByResourceGroup, + virtualMachineTemplatesDelete, + virtualMachineTemplatesUpdate, + virtualMachineTemplatesCreateOrUpdate, + virtualMachineTemplatesGet, +} from "./virtualMachineTemplates/index.js"; +export { + virtualNetworksListBySubscription, + virtualNetworksListByResourceGroup, + virtualNetworksDelete, + virtualNetworksUpdate, + virtualNetworksCreateOrUpdate, + virtualNetworksGet, +} from "./virtualNetworks/index.js"; +export { + vmInstanceHybridIdentityMetadatasListByVirtualMachineInstance, + vmInstanceHybridIdentityMetadatasGet, +} from "./vmInstanceHybridIdentityMetadatas/index.js"; +export { + vmmServersListBySubscription, + vmmServersListByResourceGroup, + vmmServersDelete, + vmmServersUpdate, + vmmServersCreateOrUpdate, + vmmServersGet, +} from "./vmmServers/index.js"; diff --git a/sdk/scvmm/arm-scvmm/src/api/inventoryItems/index.ts b/sdk/scvmm/arm-scvmm/src/api/inventoryItems/index.ts new file mode 100644 index 000000000000..6463df40f814 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/inventoryItems/index.ts @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + InventoryItemsCreateOptionalParams, + InventoryItemsDeleteOptionalParams, + InventoryItemsGetOptionalParams, + InventoryItemsListByVmmServerOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + InventoryItem, + inventoryItemSerializer, + inventoryItemDeserializer, + _InventoryItemListResult, + _inventoryItemListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _inventoryItemsListByVmmServerSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: InventoryItemsListByVmmServerOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems", + context.subscriptionId, + resourceGroupName, + vmmServerName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _inventoryItemsListByVmmServerDeserialize( + result: PathUncheckedResponse, +): Promise<_InventoryItemListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _inventoryItemListResultDeserializer(result.body); +} + +/** Returns the list of inventoryItems in the given VmmServer. */ +export function inventoryItemsListByVmmServer( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: InventoryItemsListByVmmServerOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _inventoryItemsListByVmmServerSend(context, resourceGroupName, vmmServerName, options), + _inventoryItemsListByVmmServerDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _inventoryItemsDeleteSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options: InventoryItemsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _inventoryItemsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deletes an inventoryItem. */ +export async function inventoryItemsDelete( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options: InventoryItemsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _inventoryItemsDeleteSend( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + options, + ); + return _inventoryItemsDeleteDeserialize(result); +} + +export function _inventoryItemsCreateSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + resource: InventoryItem, + options: InventoryItemsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: inventoryItemSerializer(resource), + }); +} + +export async function _inventoryItemsCreateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return inventoryItemDeserializer(result.body); +} + +/** Create Or Update InventoryItem. */ +export async function inventoryItemsCreate( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + resource: InventoryItem, + options: InventoryItemsCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _inventoryItemsCreateSend( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + resource, + options, + ); + return _inventoryItemsCreateDeserialize(result); +} + +export function _inventoryItemsGetSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options: InventoryItemsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _inventoryItemsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return inventoryItemDeserializer(result.body); +} + +/** Shows an inventory item. */ +export async function inventoryItemsGet( + context: Client, + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options: InventoryItemsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _inventoryItemsGetSend( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + options, + ); + return _inventoryItemsGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/operations/index.ts b/sdk/scvmm/arm-scvmm/src/api/operations/index.ts new file mode 100644 index 000000000000..34167fed12eb --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/operations/index.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext as Client, OperationsListOptionalParams } from "../index.js"; +import { + errorResponseDeserializer, + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationsListSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context.path("/providers/Microsoft.ScVmm/operations").get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _operationsListDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function operationsList( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _operationsListSend(context, options), + _operationsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/options.ts b/sdk/scvmm/arm-scvmm/src/api/options.ts new file mode 100644 index 000000000000..9fa195ac5787 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/options.ts @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ForceDelete, DeleteFromHost } from "../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GuestAgentsListByVirtualMachineInstanceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GuestAgentsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GuestAgentsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GuestAgentsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface VmInstanceHybridIdentityMetadatasGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachineInstancesRestoreCheckpointOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesDeleteCheckpointOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesCreateCheckpointOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesRestartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesStartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesStopOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachineInstancesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; + /** Whether to disable the VM from azure and also delete it from Vmm. */ + deleteFromHost?: DeleteFromHost; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineInstancesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InventoryItemsListByVmmServerOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InventoryItemsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InventoryItemsCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface InventoryItemsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvailabilitySetsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvailabilitySetsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvailabilitySetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; +} + +/** Optional parameters. */ +export interface AvailabilitySetsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AvailabilitySetsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AvailabilitySetsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesListByResourceGroupOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; +} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachineTemplatesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualNetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; +} + +/** Optional parameters. */ +export interface VirtualNetworksUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualNetworksGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; +} + +/** Optional parameters. */ +export interface CloudsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VmmServersListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VmmServersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VmmServersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Forces the resource to be deleted. */ + force?: ForceDelete; +} + +/** Optional parameters. */ +export interface VmmServersUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VmmServersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VmmServersGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/scvmm/arm-scvmm/src/api/scVmmContext.ts b/sdk/scvmm/arm-scvmm/src/api/scVmmContext.ts new file mode 100644 index 000000000000..6d0140a06b86 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/scVmmContext.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** The Microsoft.ScVmm Rest API spec. */ +export interface ScVmmContext extends Client { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion: string; + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; +} + +/** Optional parameters for the client. */ +export interface ScVmmClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** The Microsoft.ScVmm Rest API spec. */ +export function createScVmm( + credential: TokenCredential, + subscriptionId: string, + options: ScVmmClientOptionalParams = {}, +): ScVmmContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-scvmm/1.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2024-06-01"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return { ...clientContext, apiVersion, subscriptionId } as ScVmmContext; +} diff --git a/sdk/scvmm/arm-scvmm/src/api/virtualMachineInstances/index.ts b/sdk/scvmm/arm-scvmm/src/api/virtualMachineInstances/index.ts new file mode 100644 index 000000000000..cd684840e29a --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/virtualMachineInstances/index.ts @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + VirtualMachineInstance, + virtualMachineInstanceSerializer, + virtualMachineInstanceDeserializer, + VirtualMachineInstanceUpdate, + virtualMachineInstanceUpdateSerializer, + _VirtualMachineInstanceListResult, + _virtualMachineInstanceListResultDeserializer, + StopVirtualMachineOptions, + stopVirtualMachineOptionsSerializer, + VirtualMachineCreateCheckpoint, + virtualMachineCreateCheckpointSerializer, + VirtualMachineDeleteCheckpoint, + virtualMachineDeleteCheckpointSerializer, + VirtualMachineRestoreCheckpoint, + virtualMachineRestoreCheckpointSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _virtualMachineInstancesRestoreCheckpointSend( + context: Client, + resourceUri: string, + body: VirtualMachineRestoreCheckpoint, + options: VirtualMachineInstancesRestoreCheckpointOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint", + { value: resourceUri, allowReserved: true }, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineRestoreCheckpointSerializer(body), + }); +} + +export async function _virtualMachineInstancesRestoreCheckpointDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Restores to a checkpoint in virtual machine instance. */ +export function virtualMachineInstancesRestoreCheckpoint( + context: Client, + resourceUri: string, + body: VirtualMachineRestoreCheckpoint, + options: VirtualMachineInstancesRestoreCheckpointOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachineInstancesRestoreCheckpointDeserialize, + ["202", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineInstancesRestoreCheckpointSend(context, resourceUri, body, options), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _virtualMachineInstancesDeleteCheckpointSend( + context: Client, + resourceUri: string, + body: VirtualMachineDeleteCheckpoint, + options: VirtualMachineInstancesDeleteCheckpointOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint", + { value: resourceUri, allowReserved: true }, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineDeleteCheckpointSerializer(body), + }); +} + +export async function _virtualMachineInstancesDeleteCheckpointDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deletes a checkpoint in virtual machine instance. */ +export function virtualMachineInstancesDeleteCheckpoint( + context: Client, + resourceUri: string, + body: VirtualMachineDeleteCheckpoint, + options: VirtualMachineInstancesDeleteCheckpointOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachineInstancesDeleteCheckpointDeserialize, + ["202", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineInstancesDeleteCheckpointSend(context, resourceUri, body, options), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _virtualMachineInstancesCreateCheckpointSend( + context: Client, + resourceUri: string, + body: VirtualMachineCreateCheckpoint, + options: VirtualMachineInstancesCreateCheckpointOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint", + { value: resourceUri, allowReserved: true }, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineCreateCheckpointSerializer(body), + }); +} + +export async function _virtualMachineInstancesCreateCheckpointDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Creates a checkpoint in virtual machine instance. */ +export function virtualMachineInstancesCreateCheckpoint( + context: Client, + resourceUri: string, + body: VirtualMachineCreateCheckpoint, + options: VirtualMachineInstancesCreateCheckpointOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachineInstancesCreateCheckpointDeserialize, + ["202", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineInstancesCreateCheckpointSend(context, resourceUri, body, options), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _virtualMachineInstancesRestartSend( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesRestartOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart", { + value: resourceUri, + allowReserved: true, + }) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineInstancesRestartDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** The operation to restart a virtual machine instance. */ +export function virtualMachineInstancesRestart( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesRestartOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _virtualMachineInstancesRestartDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _virtualMachineInstancesRestartSend(context, resourceUri, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _virtualMachineInstancesStartSend( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesStartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start", { + value: resourceUri, + allowReserved: true, + }) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineInstancesStartDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** The operation to start a virtual machine instance. */ +export function virtualMachineInstancesStart( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesStartOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _virtualMachineInstancesStartDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _virtualMachineInstancesStartSend(context, resourceUri, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _virtualMachineInstancesStopSend( + context: Client, + resourceUri: string, + body: { + body?: StopVirtualMachineOptions; + }, + options: VirtualMachineInstancesStopOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop", { + value: resourceUri, + allowReserved: true, + }) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: !options["body"] + ? options["body"] + : stopVirtualMachineOptionsSerializer(options["body"]), + }); +} + +export async function _virtualMachineInstancesStopDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** The operation to power off (stop) a virtual machine instance. */ +export function virtualMachineInstancesStop( + context: Client, + resourceUri: string, + body: { + body?: StopVirtualMachineOptions; + }, + options: VirtualMachineInstancesStopOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _virtualMachineInstancesStopDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _virtualMachineInstancesStopSend(context, resourceUri, body, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _virtualMachineInstancesListSend( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances", { + value: resourceUri, + allowReserved: true, + }) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineInstancesListDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachineInstanceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualMachineInstanceListResultDeserializer(result.body); +} + +/** Lists all of the virtual machine instances within the specified parent resource. */ +export function virtualMachineInstancesList( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _virtualMachineInstancesListSend(context, resourceUri, options), + _virtualMachineInstancesListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualMachineInstancesDeleteSend( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", { + value: resourceUri, + allowReserved: true, + }) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + deleteFromHost: options?.deleteFromHost, + }, + }); +} + +export async function _virtualMachineInstancesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** The operation to delete a virtual machine instance. */ +export function virtualMachineInstancesDelete( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachineInstancesDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _virtualMachineInstancesDeleteSend(context, resourceUri, options), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _virtualMachineInstancesUpdateSend( + context: Client, + resourceUri: string, + properties: VirtualMachineInstanceUpdate, + options: VirtualMachineInstancesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", { + value: resourceUri, + allowReserved: true, + }) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineInstanceUpdateSerializer(properties), + }); +} + +export async function _virtualMachineInstancesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineInstanceDeserializer(result.body); +} + +/** The operation to update a virtual machine instance. */ +export function virtualMachineInstancesUpdate( + context: Client, + resourceUri: string, + properties: VirtualMachineInstanceUpdate, + options: VirtualMachineInstancesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualMachineInstance> { + return getLongRunningPoller(context, _virtualMachineInstancesUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineInstancesUpdateSend(context, resourceUri, properties, options), + resourceLocationConfig: "location", + }) as PollerLike, VirtualMachineInstance>; +} + +export function _virtualMachineInstancesCreateOrUpdateSend( + context: Client, + resourceUri: string, + resource: VirtualMachineInstance, + options: VirtualMachineInstancesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", { + value: resourceUri, + allowReserved: true, + }) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineInstanceSerializer(resource), + }); +} + +export async function _virtualMachineInstancesCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineInstanceDeserializer(result.body); +} + +/** The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. */ +export function virtualMachineInstancesCreateOrUpdate( + context: Client, + resourceUri: string, + resource: VirtualMachineInstance, + options: VirtualMachineInstancesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, VirtualMachineInstance> { + return getLongRunningPoller( + context, + _virtualMachineInstancesCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineInstancesCreateOrUpdateSend(context, resourceUri, resource, options), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, VirtualMachineInstance>; +} + +export function _virtualMachineInstancesGetSend( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", { + value: resourceUri, + allowReserved: true, + }) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineInstancesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineInstanceDeserializer(result.body); +} + +/** Retrieves information about a virtual machine instance. */ +export async function virtualMachineInstancesGet( + context: Client, + resourceUri: string, + options: VirtualMachineInstancesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _virtualMachineInstancesGetSend(context, resourceUri, options); + return _virtualMachineInstancesGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/virtualMachineTemplates/index.ts b/sdk/scvmm/arm-scvmm/src/api/virtualMachineTemplates/index.ts new file mode 100644 index 000000000000..fe62c0adee87 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/virtualMachineTemplates/index.ts @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + VirtualMachineTemplatesCreateOrUpdateOptionalParams, + VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesGetOptionalParams, + VirtualMachineTemplatesListByResourceGroupOptionalParams, + VirtualMachineTemplatesListBySubscriptionOptionalParams, + VirtualMachineTemplatesUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + VirtualMachineTemplate, + virtualMachineTemplateSerializer, + virtualMachineTemplateDeserializer, + VirtualMachineTemplateTagsUpdate, + virtualMachineTemplateTagsUpdateSerializer, + _VirtualMachineTemplateListResult, + _virtualMachineTemplateListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _virtualMachineTemplatesListBySubscriptionSend( + context: Client, + options: VirtualMachineTemplatesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineTemplatesListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachineTemplateListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualMachineTemplateListResultDeserializer(result.body); +} + +/** List of VirtualMachineTemplates in a subscription. */ +export function virtualMachineTemplatesListBySubscription( + context: Client, + options: VirtualMachineTemplatesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _virtualMachineTemplatesListBySubscriptionSend(context, options), + _virtualMachineTemplatesListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualMachineTemplatesListByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualMachineTemplatesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineTemplatesListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachineTemplateListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualMachineTemplateListResultDeserializer(result.body); +} + +/** List of VirtualMachineTemplates in a resource group. */ +export function virtualMachineTemplatesListByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualMachineTemplatesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _virtualMachineTemplatesListByResourceGroupSend(context, resourceGroupName, options), + _virtualMachineTemplatesListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualMachineTemplatesDeleteSend( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + options: VirtualMachineTemplatesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", + context.subscriptionId, + resourceGroupName, + virtualMachineTemplateName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + }, + }); +} + +export async function _virtualMachineTemplatesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deregisters the ScVmm VM Template from Azure. */ +export function virtualMachineTemplatesDelete( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + options: VirtualMachineTemplatesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachineTemplatesDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineTemplatesDeleteSend( + context, + resourceGroupName, + virtualMachineTemplateName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _virtualMachineTemplatesUpdateSend( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + properties: VirtualMachineTemplateTagsUpdate, + options: VirtualMachineTemplatesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", + context.subscriptionId, + resourceGroupName, + virtualMachineTemplateName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineTemplateTagsUpdateSerializer(properties), + }); +} + +export async function _virtualMachineTemplatesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineTemplateDeserializer(result.body); +} + +/** Updates the VirtualMachineTemplate resource. */ +export function virtualMachineTemplatesUpdate( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + properties: VirtualMachineTemplateTagsUpdate, + options: VirtualMachineTemplatesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualMachineTemplate> { + return getLongRunningPoller(context, _virtualMachineTemplatesUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineTemplatesUpdateSend( + context, + resourceGroupName, + virtualMachineTemplateName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, VirtualMachineTemplate>; +} + +export function _virtualMachineTemplatesCreateOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + resource: VirtualMachineTemplate, + options: VirtualMachineTemplatesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", + context.subscriptionId, + resourceGroupName, + virtualMachineTemplateName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualMachineTemplateSerializer(resource), + }); +} + +export async function _virtualMachineTemplatesCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineTemplateDeserializer(result.body); +} + +/** Onboards the ScVmm VM Template as an Azure VM Template resource. */ +export function virtualMachineTemplatesCreateOrUpdate( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + resource: VirtualMachineTemplate, + options: VirtualMachineTemplatesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, VirtualMachineTemplate> { + return getLongRunningPoller( + context, + _virtualMachineTemplatesCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachineTemplatesCreateOrUpdateSend( + context, + resourceGroupName, + virtualMachineTemplateName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, VirtualMachineTemplate>; +} + +export function _virtualMachineTemplatesGetSend( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + options: VirtualMachineTemplatesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", + context.subscriptionId, + resourceGroupName, + virtualMachineTemplateName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualMachineTemplatesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineTemplateDeserializer(result.body); +} + +/** Implements VirtualMachineTemplate GET method. */ +export async function virtualMachineTemplatesGet( + context: Client, + resourceGroupName: string, + virtualMachineTemplateName: string, + options: VirtualMachineTemplatesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _virtualMachineTemplatesGetSend( + context, + resourceGroupName, + virtualMachineTemplateName, + options, + ); + return _virtualMachineTemplatesGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/virtualNetworks/index.ts b/sdk/scvmm/arm-scvmm/src/api/virtualNetworks/index.ts new file mode 100644 index 000000000000..eb186196fa8b --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/virtualNetworks/index.ts @@ -0,0 +1,368 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksGetOptionalParams, + VirtualNetworksListByResourceGroupOptionalParams, + VirtualNetworksListBySubscriptionOptionalParams, + VirtualNetworksUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + VirtualNetwork, + virtualNetworkSerializer, + virtualNetworkDeserializer, + VirtualNetworkTagsUpdate, + virtualNetworkTagsUpdateSerializer, + _VirtualNetworkListResult, + _virtualNetworkListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _virtualNetworksListBySubscriptionSend( + context: Client, + options: VirtualNetworksListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualNetworksListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualNetworkListResultDeserializer(result.body); +} + +/** List of VirtualNetworks in a subscription. */ +export function virtualNetworksListBySubscription( + context: Client, + options: VirtualNetworksListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _virtualNetworksListBySubscriptionSend(context, options), + _virtualNetworksListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualNetworksListByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualNetworksListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualNetworksListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualNetworkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualNetworkListResultDeserializer(result.body); +} + +/** List of VirtualNetworks in a resource group. */ +export function virtualNetworksListByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualNetworksListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _virtualNetworksListByResourceGroupSend(context, resourceGroupName, options), + _virtualNetworksListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualNetworksDeleteSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", + context.subscriptionId, + resourceGroupName, + virtualNetworkName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + }, + }); +} + +export async function _virtualNetworksDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deregisters the ScVmm virtual network from Azure. */ +export function virtualNetworksDelete( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _virtualNetworksDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualNetworksDeleteSend(context, resourceGroupName, virtualNetworkName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _virtualNetworksUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + properties: VirtualNetworkTagsUpdate, + options: VirtualNetworksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", + context.subscriptionId, + resourceGroupName, + virtualNetworkName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualNetworkTagsUpdateSerializer(properties), + }); +} + +export async function _virtualNetworksUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Updates the VirtualNetworks resource. */ +export function virtualNetworksUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + properties: VirtualNetworkTagsUpdate, + options: VirtualNetworksUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetwork> { + return getLongRunningPoller(context, _virtualNetworksUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualNetworksUpdateSend( + context, + resourceGroupName, + virtualNetworkName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, VirtualNetwork>; +} + +export function _virtualNetworksCreateOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + resource: VirtualNetwork, + options: VirtualNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", + context.subscriptionId, + resourceGroupName, + virtualNetworkName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: virtualNetworkSerializer(resource), + }); +} + +export async function _virtualNetworksCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Onboards the ScVmm virtual network as an Azure virtual network resource. */ +export function virtualNetworksCreateOrUpdate( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + resource: VirtualNetwork, + options: VirtualNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualNetwork> { + return getLongRunningPoller(context, _virtualNetworksCreateOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualNetworksCreateOrUpdateSend( + context, + resourceGroupName, + virtualNetworkName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, VirtualNetwork>; +} + +export function _virtualNetworksGetSend( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", + context.subscriptionId, + resourceGroupName, + virtualNetworkName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _virtualNetworksGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualNetworkDeserializer(result.body); +} + +/** Implements VirtualNetwork GET method. */ +export async function virtualNetworksGet( + context: Client, + resourceGroupName: string, + virtualNetworkName: string, + options: VirtualNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _virtualNetworksGetSend( + context, + resourceGroupName, + virtualNetworkName, + options, + ); + return _virtualNetworksGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/vmInstanceHybridIdentityMetadatas/index.ts b/sdk/scvmm/arm-scvmm/src/api/vmInstanceHybridIdentityMetadatas/index.ts new file mode 100644 index 000000000000..d0e97d92f946 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/vmInstanceHybridIdentityMetadatas/index.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + VmInstanceHybridIdentityMetadatasGetOptionalParams, + VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + VmInstanceHybridIdentityMetadata, + vmInstanceHybridIdentityMetadataDeserializer, + _VmInstanceHybridIdentityMetadataListResult, + _vmInstanceHybridIdentityMetadataListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSend( + context: Client, + resourceUri: string, + options: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata", + { value: resourceUri, allowReserved: true }, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceDeserialize( + result: PathUncheckedResponse, +): Promise<_VmInstanceHybridIdentityMetadataListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _vmInstanceHybridIdentityMetadataListResultDeserializer(result.body); +} + +/** Returns the list of HybridIdentityMetadata of the given VM. */ +export function vmInstanceHybridIdentityMetadatasListByVirtualMachineInstance( + context: Client, + resourceUri: string, + options: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSend( + context, + resourceUri, + options, + ), + _vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _vmInstanceHybridIdentityMetadatasGetSend( + context: Client, + resourceUri: string, + options: VmInstanceHybridIdentityMetadatasGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default", + { value: resourceUri, allowReserved: true }, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _vmInstanceHybridIdentityMetadatasGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return vmInstanceHybridIdentityMetadataDeserializer(result.body); +} + +/** Implements HybridIdentityMetadata GET method. */ +export async function vmInstanceHybridIdentityMetadatasGet( + context: Client, + resourceUri: string, + options: VmInstanceHybridIdentityMetadatasGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _vmInstanceHybridIdentityMetadatasGetSend(context, resourceUri, options); + return _vmInstanceHybridIdentityMetadatasGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/api/vmmServers/index.ts b/sdk/scvmm/arm-scvmm/src/api/vmmServers/index.ts new file mode 100644 index 000000000000..12985059fb33 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/api/vmmServers/index.ts @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ScVmmContext as Client, + VmmServersCreateOrUpdateOptionalParams, + VmmServersDeleteOptionalParams, + VmmServersGetOptionalParams, + VmmServersListByResourceGroupOptionalParams, + VmmServersListBySubscriptionOptionalParams, + VmmServersUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + VmmServer, + vmmServerSerializer, + vmmServerDeserializer, + VmmServerTagsUpdate, + vmmServerTagsUpdateSerializer, + _VmmServerListResult, + _vmmServerListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _vmmServersListBySubscriptionSend( + context: Client, + options: VmmServersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _vmmServersListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_VmmServerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _vmmServerListResultDeserializer(result.body); +} + +/** List of VmmServers in a subscription. */ +export function vmmServersListBySubscription( + context: Client, + options: VmmServersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _vmmServersListBySubscriptionSend(context, options), + _vmmServersListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _vmmServersListByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VmmServersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _vmmServersListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VmmServerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _vmmServerListResultDeserializer(result.body); +} + +/** List of VmmServers in a resource group. */ +export function vmmServersListByResourceGroup( + context: Client, + resourceGroupName: string, + options: VmmServersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _vmmServersListByResourceGroupSend(context, resourceGroupName, options), + _vmmServersListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _vmmServersDeleteSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: VmmServersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { + "api-version": context.apiVersion, + force: options?.force, + }, + }); +} + +export async function _vmmServersDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Removes the SCVmm fabric from Azure. */ +export function vmmServersDelete( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: VmmServersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _vmmServersDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _vmmServersDeleteSend(context, resourceGroupName, vmmServerName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _vmmServersUpdateSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + properties: VmmServerTagsUpdate, + options: VmmServersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: vmmServerTagsUpdateSerializer(properties), + }); +} + +export async function _vmmServersUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return vmmServerDeserializer(result.body); +} + +/** Updates the VmmServers resource. */ +export function vmmServersUpdate( + context: Client, + resourceGroupName: string, + vmmServerName: string, + properties: VmmServerTagsUpdate, + options: VmmServersUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VmmServer> { + return getLongRunningPoller(context, _vmmServersUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _vmmServersUpdateSend(context, resourceGroupName, vmmServerName, properties, options), + resourceLocationConfig: "location", + }) as PollerLike, VmmServer>; +} + +export function _vmmServersCreateOrUpdateSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + resource: VmmServer, + options: VmmServersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: vmmServerSerializer(resource), + }); +} + +export async function _vmmServersCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return vmmServerDeserializer(result.body); +} + +/** Onboards the SCVmm fabric as an Azure VmmServer resource. */ +export function vmmServersCreateOrUpdate( + context: Client, + resourceGroupName: string, + vmmServerName: string, + resource: VmmServer, + options: VmmServersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VmmServer> { + return getLongRunningPoller(context, _vmmServersCreateOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _vmmServersCreateOrUpdateSend(context, resourceGroupName, vmmServerName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, VmmServer>; +} + +export function _vmmServersGetSend( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: VmmServersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", + context.subscriptionId, + resourceGroupName, + vmmServerName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _vmmServersGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return vmmServerDeserializer(result.body); +} + +/** Implements VmmServer GET method. */ +export async function vmmServersGet( + context: Client, + resourceGroupName: string, + vmmServerName: string, + options: VmmServersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _vmmServersGetSend(context, resourceGroupName, vmmServerName, options); + return _vmmServersGetDeserialize(result); +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/availabilitySets/index.ts b/sdk/scvmm/arm-scvmm/src/classic/availabilitySets/index.ts new file mode 100644 index 000000000000..86f800aeb36f --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/availabilitySets/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + availabilitySetsListBySubscription, + availabilitySetsListByResourceGroup, + availabilitySetsDelete, + availabilitySetsUpdate, + availabilitySetsCreateOrUpdate, + availabilitySetsGet, +} from "../../api/availabilitySets/index.js"; +import { AvailabilitySet, AvailabilitySetTagsUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsListByResourceGroupOptionalParams, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsUpdateOptionalParams, + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a AvailabilitySets operations. */ +export interface AvailabilitySetsOperations { + /** List of AvailabilitySets in a subscription. */ + listBySubscription: ( + options?: AvailabilitySetsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List of AvailabilitySets in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: AvailabilitySetsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deregisters the ScVmm availability set from Azure. */ + delete: ( + resourceGroupName: string, + availabilitySetResourceName: string, + options?: AvailabilitySetsDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the AvailabilitySets resource. */ + update: ( + resourceGroupName: string, + availabilitySetResourceName: string, + properties: AvailabilitySetTagsUpdate, + options?: AvailabilitySetsUpdateOptionalParams, + ) => PollerLike, AvailabilitySet>; + /** Onboards the ScVmm availability set as an Azure resource. */ + createOrUpdate: ( + resourceGroupName: string, + availabilitySetResourceName: string, + resource: AvailabilitySet, + options?: AvailabilitySetsCreateOrUpdateOptionalParams, + ) => PollerLike, AvailabilitySet>; + /** Implements AvailabilitySet GET method. */ + get: ( + resourceGroupName: string, + availabilitySetResourceName: string, + options?: AvailabilitySetsGetOptionalParams, + ) => Promise; +} + +function _getAvailabilitySets(context: ScVmmContext) { + return { + listBySubscription: (options?: AvailabilitySetsListBySubscriptionOptionalParams) => + availabilitySetsListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: AvailabilitySetsListByResourceGroupOptionalParams, + ) => availabilitySetsListByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + availabilitySetResourceName: string, + options?: AvailabilitySetsDeleteOptionalParams, + ) => availabilitySetsDelete(context, resourceGroupName, availabilitySetResourceName, options), + update: ( + resourceGroupName: string, + availabilitySetResourceName: string, + properties: AvailabilitySetTagsUpdate, + options?: AvailabilitySetsUpdateOptionalParams, + ) => + availabilitySetsUpdate( + context, + resourceGroupName, + availabilitySetResourceName, + properties, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + availabilitySetResourceName: string, + resource: AvailabilitySet, + options?: AvailabilitySetsCreateOrUpdateOptionalParams, + ) => + availabilitySetsCreateOrUpdate( + context, + resourceGroupName, + availabilitySetResourceName, + resource, + options, + ), + get: ( + resourceGroupName: string, + availabilitySetResourceName: string, + options?: AvailabilitySetsGetOptionalParams, + ) => availabilitySetsGet(context, resourceGroupName, availabilitySetResourceName, options), + }; +} + +export function _getAvailabilitySetsOperations(context: ScVmmContext): AvailabilitySetsOperations { + return { + ..._getAvailabilitySets(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/clouds/index.ts b/sdk/scvmm/arm-scvmm/src/classic/clouds/index.ts new file mode 100644 index 000000000000..f45a6bda18e4 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/clouds/index.ts @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + cloudsListBySubscription, + cloudsListByResourceGroup, + cloudsDelete, + cloudsUpdate, + cloudsCreateOrUpdate, + cloudsGet, +} from "../../api/clouds/index.js"; +import { Cloud, CloudTagsUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + CloudsListBySubscriptionOptionalParams, + CloudsListByResourceGroupOptionalParams, + CloudsDeleteOptionalParams, + CloudsUpdateOptionalParams, + CloudsCreateOrUpdateOptionalParams, + CloudsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Clouds operations. */ +export interface CloudsOperations { + /** List of Clouds in a subscription. */ + listBySubscription: ( + options?: CloudsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List of Clouds in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: CloudsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deregisters the ScVmm fabric cloud from Azure. */ + delete: ( + resourceGroupName: string, + cloudResourceName: string, + options?: CloudsDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the Clouds resource. */ + update: ( + resourceGroupName: string, + cloudResourceName: string, + properties: CloudTagsUpdate, + options?: CloudsUpdateOptionalParams, + ) => PollerLike, Cloud>; + /** Onboards the ScVmm fabric cloud as an Azure cloud resource. */ + createOrUpdate: ( + resourceGroupName: string, + cloudResourceName: string, + resource: Cloud, + options?: CloudsCreateOrUpdateOptionalParams, + ) => PollerLike, Cloud>; + /** Implements Cloud GET method. */ + get: ( + resourceGroupName: string, + cloudResourceName: string, + options?: CloudsGetOptionalParams, + ) => Promise; +} + +function _getClouds(context: ScVmmContext) { + return { + listBySubscription: (options?: CloudsListBySubscriptionOptionalParams) => + cloudsListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: CloudsListByResourceGroupOptionalParams, + ) => cloudsListByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + cloudResourceName: string, + options?: CloudsDeleteOptionalParams, + ) => cloudsDelete(context, resourceGroupName, cloudResourceName, options), + update: ( + resourceGroupName: string, + cloudResourceName: string, + properties: CloudTagsUpdate, + options?: CloudsUpdateOptionalParams, + ) => cloudsUpdate(context, resourceGroupName, cloudResourceName, properties, options), + createOrUpdate: ( + resourceGroupName: string, + cloudResourceName: string, + resource: Cloud, + options?: CloudsCreateOrUpdateOptionalParams, + ) => cloudsCreateOrUpdate(context, resourceGroupName, cloudResourceName, resource, options), + get: ( + resourceGroupName: string, + cloudResourceName: string, + options?: CloudsGetOptionalParams, + ) => cloudsGet(context, resourceGroupName, cloudResourceName, options), + }; +} + +export function _getCloudsOperations(context: ScVmmContext): CloudsOperations { + return { + ..._getClouds(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/guestAgents/index.ts b/sdk/scvmm/arm-scvmm/src/classic/guestAgents/index.ts new file mode 100644 index 000000000000..22d496974d92 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/guestAgents/index.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + guestAgentsListByVirtualMachineInstance, + guestAgentsDelete, + guestAgentsCreate, + guestAgentsGet, +} from "../../api/guestAgents/index.js"; +import { GuestAgent } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + GuestAgentsListByVirtualMachineInstanceOptionalParams, + GuestAgentsDeleteOptionalParams, + GuestAgentsCreateOptionalParams, + GuestAgentsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a GuestAgents operations. */ +export interface GuestAgentsOperations { + /** Returns the list of GuestAgent of the given vm. */ + listByVirtualMachineInstance: ( + resourceUri: string, + options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Implements GuestAgent DELETE method. */ + delete: (resourceUri: string, options?: GuestAgentsDeleteOptionalParams) => Promise; + /** Create Or Update GuestAgent. */ + create: ( + resourceUri: string, + resource: GuestAgent, + options?: GuestAgentsCreateOptionalParams, + ) => PollerLike, GuestAgent>; + /** Implements GuestAgent GET method. */ + get: (resourceUri: string, options?: GuestAgentsGetOptionalParams) => Promise; +} + +function _getGuestAgents(context: ScVmmContext) { + return { + listByVirtualMachineInstance: ( + resourceUri: string, + options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, + ) => guestAgentsListByVirtualMachineInstance(context, resourceUri, options), + delete: (resourceUri: string, options?: GuestAgentsDeleteOptionalParams) => + guestAgentsDelete(context, resourceUri, options), + create: ( + resourceUri: string, + resource: GuestAgent, + options?: GuestAgentsCreateOptionalParams, + ) => guestAgentsCreate(context, resourceUri, resource, options), + get: (resourceUri: string, options?: GuestAgentsGetOptionalParams) => + guestAgentsGet(context, resourceUri, options), + }; +} + +export function _getGuestAgentsOperations(context: ScVmmContext): GuestAgentsOperations { + return { + ..._getGuestAgents(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/index.ts b/sdk/scvmm/arm-scvmm/src/classic/index.ts new file mode 100644 index 000000000000..cc7bfb18bd5a --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/index.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { AvailabilitySetsOperations } from "./availabilitySets/index.js"; +export { CloudsOperations } from "./clouds/index.js"; +export { GuestAgentsOperations } from "./guestAgents/index.js"; +export { InventoryItemsOperations } from "./inventoryItems/index.js"; +export { OperationsOperations } from "./operations/index.js"; +export { VirtualMachineInstancesOperations } from "./virtualMachineInstances/index.js"; +export { VirtualMachineTemplatesOperations } from "./virtualMachineTemplates/index.js"; +export { VirtualNetworksOperations } from "./virtualNetworks/index.js"; +export { VmInstanceHybridIdentityMetadatasOperations } from "./vmInstanceHybridIdentityMetadatas/index.js"; +export { VmmServersOperations } from "./vmmServers/index.js"; diff --git a/sdk/scvmm/arm-scvmm/src/classic/inventoryItems/index.ts b/sdk/scvmm/arm-scvmm/src/classic/inventoryItems/index.ts new file mode 100644 index 000000000000..2515bdd00d9d --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/inventoryItems/index.ts @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + inventoryItemsListByVmmServer, + inventoryItemsDelete, + inventoryItemsCreate, + inventoryItemsGet, +} from "../../api/inventoryItems/index.js"; +import { InventoryItem } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { + InventoryItemsListByVmmServerOptionalParams, + InventoryItemsDeleteOptionalParams, + InventoryItemsCreateOptionalParams, + InventoryItemsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a InventoryItems operations. */ +export interface InventoryItemsOperations { + /** Returns the list of inventoryItems in the given VmmServer. */ + listByVmmServer: ( + resourceGroupName: string, + vmmServerName: string, + options?: InventoryItemsListByVmmServerOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an inventoryItem. */ + delete: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options?: InventoryItemsDeleteOptionalParams, + ) => Promise; + /** Create Or Update InventoryItem. */ + create: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + resource: InventoryItem, + options?: InventoryItemsCreateOptionalParams, + ) => Promise; + /** Shows an inventory item. */ + get: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options?: InventoryItemsGetOptionalParams, + ) => Promise; +} + +function _getInventoryItems(context: ScVmmContext) { + return { + listByVmmServer: ( + resourceGroupName: string, + vmmServerName: string, + options?: InventoryItemsListByVmmServerOptionalParams, + ) => inventoryItemsListByVmmServer(context, resourceGroupName, vmmServerName, options), + delete: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options?: InventoryItemsDeleteOptionalParams, + ) => + inventoryItemsDelete( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + options, + ), + create: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + resource: InventoryItem, + options?: InventoryItemsCreateOptionalParams, + ) => + inventoryItemsCreate( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + resource, + options, + ), + get: ( + resourceGroupName: string, + vmmServerName: string, + inventoryItemResourceName: string, + options?: InventoryItemsGetOptionalParams, + ) => + inventoryItemsGet( + context, + resourceGroupName, + vmmServerName, + inventoryItemResourceName, + options, + ), + }; +} + +export function _getInventoryItemsOperations(context: ScVmmContext): InventoryItemsOperations { + return { + ..._getInventoryItems(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/operations/index.ts b/sdk/scvmm/arm-scvmm/src/classic/operations/index.ts new file mode 100644 index 000000000000..3d43efb26e96 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/operations/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { operationsList } from "../../api/operations/index.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { OperationsListOptionalParams } from "../../api/options.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: ScVmmContext) { + return { + list: (options?: OperationsListOptionalParams) => operationsList(context, options), + }; +} + +export function _getOperationsOperations(context: ScVmmContext): OperationsOperations { + return { + ..._getOperations(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/virtualMachineInstances/index.ts b/sdk/scvmm/arm-scvmm/src/classic/virtualMachineInstances/index.ts new file mode 100644 index 000000000000..77ed0054fb2d --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/virtualMachineInstances/index.ts @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesGetOptionalParams, +} from "../../api/options.js"; +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + virtualMachineInstancesRestoreCheckpoint, + virtualMachineInstancesDeleteCheckpoint, + virtualMachineInstancesCreateCheckpoint, + virtualMachineInstancesRestart, + virtualMachineInstancesStart, + virtualMachineInstancesStop, + virtualMachineInstancesList, + virtualMachineInstancesDelete, + virtualMachineInstancesUpdate, + virtualMachineInstancesCreateOrUpdate, + virtualMachineInstancesGet, +} from "../../api/virtualMachineInstances/index.js"; +import { + VirtualMachineInstance, + VirtualMachineInstanceUpdate, + StopVirtualMachineOptions, + VirtualMachineCreateCheckpoint, + VirtualMachineDeleteCheckpoint, + VirtualMachineRestoreCheckpoint, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualMachineInstances operations. */ +export interface VirtualMachineInstancesOperations { + /** Restores to a checkpoint in virtual machine instance. */ + restoreCheckpoint: ( + resourceUri: string, + body: VirtualMachineRestoreCheckpoint, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, + ) => PollerLike, void>; + /** Deletes a checkpoint in virtual machine instance. */ + deleteCheckpoint: ( + resourceUri: string, + body: VirtualMachineDeleteCheckpoint, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, + ) => PollerLike, void>; + /** Creates a checkpoint in virtual machine instance. */ + createCheckpoint: ( + resourceUri: string, + body: VirtualMachineCreateCheckpoint, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams, + ) => PollerLike, void>; + /** The operation to restart a virtual machine instance. */ + restart: ( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams, + ) => PollerLike, void>; + /** The operation to start a virtual machine instance. */ + start: ( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams, + ) => PollerLike, void>; + /** The operation to power off (stop) a virtual machine instance. */ + stop: ( + resourceUri: string, + body: { + body?: StopVirtualMachineOptions; + }, + options?: VirtualMachineInstancesStopOptionalParams, + ) => PollerLike, void>; + /** Lists all of the virtual machine instances within the specified parent resource. */ + list: ( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** The operation to delete a virtual machine instance. */ + delete: ( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams, + ) => PollerLike, void>; + /** The operation to update a virtual machine instance. */ + update: ( + resourceUri: string, + properties: VirtualMachineInstanceUpdate, + options?: VirtualMachineInstancesUpdateOptionalParams, + ) => PollerLike, VirtualMachineInstance>; + /** The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. */ + createOrUpdate: ( + resourceUri: string, + resource: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualMachineInstance>; + /** Retrieves information about a virtual machine instance. */ + get: ( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams, + ) => Promise; +} + +function _getVirtualMachineInstances(context: ScVmmContext) { + return { + restoreCheckpoint: ( + resourceUri: string, + body: VirtualMachineRestoreCheckpoint, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, + ) => virtualMachineInstancesRestoreCheckpoint(context, resourceUri, body, options), + deleteCheckpoint: ( + resourceUri: string, + body: VirtualMachineDeleteCheckpoint, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, + ) => virtualMachineInstancesDeleteCheckpoint(context, resourceUri, body, options), + createCheckpoint: ( + resourceUri: string, + body: VirtualMachineCreateCheckpoint, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams, + ) => virtualMachineInstancesCreateCheckpoint(context, resourceUri, body, options), + restart: (resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams) => + virtualMachineInstancesRestart(context, resourceUri, options), + start: (resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams) => + virtualMachineInstancesStart(context, resourceUri, options), + stop: ( + resourceUri: string, + body: { + body?: StopVirtualMachineOptions; + }, + options?: VirtualMachineInstancesStopOptionalParams, + ) => virtualMachineInstancesStop(context, resourceUri, body, options), + list: (resourceUri: string, options?: VirtualMachineInstancesListOptionalParams) => + virtualMachineInstancesList(context, resourceUri, options), + delete: (resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams) => + virtualMachineInstancesDelete(context, resourceUri, options), + update: ( + resourceUri: string, + properties: VirtualMachineInstanceUpdate, + options?: VirtualMachineInstancesUpdateOptionalParams, + ) => virtualMachineInstancesUpdate(context, resourceUri, properties, options), + createOrUpdate: ( + resourceUri: string, + resource: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams, + ) => virtualMachineInstancesCreateOrUpdate(context, resourceUri, resource, options), + get: (resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams) => + virtualMachineInstancesGet(context, resourceUri, options), + }; +} + +export function _getVirtualMachineInstancesOperations( + context: ScVmmContext, +): VirtualMachineInstancesOperations { + return { + ..._getVirtualMachineInstances(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/virtualMachineTemplates/index.ts b/sdk/scvmm/arm-scvmm/src/classic/virtualMachineTemplates/index.ts new file mode 100644 index 000000000000..df67d3304cd0 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/virtualMachineTemplates/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VirtualMachineTemplatesListBySubscriptionOptionalParams, + VirtualMachineTemplatesListByResourceGroupOptionalParams, + VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesUpdateOptionalParams, + VirtualMachineTemplatesCreateOrUpdateOptionalParams, + VirtualMachineTemplatesGetOptionalParams, +} from "../../api/options.js"; +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + virtualMachineTemplatesListBySubscription, + virtualMachineTemplatesListByResourceGroup, + virtualMachineTemplatesDelete, + virtualMachineTemplatesUpdate, + virtualMachineTemplatesCreateOrUpdate, + virtualMachineTemplatesGet, +} from "../../api/virtualMachineTemplates/index.js"; +import { VirtualMachineTemplate, VirtualMachineTemplateTagsUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualMachineTemplates operations. */ +export interface VirtualMachineTemplatesOperations { + /** List of VirtualMachineTemplates in a subscription. */ + listBySubscription: ( + options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List of VirtualMachineTemplates in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualMachineTemplatesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deregisters the ScVmm VM Template from Azure. */ + delete: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + options?: VirtualMachineTemplatesDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the VirtualMachineTemplate resource. */ + update: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + properties: VirtualMachineTemplateTagsUpdate, + options?: VirtualMachineTemplatesUpdateOptionalParams, + ) => PollerLike, VirtualMachineTemplate>; + /** Onboards the ScVmm VM Template as an Azure VM Template resource. */ + createOrUpdate: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + resource: VirtualMachineTemplate, + options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualMachineTemplate>; + /** Implements VirtualMachineTemplate GET method. */ + get: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + options?: VirtualMachineTemplatesGetOptionalParams, + ) => Promise; +} + +function _getVirtualMachineTemplates(context: ScVmmContext) { + return { + listBySubscription: (options?: VirtualMachineTemplatesListBySubscriptionOptionalParams) => + virtualMachineTemplatesListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualMachineTemplatesListByResourceGroupOptionalParams, + ) => virtualMachineTemplatesListByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + options?: VirtualMachineTemplatesDeleteOptionalParams, + ) => + virtualMachineTemplatesDelete( + context, + resourceGroupName, + virtualMachineTemplateName, + options, + ), + update: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + properties: VirtualMachineTemplateTagsUpdate, + options?: VirtualMachineTemplatesUpdateOptionalParams, + ) => + virtualMachineTemplatesUpdate( + context, + resourceGroupName, + virtualMachineTemplateName, + properties, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + resource: VirtualMachineTemplate, + options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, + ) => + virtualMachineTemplatesCreateOrUpdate( + context, + resourceGroupName, + virtualMachineTemplateName, + resource, + options, + ), + get: ( + resourceGroupName: string, + virtualMachineTemplateName: string, + options?: VirtualMachineTemplatesGetOptionalParams, + ) => + virtualMachineTemplatesGet(context, resourceGroupName, virtualMachineTemplateName, options), + }; +} + +export function _getVirtualMachineTemplatesOperations( + context: ScVmmContext, +): VirtualMachineTemplatesOperations { + return { + ..._getVirtualMachineTemplates(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/virtualNetworks/index.ts b/sdk/scvmm/arm-scvmm/src/classic/virtualNetworks/index.ts new file mode 100644 index 000000000000..b11bb0e5a5d9 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/virtualNetworks/index.ts @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VirtualNetworksListBySubscriptionOptionalParams, + VirtualNetworksListByResourceGroupOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, +} from "../../api/options.js"; +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + virtualNetworksListBySubscription, + virtualNetworksListByResourceGroup, + virtualNetworksDelete, + virtualNetworksUpdate, + virtualNetworksCreateOrUpdate, + virtualNetworksGet, +} from "../../api/virtualNetworks/index.js"; +import { VirtualNetwork, VirtualNetworkTagsUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualNetworks operations. */ +export interface VirtualNetworksOperations { + /** List of VirtualNetworks in a subscription. */ + listBySubscription: ( + options?: VirtualNetworksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List of VirtualNetworks in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualNetworksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deregisters the ScVmm virtual network from Azure. */ + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the VirtualNetworks resource. */ + update: ( + resourceGroupName: string, + virtualNetworkName: string, + properties: VirtualNetworkTagsUpdate, + options?: VirtualNetworksUpdateOptionalParams, + ) => PollerLike, VirtualNetwork>; + /** Onboards the ScVmm virtual network as an Azure virtual network resource. */ + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + resource: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualNetwork>; + /** Implements VirtualNetwork GET method. */ + get: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams, + ) => Promise; +} + +function _getVirtualNetworks(context: ScVmmContext) { + return { + listBySubscription: (options?: VirtualNetworksListBySubscriptionOptionalParams) => + virtualNetworksListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualNetworksListByResourceGroupOptionalParams, + ) => virtualNetworksListByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams, + ) => virtualNetworksDelete(context, resourceGroupName, virtualNetworkName, options), + update: ( + resourceGroupName: string, + virtualNetworkName: string, + properties: VirtualNetworkTagsUpdate, + options?: VirtualNetworksUpdateOptionalParams, + ) => virtualNetworksUpdate(context, resourceGroupName, virtualNetworkName, properties, options), + createOrUpdate: ( + resourceGroupName: string, + virtualNetworkName: string, + resource: VirtualNetwork, + options?: VirtualNetworksCreateOrUpdateOptionalParams, + ) => + virtualNetworksCreateOrUpdate( + context, + resourceGroupName, + virtualNetworkName, + resource, + options, + ), + get: ( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams, + ) => virtualNetworksGet(context, resourceGroupName, virtualNetworkName, options), + }; +} + +export function _getVirtualNetworksOperations(context: ScVmmContext): VirtualNetworksOperations { + return { + ..._getVirtualNetworks(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/vmInstanceHybridIdentityMetadatas/index.ts b/sdk/scvmm/arm-scvmm/src/classic/vmInstanceHybridIdentityMetadatas/index.ts new file mode 100644 index 000000000000..9bf86e5f87ac --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/vmInstanceHybridIdentityMetadatas/index.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, + VmInstanceHybridIdentityMetadatasGetOptionalParams, +} from "../../api/options.js"; +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + vmInstanceHybridIdentityMetadatasListByVirtualMachineInstance, + vmInstanceHybridIdentityMetadatasGet, +} from "../../api/vmInstanceHybridIdentityMetadatas/index.js"; +import { VmInstanceHybridIdentityMetadata } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a VmInstanceHybridIdentityMetadatas operations. */ +export interface VmInstanceHybridIdentityMetadatasOperations { + /** Returns the list of HybridIdentityMetadata of the given VM. */ + listByVirtualMachineInstance: ( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Implements HybridIdentityMetadata GET method. */ + get: ( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadatasGetOptionalParams, + ) => Promise; +} + +function _getVmInstanceHybridIdentityMetadatas(context: ScVmmContext) { + return { + listByVirtualMachineInstance: ( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, + ) => + vmInstanceHybridIdentityMetadatasListByVirtualMachineInstance(context, resourceUri, options), + get: (resourceUri: string, options?: VmInstanceHybridIdentityMetadatasGetOptionalParams) => + vmInstanceHybridIdentityMetadatasGet(context, resourceUri, options), + }; +} + +export function _getVmInstanceHybridIdentityMetadatasOperations( + context: ScVmmContext, +): VmInstanceHybridIdentityMetadatasOperations { + return { + ..._getVmInstanceHybridIdentityMetadatas(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/classic/vmmServers/index.ts b/sdk/scvmm/arm-scvmm/src/classic/vmmServers/index.ts new file mode 100644 index 000000000000..cdfd5315434f --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/classic/vmmServers/index.ts @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VmmServersListBySubscriptionOptionalParams, + VmmServersListByResourceGroupOptionalParams, + VmmServersDeleteOptionalParams, + VmmServersUpdateOptionalParams, + VmmServersCreateOrUpdateOptionalParams, + VmmServersGetOptionalParams, +} from "../../api/options.js"; +import { ScVmmContext } from "../../api/scVmmContext.js"; +import { + vmmServersListBySubscription, + vmmServersListByResourceGroup, + vmmServersDelete, + vmmServersUpdate, + vmmServersCreateOrUpdate, + vmmServersGet, +} from "../../api/vmmServers/index.js"; +import { VmmServer, VmmServerTagsUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VmmServers operations. */ +export interface VmmServersOperations { + /** List of VmmServers in a subscription. */ + listBySubscription: ( + options?: VmmServersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List of VmmServers in a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VmmServersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Removes the SCVmm fabric from Azure. */ + delete: ( + resourceGroupName: string, + vmmServerName: string, + options?: VmmServersDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the VmmServers resource. */ + update: ( + resourceGroupName: string, + vmmServerName: string, + properties: VmmServerTagsUpdate, + options?: VmmServersUpdateOptionalParams, + ) => PollerLike, VmmServer>; + /** Onboards the SCVmm fabric as an Azure VmmServer resource. */ + createOrUpdate: ( + resourceGroupName: string, + vmmServerName: string, + resource: VmmServer, + options?: VmmServersCreateOrUpdateOptionalParams, + ) => PollerLike, VmmServer>; + /** Implements VmmServer GET method. */ + get: ( + resourceGroupName: string, + vmmServerName: string, + options?: VmmServersGetOptionalParams, + ) => Promise; +} + +function _getVmmServers(context: ScVmmContext) { + return { + listBySubscription: (options?: VmmServersListBySubscriptionOptionalParams) => + vmmServersListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VmmServersListByResourceGroupOptionalParams, + ) => vmmServersListByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + vmmServerName: string, + options?: VmmServersDeleteOptionalParams, + ) => vmmServersDelete(context, resourceGroupName, vmmServerName, options), + update: ( + resourceGroupName: string, + vmmServerName: string, + properties: VmmServerTagsUpdate, + options?: VmmServersUpdateOptionalParams, + ) => vmmServersUpdate(context, resourceGroupName, vmmServerName, properties, options), + createOrUpdate: ( + resourceGroupName: string, + vmmServerName: string, + resource: VmmServer, + options?: VmmServersCreateOrUpdateOptionalParams, + ) => vmmServersCreateOrUpdate(context, resourceGroupName, vmmServerName, resource, options), + get: ( + resourceGroupName: string, + vmmServerName: string, + options?: VmmServersGetOptionalParams, + ) => vmmServersGet(context, resourceGroupName, vmmServerName, options), + }; +} + +export function _getVmmServersOperations(context: ScVmmContext): VmmServersOperations { + return { + ..._getVmmServers(context), + }; +} diff --git a/sdk/scvmm/arm-scvmm/src/index.ts b/sdk/scvmm/arm-scvmm/src/index.ts index 9a92d8de1995..a5ffed6615dd 100644 --- a/sdk/scvmm/arm-scvmm/src/index.ts +++ b/sdk/scvmm/arm-scvmm/src/index.ts @@ -1,13 +1,181 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { ScVmm } from "./scVmm.js"; -export * from "./operationsInterfaces/index.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { ScVmmClient } from "./scVmmClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + GuestAgent, + GuestAgentProperties, + GuestCredential, + HttpProxyConfiguration, + KnownProvisioningAction, + ProvisioningAction, + KnownProvisioningState, + ProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataProperties, + VirtualMachineInstance, + VirtualMachineInstanceProperties, + AvailabilitySetListItem, + OsProfileForVmInstance, + KnownOsType, + OsType, + HardwareProfile, + KnownLimitCpuForMigration, + LimitCpuForMigration, + KnownDynamicMemoryEnabled, + DynamicMemoryEnabled, + KnownIsHighlyAvailable, + IsHighlyAvailable, + NetworkProfile, + NetworkInterface, + KnownAllocationMethod, + AllocationMethod, + StorageProfile, + VirtualDisk, + StorageQosPolicyDetails, + KnownCreateDiffDisk, + CreateDiffDisk, + InfrastructureProfile, + Checkpoint, + ExtendedLocation, + ExtensionResource, + VirtualMachineInstanceUpdate, + VirtualMachineInstanceUpdateProperties, + HardwareProfileUpdate, + NetworkProfileUpdate, + NetworkInterfaceUpdate, + StorageProfileUpdate, + VirtualDiskUpdate, + InfrastructureProfileUpdate, + StopVirtualMachineOptions, + KnownSkipShutdown, + SkipShutdown, + VirtualMachineCreateCheckpoint, + VirtualMachineDeleteCheckpoint, + VirtualMachineRestoreCheckpoint, + InventoryItem, + InventoryItemProperties, + InventoryItemPropertiesUnion, + KnownInventoryType, + InventoryType, + CloudInventoryItem, + VirtualNetworkInventoryItem, + VirtualMachineTemplateInventoryItem, + VirtualMachineInventoryItem, + InventoryItemDetails, + AvailabilitySet, + AvailabilitySetProperties, + TrackedResource, + AvailabilitySetTagsUpdate, + VirtualMachineTemplate, + VirtualMachineTemplateProperties, + KnownIsCustomizable, + IsCustomizable, + VirtualMachineTemplateTagsUpdate, + VirtualNetwork, + VirtualNetworkProperties, + VirtualNetworkTagsUpdate, + Cloud, + CloudProperties, + CloudCapacity, + StorageQosPolicy, + CloudTagsUpdate, + VmmServer, + VmmServerProperties, + VmmCredential, + VmmServerTagsUpdate, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownForceDelete, + ForceDelete, + KnownDeleteFromHost, + DeleteFromHost, + KnownVersions, +} from "./models/index.js"; +export { + GuestAgentsListByVirtualMachineInstanceOptionalParams, + GuestAgentsDeleteOptionalParams, + GuestAgentsCreateOptionalParams, + GuestAgentsGetOptionalParams, + VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, + VmInstanceHybridIdentityMetadatasGetOptionalParams, + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesGetOptionalParams, + InventoryItemsListByVmmServerOptionalParams, + InventoryItemsDeleteOptionalParams, + InventoryItemsCreateOptionalParams, + InventoryItemsGetOptionalParams, + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsListByResourceGroupOptionalParams, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsUpdateOptionalParams, + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsGetOptionalParams, + VirtualMachineTemplatesListBySubscriptionOptionalParams, + VirtualMachineTemplatesListByResourceGroupOptionalParams, + VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesUpdateOptionalParams, + VirtualMachineTemplatesCreateOrUpdateOptionalParams, + VirtualMachineTemplatesGetOptionalParams, + VirtualNetworksListBySubscriptionOptionalParams, + VirtualNetworksListByResourceGroupOptionalParams, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateOptionalParams, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksGetOptionalParams, + CloudsListBySubscriptionOptionalParams, + CloudsListByResourceGroupOptionalParams, + CloudsDeleteOptionalParams, + CloudsUpdateOptionalParams, + CloudsCreateOrUpdateOptionalParams, + CloudsGetOptionalParams, + VmmServersListBySubscriptionOptionalParams, + VmmServersListByResourceGroupOptionalParams, + VmmServersDeleteOptionalParams, + VmmServersUpdateOptionalParams, + VmmServersCreateOrUpdateOptionalParams, + VmmServersGetOptionalParams, + OperationsListOptionalParams, + ScVmmClientOptionalParams, +} from "./api/index.js"; +export { + AvailabilitySetsOperations, + CloudsOperations, + GuestAgentsOperations, + InventoryItemsOperations, + OperationsOperations, + VirtualMachineInstancesOperations, + VirtualMachineTemplatesOperations, + VirtualNetworksOperations, + VmInstanceHybridIdentityMetadatasOperations, + VmmServersOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/scvmm/arm-scvmm/src/logger.ts b/sdk/scvmm/arm-scvmm/src/logger.ts new file mode 100644 index 000000000000..8505b2b42ad5 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-scvmm"); diff --git a/sdk/scvmm/arm-scvmm/src/lroImpl.ts b/sdk/scvmm/arm-scvmm/src/lroImpl.ts deleted file mode 100644 index d8bc98987053..000000000000 --- a/sdk/scvmm/arm-scvmm/src/lroImpl.ts +++ /dev/null @@ -1,38 +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 { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -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/scvmm/arm-scvmm/src/models/index.ts b/sdk/scvmm/arm-scvmm/src/models/index.ts index 1333a36fa204..67ab17059d45 100644 --- a/sdk/scvmm/arm-scvmm/src/models/index.ts +++ b/sdk/scvmm/arm-scvmm/src/models/index.ts @@ -1,2290 +1,105 @@ -/* - * 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 * as coreClient from "@azure/core-client"; - -export type InventoryItemPropertiesUnion = - | InventoryItemProperties - | CloudInventoryItem - | VirtualMachineInventoryItem - | VirtualMachineTemplateInventoryItem - | VirtualNetworkInventoryItem; - -/** The response of a VirtualMachineInstance list operation. */ -export interface VirtualMachineInstanceListResult { - /** The VirtualMachineInstance items on this page */ - value: VirtualMachineInstance[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface VirtualMachineInstanceProperties { - /** Availability Sets in vm. */ - availabilitySets?: AvailabilitySetListItem[]; - /** OS properties. */ - osProfile?: OsProfileForVmInstance; - /** Hardware properties. */ - hardwareProfile?: HardwareProfile; - /** Network properties. */ - networkProfile?: NetworkProfile; - /** Storage properties. */ - storageProfile?: StorageProfile; - /** Gets the infrastructure profile. */ - infrastructureProfile?: InfrastructureProfile; - /** - * Gets the power state of the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly powerState?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Availability Set model */ -export interface AvailabilitySetListItem { - /** Gets the ARM Id of the microsoft.scvmm/availabilitySets resource. */ - id?: string; - /** Gets or sets the name of the availability set. */ - name?: string; -} - -/** Defines the resource properties. */ -export interface OsProfileForVmInstance { - /** - * Admin password of the virtual machine. - * This value contains a credential. Consider obscuring before showing to users - */ - adminPassword?: string; - /** Gets or sets computer name. */ - computerName?: string; - /** - * Gets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets os sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osSku?: string; - /** - * Gets os version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osVersion?: string; -} - -/** Defines the resource properties. */ -export interface HardwareProfile { - /** MemoryMB is the size of a virtual machine's memory, in MB. */ - memoryMB?: number; - /** Gets or sets the number of vCPUs for the vm. */ - cpuCount?: number; - /** Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. */ - limitCpuForMigration?: LimitCpuForMigration; - /** Gets or sets a value indicating whether to enable dynamic memory or not. */ - dynamicMemoryEnabled?: DynamicMemoryEnabled; - /** Gets or sets the max dynamic memory for the vm. */ - dynamicMemoryMaxMB?: number; - /** Gets or sets the min dynamic memory for the vm. */ - dynamicMemoryMinMB?: number; - /** - * Gets highly available property. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isHighlyAvailable?: IsHighlyAvailable; -} - -/** Defines the resource properties. */ -export interface NetworkProfile { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterface[]; -} - -/** Network Interface model */ -export interface NetworkInterface { - /** Gets or sets the name of the network interface. */ - name?: string; - /** - * Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC when the name is not set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Gets the nic ipv4 addresses. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv4Addresses?: string[]; - /** - * Gets the nic ipv6 addresses. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv6Addresses?: string[]; - /** Gets or sets the nic MAC address. */ - macAddress?: string; - /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ - virtualNetworkId?: string; - /** - * Gets the name of the virtual network in vmmServer that the nic is connected to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkName?: string; - /** Gets or sets the ipv4 address type. */ - ipv4AddressType?: AllocationMethod; - /** Gets or sets the ipv6 address type. */ - ipv6AddressType?: AllocationMethod; - /** Gets or sets the mac address type. */ - macAddressType?: AllocationMethod; - /** Gets or sets the nic id. */ - nicId?: string; -} - -/** Defines the resource properties. */ -export interface StorageProfile { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDisk[]; -} - -/** Virtual disk model */ -export interface VirtualDisk { - /** Gets or sets the name of the disk. */ - name?: string; - /** - * Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when the name is not set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** Gets or sets the disk id. */ - diskId?: string; - /** Gets or sets the disk total size. */ - diskSizeGB?: number; - /** - * Gets the max disk size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxDiskSizeGB?: number; - /** Gets or sets the disk bus. */ - bus?: number; - /** Gets or sets the disk lun. */ - lun?: number; - /** Gets or sets the disk bus type. */ - busType?: string; - /** Gets or sets the disk vhd type. */ - vhdType?: string; - /** - * Gets the disk volume type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly volumeType?: string; - /** - * Gets the disk vhd format type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vhdFormatType?: string; - /** Gets or sets the disk id in the template. */ - templateDiskId?: string; - /** The QoS policy for the disk. */ - storageQosPolicy?: StorageQosPolicyDetails; - /** Gets or sets a value indicating diff disk. */ - createDiffDisk?: CreateDiffDisk; -} - -/** The StorageQoSPolicyDetails definition. */ -export interface StorageQosPolicyDetails { - /** The name of the policy. */ - name?: string; - /** The ID of the QoS policy. */ - id?: string; -} - -/** Specifies the vmmServer infrastructure specific settings for the virtual machine instance. */ -export interface InfrastructureProfile { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** ARM Id of the cloud resource to use for deploying the vm. */ - cloudId?: string; - /** ARM Id of the template resource to use for deploying the vm. */ - templateId?: string; - /** VMName is the name of VM on the SCVmm server. */ - vmName?: string; - /** Unique ID of the virtual machine. */ - uuid?: string; - /** - * Last restored checkpoint in the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastRestoredVmCheckpoint?: Checkpoint; - /** - * Checkpoints in the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly checkpoints?: Checkpoint[]; - /** Type of checkpoint supported for the vm. */ - checkpointType?: string; - /** Gets or sets the generation for the vm. */ - generation?: number; - /** Gets or sets the bios guid for the vm. */ - biosGuid?: string; -} - -/** Defines the resource properties. */ -export interface Checkpoint { - /** Gets ID of parent of the checkpoint. */ - parentCheckpointId?: string; - /** Gets ID of the checkpoint. */ - checkpointId?: string; - /** Gets name of the checkpoint. */ - name?: string; - /** Gets description of the checkpoint. */ - description?: string; -} - -/** The extended location. */ -export interface ExtendedLocation { - /** The extended location type. */ - type?: string; - /** The extended location name. */ - name?: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * 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; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** The type used for update operations of the VirtualMachineInstance. */ -export interface VirtualMachineInstanceUpdate { - /** The update properties of the VirtualMachineInstance. */ - properties?: VirtualMachineInstanceUpdateProperties; -} - -/** Virtual Machine Instance Properties Update model */ -export interface VirtualMachineInstanceUpdateProperties { - /** Availability Sets in vm. */ - availabilitySets?: AvailabilitySetListItem[]; - /** Hardware properties. */ - hardwareProfile?: HardwareProfileUpdate; - /** Network properties. */ - networkProfile?: NetworkProfileUpdate; - /** Storage properties. */ - storageProfile?: StorageProfileUpdate; - /** Gets the infrastructure profile. */ - infrastructureProfile?: InfrastructureProfileUpdate; -} - -/** Defines the resource update properties. */ -export interface HardwareProfileUpdate { - /** MemoryMB is the size of a virtual machine's memory, in MB. */ - memoryMB?: number; - /** Gets or sets the number of vCPUs for the vm. */ - cpuCount?: number; - /** Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. */ - limitCpuForMigration?: LimitCpuForMigration; - /** Gets or sets a value indicating whether to enable dynamic memory or not. */ - dynamicMemoryEnabled?: DynamicMemoryEnabled; - /** Gets or sets the max dynamic memory for the vm. */ - dynamicMemoryMaxMB?: number; - /** Gets or sets the min dynamic memory for the vm. */ - dynamicMemoryMinMB?: number; -} - -/** Defines the resource update properties. */ -export interface NetworkProfileUpdate { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterfaceUpdate[]; -} - -/** Network Interface Update model */ -export interface NetworkInterfaceUpdate { - /** Gets or sets the name of the network interface. */ - name?: string; - /** Gets or sets the nic MAC address. */ - macAddress?: string; - /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ - virtualNetworkId?: string; - /** Gets or sets the ipv4 address type. */ - ipv4AddressType?: AllocationMethod; - /** Gets or sets the ipv6 address type. */ - ipv6AddressType?: AllocationMethod; - /** Gets or sets the mac address type. */ - macAddressType?: AllocationMethod; - /** Gets or sets the nic id. */ - nicId?: string; -} - -/** Defines the resource update properties. */ -export interface StorageProfileUpdate { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDiskUpdate[]; -} - -/** Virtual Disk Update model */ -export interface VirtualDiskUpdate { - /** Gets or sets the name of the disk. */ - name?: string; - /** Gets or sets the disk id. */ - diskId?: string; - /** Gets or sets the disk total size. */ - diskSizeGB?: number; - /** Gets or sets the disk bus. */ - bus?: number; - /** Gets or sets the disk lun. */ - lun?: number; - /** Gets or sets the disk bus type. */ - busType?: string; - /** Gets or sets the disk vhd type. */ - vhdType?: string; - /** The QoS policy for the disk. */ - storageQosPolicy?: StorageQosPolicyDetails; -} - -/** Specifies the vmmServer infrastructure specific update settings for the virtual machine instance. */ -export interface InfrastructureProfileUpdate { - /** Type of checkpoint supported for the vm. */ - checkpointType?: string; -} - -/** Defines the create checkpoint action properties. */ -export interface VirtualMachineCreateCheckpoint { - /** Name of the checkpoint. */ - name?: string; - /** Description of the checkpoint. */ - description?: string; -} - -/** Defines the delete checkpoint action properties. */ -export interface VirtualMachineDeleteCheckpoint { - /** ID of the checkpoint to be deleted. */ - id?: string; -} - -/** The response of a GuestAgent list operation. */ -export interface GuestAgentListResult { - /** The GuestAgent items on this page */ - value: GuestAgent[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface GuestAgentProperties { - /** - * Gets a unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** Username / Password Credentials to provision guest agent. */ - credentials?: GuestCredential; - /** HTTP Proxy configuration for the VM. */ - httpProxyConfig?: HttpProxyConfiguration; - /** Gets or sets the guest agent provisioning action. */ - provisioningAction?: ProvisioningAction; - /** - * Gets the guest agent status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: string; - /** - * 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; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Username / Password Credentials to connect to guest. */ -export interface GuestCredential { - /** Gets or sets username to connect with the guest. */ - username: string; - /** - * Gets or sets the password to connect with the guest. - * This value contains a credential. Consider obscuring before showing to users - */ - password: string; -} - -/** HTTP Proxy configuration for the VM. */ -export interface HttpProxyConfiguration { - /** Gets or sets httpsProxy url. */ - httpsProxy?: string; -} - -/** The response of a VmInstanceHybridIdentityMetadata list operation. */ -export interface VmInstanceHybridIdentityMetadataListResult { - /** The VmInstanceHybridIdentityMetadata items on this page */ - value: VmInstanceHybridIdentityMetadata[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Describes the properties of Hybrid Identity Metadata for a Virtual Machine. */ -export interface VmInstanceHybridIdentityMetadataProperties { - /** The unique identifier for the resource. */ - resourceUid?: string; - /** Gets or sets the Public Key. */ - publicKey?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Defines the restore checkpoint action properties. */ -export interface VirtualMachineRestoreCheckpoint { - /** ID of the checkpoint to be restored to. */ - id?: string; -} - -/** 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?: SkipShutdown; -} - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** The response of a AvailabilitySet list operation. */ -export interface AvailabilitySetListResult { - /** The AvailabilitySet items on this page */ - value: AvailabilitySet[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface AvailabilitySetProperties { - /** Name of the availability set. */ - availabilitySetName?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The response of a Cloud list operation. */ -export interface CloudListResult { - /** The Cloud items on this page */ - value: Cloud[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface CloudProperties { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the cloud. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** - * Name of the cloud in VmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cloudName?: string; - /** - * Capacity of the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cloudCapacity?: CloudCapacity; - /** - * List of QoS policies available for the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageQosPolicies?: StorageQosPolicy[]; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Cloud Capacity model */ -export interface CloudCapacity { - /** - * CPUCount specifies the maximum number of CPUs that can be allocated in the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuCount?: number; - /** - * MemoryMB specifies a memory usage limit in megabytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memoryMB?: number; - /** - * VMCount gives the max number of VMs that can be deployed in the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmCount?: number; -} - -/** The StorageQoSPolicy definition. */ -export interface StorageQosPolicy { - /** The name of the policy. */ - name?: string; - /** The ID of the QoS policy. */ - id?: string; - /** The maximum IO operations per second. */ - iopsMaximum?: number; - /** The minimum IO operations per second. */ - iopsMinimum?: number; - /** The Bandwidth Limit for internet traffic. */ - bandwidthLimit?: number; - /** The underlying policy. */ - policyId?: string; -} - -/** The response of a VirtualMachineTemplate list operation. */ -export interface VirtualMachineTemplateListResult { - /** The VirtualMachineTemplate items on this page */ - value: VirtualMachineTemplate[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface VirtualMachineTemplateProperties { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the virtual machine template. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** - * Gets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets os name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; - /** - * Gets computer name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly computerName?: string; - /** - * MemoryMB is the desired size of a virtual machine's memory, in MB. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memoryMB?: number; - /** - * Gets the desired number of vCPUs for the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuCount?: number; - /** - * Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly limitCpuForMigration?: LimitCpuForMigration; - /** - * Gets a value indicating whether to enable dynamic memory or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dynamicMemoryEnabled?: DynamicMemoryEnabled; - /** - * Gets a value indicating whether the vm template is customizable or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isCustomizable?: IsCustomizable; - /** - * Gets the max dynamic memory for the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dynamicMemoryMaxMB?: number; - /** - * Gets the min dynamic memory for the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dynamicMemoryMinMB?: number; - /** - * Gets highly available property. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isHighlyAvailable?: IsHighlyAvailable; - /** - * Gets the generation for the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly generation?: number; - /** - * Gets 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 the disks of the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: VirtualDisk[]; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The response of a VirtualNetwork list operation. */ -export interface VirtualNetworkListResult { - /** The VirtualNetwork items on this page */ - value: VirtualNetwork[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface VirtualNetworkProperties { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the virtual network. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** - * Name of the virtual network in vmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkName?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The response of a VmmServer list operation. */ -export interface VmmServerListResult { - /** The VmmServer items on this page */ - value: VmmServer[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface VmmServerProperties { - /** Credentials to connect to VmmServer. */ - credentials?: VmmCredential; - /** Fqdn is the hostname/ip of the vmmServer. */ - fqdn: string; - /** Port is the port on which the vmmServer is listening. */ - port?: number; - /** - * Gets the connection status to the vmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: string; - /** - * Gets any error message if connection to vmmServer is having any issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorMessage?: string; - /** - * Unique ID of vmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** - * Version is the version of the vmmSever. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Credentials to connect to VmmServer. */ -export interface VmmCredential { - /** Username to use to connect to VmmServer. */ - username?: string; - /** - * Password to use to connect to VmmServer. - * This value contains a credential. Consider obscuring before showing to users - */ - password?: string; -} - -/** The type used for updating tags in AvailabilitySet resources. */ -export interface AvailabilitySetTagsUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** The type used for updating tags in Cloud resources. */ -export interface CloudTagsUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** The type used for updating tags in VirtualMachineTemplate resources. */ -export interface VirtualMachineTemplateTagsUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** The type used for updating tags in VirtualNetwork resources. */ -export interface VirtualNetworkTagsUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** The type used for updating tags in VmmServer resources. */ -export interface VmmServerTagsUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** The response of a InventoryItem list operation. */ -export interface InventoryItemListResult { - /** The InventoryItem items on this page */ - value: InventoryItem[]; - /** - * The link to the next page of items - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Defines the resource properties. */ -export interface InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: - | "Cloud" - | "VirtualMachine" - | "VirtualMachineTemplate" - | "VirtualNetwork"; - /** - * Gets the tracked resource id corresponding to the inventory resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managedResourceId?: string; - /** - * Gets the UUID (which is assigned by Vmm) for the inventory item. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** - * Gets the Managed Object name in Vmm for the inventory item. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inventoryItemName?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Defines the resource properties. */ -export interface InventoryItemDetails { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Gets or sets the Managed Object name in Vmm for the resource. */ - inventoryItemName?: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The Cloud inventory item. */ -export interface CloudInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "Cloud"; -} - -/** The Virtual machine inventory item. */ -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualMachine"; - /** - * Gets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets os name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; - /** - * Gets os version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osVersion?: string; - /** - * Gets the power state of the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly powerState?: string; - /** Gets or sets the nic ip addresses. */ - ipAddresses?: string[]; - /** Cloud inventory resource details where the VM is present. */ - cloud?: InventoryItemDetails; - /** - * Gets the bios guid. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly biosGuid?: string; - /** - * Gets the tracked resource id corresponding to the inventory resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managedMachineResourceId?: string; -} - -/** The Virtual machine template inventory item. */ -export interface VirtualMachineTemplateInventoryItem - extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualMachineTemplate"; - /** - * Gets the desired number of vCPUs for the vm. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuCount?: number; - /** - * MemoryMB is the desired size of a virtual machine's memory, in MB. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memoryMB?: number; - /** - * Gets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets os name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; -} - -/** The Virtual network inventory item. */ -export interface VirtualNetworkInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualNetwork"; -} - -/** Define the virtualMachineInstance. */ -export interface VirtualMachineInstance extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: VirtualMachineInstanceProperties; - /** Gets or sets the extended location. */ - extendedLocation: ExtendedLocation; -} - -/** Defines the GuestAgent. */ -export interface GuestAgent extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: GuestAgentProperties; -} - -/** Defines the HybridIdentityMetadata. */ -export interface VmInstanceHybridIdentityMetadata extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: VmInstanceHybridIdentityMetadataProperties; -} - -/** Defines the inventory item. */ -export interface InventoryItem extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: InventoryItemPropertiesUnion; - /** 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 AvailabilitySets resource definition. */ -export interface AvailabilitySet extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: AvailabilitySetProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** The Clouds resource definition. */ -export interface Cloud extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: CloudProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** The VirtualMachineTemplates resource definition. */ -export interface VirtualMachineTemplate extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: VirtualMachineTemplateProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** The VirtualNetworks resource definition. */ -export interface VirtualNetwork extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: VirtualNetworkProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** The VmmServers resource definition. */ -export interface VmmServer extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: VmmServerProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** Defines headers for VirtualMachineInstances_createOrUpdate operation. */ -export interface VirtualMachineInstancesCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_update operation. */ -export interface VirtualMachineInstancesUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_delete operation. */ -export interface VirtualMachineInstancesDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_createCheckpoint operation. */ -export interface VirtualMachineInstancesCreateCheckpointHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_deleteCheckpoint operation. */ -export interface VirtualMachineInstancesDeleteCheckpointHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_restart operation. */ -export interface VirtualMachineInstancesRestartHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_restoreCheckpoint operation. */ -export interface VirtualMachineInstancesRestoreCheckpointHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_start operation. */ -export interface VirtualMachineInstancesStartHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineInstances_stop operation. */ -export interface VirtualMachineInstancesStopHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for GuestAgents_create operation. */ -export interface GuestAgentsCreateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for AvailabilitySets_createOrUpdate operation. */ -export interface AvailabilitySetsCreateOrUpdateHeaders { - /** A link to the status monitor */ - azureAsyncOperation?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for AvailabilitySets_update operation. */ -export interface AvailabilitySetsUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for AvailabilitySets_delete operation. */ -export interface AvailabilitySetsDeleteHeaders { - /** A link to the status monitor */ - azureAsyncOperation?: string; - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clouds_createOrUpdate operation. */ -export interface CloudsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clouds_update operation. */ -export interface CloudsUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clouds_delete operation. */ -export interface CloudsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineTemplates_createOrUpdate operation. */ -export interface VirtualMachineTemplatesCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineTemplates_update operation. */ -export interface VirtualMachineTemplatesUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachineTemplates_delete operation. */ -export interface VirtualMachineTemplatesDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualNetworks_createOrUpdate operation. */ -export interface VirtualNetworksCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualNetworks_update operation. */ -export interface VirtualNetworksUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualNetworks_delete operation. */ -export interface VirtualNetworksDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VmmServers_createOrUpdate operation. */ -export interface VmmServersCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VmmServers_update operation. */ -export interface VmmServersUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VmmServers_delete operation. */ -export interface VmmServersDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Known values of {@link OsType} that the service accepts. */ -export enum KnownOsType { - /** Windows operating system. */ - Windows = "Windows", - /** Linux operating system. */ - Linux = "Linux", - /** Other operating system. */ - Other = "Other", -} - -/** - * Defines values for OsType. \ - * {@link KnownOsType} can be used interchangeably with OsType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows**: Windows operating system. \ - * **Linux**: Linux operating system. \ - * **Other**: Other operating system. - */ -export type OsType = string; - -/** Known values of {@link LimitCpuForMigration} that the service accepts. */ -export enum KnownLimitCpuForMigration { - /** Enable limit CPU for migration. */ - True = "true", - /** Disable limit CPU for migration. */ - False = "false", -} - -/** - * Defines values for LimitCpuForMigration. \ - * {@link KnownLimitCpuForMigration} can be used interchangeably with LimitCpuForMigration, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable limit CPU for migration. \ - * **false**: Disable limit CPU for migration. - */ -export type LimitCpuForMigration = string; - -/** Known values of {@link DynamicMemoryEnabled} that the service accepts. */ -export enum KnownDynamicMemoryEnabled { - /** Enable dynamic memory. */ - True = "true", - /** Disable dynamic memory. */ - False = "false", -} - -/** - * Defines values for DynamicMemoryEnabled. \ - * {@link KnownDynamicMemoryEnabled} can be used interchangeably with DynamicMemoryEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable dynamic memory. \ - * **false**: Disable dynamic memory. - */ -export type DynamicMemoryEnabled = string; - -/** Known values of {@link IsHighlyAvailable} that the service accepts. */ -export enum KnownIsHighlyAvailable { - /** Enable highly available. */ - True = "true", - /** Disable highly available. */ - False = "false", -} - -/** - * Defines values for IsHighlyAvailable. \ - * {@link KnownIsHighlyAvailable} can be used interchangeably with IsHighlyAvailable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable highly available. \ - * **false**: Disable highly available. - */ -export type IsHighlyAvailable = string; - -/** Known values of {@link AllocationMethod} that the service accepts. */ -export enum KnownAllocationMethod { - /** Dynamically allocated address. */ - Dynamic = "Dynamic", - /** Statically allocated address. */ - Static = "Static", -} - -/** - * Defines values for AllocationMethod. \ - * {@link KnownAllocationMethod} can be used interchangeably with AllocationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Dynamic**: Dynamically allocated address. \ - * **Static**: Statically allocated address. - */ -export type AllocationMethod = string; - -/** Known values of {@link CreateDiffDisk} that the service accepts. */ -export enum KnownCreateDiffDisk { - /** Enable create diff disk. */ - True = "true", - /** Disable create diff disk. */ - False = "false", -} - -/** - * Defines values for CreateDiffDisk. \ - * {@link KnownCreateDiffDisk} can be used interchangeably with CreateDiffDisk, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable create diff disk. \ - * **false**: Disable create diff disk. - */ -export type CreateDiffDisk = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** The resource is provisioning. */ - Provisioning = "Provisioning", - /** The resource is updating. */ - Updating = "Updating", - /** The resource is being deleted. */ - Deleting = "Deleting", - /** The resource has been accepted. */ - Accepted = "Accepted", - /** The resource was created. */ - Created = "Created", -} - -/** - * Defines values for ProvisioningState. \ - * {@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**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Provisioning**: The resource is provisioning. \ - * **Updating**: The resource is updating. \ - * **Deleting**: The resource is being deleted. \ - * **Accepted**: The resource has been accepted. \ - * **Created**: The resource was 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 CreatedByType = string; - -/** Known values of {@link ForceDelete} that the service accepts. */ -export enum KnownForceDelete { - /** Enable force delete. */ - True = "true", - /** Disable force delete. */ - False = "false", -} - -/** - * Defines values for ForceDelete. \ - * {@link KnownForceDelete} can be used interchangeably with ForceDelete, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable force delete. \ - * **false**: Disable force delete. - */ -export type ForceDelete = string; - -/** Known values of {@link DeleteFromHost} that the service accepts. */ -export enum KnownDeleteFromHost { - /** Enable delete from host. */ - True = "true", - /** Disable delete from host. */ - False = "false", -} - -/** - * Defines values for DeleteFromHost. \ - * {@link KnownDeleteFromHost} can be used interchangeably with DeleteFromHost, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable delete from host. \ - * **false**: Disable delete from host. - */ -export type DeleteFromHost = string; - -/** Known values of {@link ProvisioningAction} that the service accepts. */ -export enum KnownProvisioningAction { - /** Install guest agent. */ - Install = "install", - /** Uninstall guest agent. */ - Uninstall = "uninstall", - /** Repair guest agent. */ - Repair = "repair", -} - -/** - * Defines values for ProvisioningAction. \ - * {@link KnownProvisioningAction} can be used interchangeably with ProvisioningAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **install**: Install guest agent. \ - * **uninstall**: Uninstall guest agent. \ - * **repair**: Repair guest agent. - */ -export type ProvisioningAction = string; - -/** Known values of {@link SkipShutdown} that the service accepts. */ -export enum KnownSkipShutdown { - /** Enable skip shutdown. */ - True = "true", - /** Disable skip shutdown. */ - False = "false", -} - -/** - * Defines values for SkipShutdown. \ - * {@link KnownSkipShutdown} can be used interchangeably with SkipShutdown, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable skip shutdown. \ - * **false**: Disable skip shutdown. - */ -export type SkipShutdown = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal", -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link IsCustomizable} that the service accepts. */ -export enum KnownIsCustomizable { - /** Enable customizable. */ - True = "true", - /** Disable customizable. */ - False = "false", -} - -/** - * Defines values for IsCustomizable. \ - * {@link KnownIsCustomizable} can be used interchangeably with IsCustomizable, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Enable customizable. \ - * **false**: Disable customizable. - */ -export type IsCustomizable = string; - -/** Known values of {@link InventoryType} that the service accepts. */ -export enum KnownInventoryType { - /** Cloud inventory type */ - Cloud = "Cloud", - /** VirtualNetwork inventory type */ - VirtualNetwork = "VirtualNetwork", - /** VirtualMachine inventory type */ - VirtualMachine = "VirtualMachine", - /** VirtualMachineTemplate inventory type */ - VirtualMachineTemplate = "VirtualMachineTemplate", -} - -/** - * Defines values for InventoryType. \ - * {@link KnownInventoryType} can be used interchangeably with InventoryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Cloud**: Cloud inventory type \ - * **VirtualNetwork**: VirtualNetwork inventory type \ - * **VirtualMachine**: VirtualMachine inventory type \ - * **VirtualMachineTemplate**: VirtualMachineTemplate inventory type - */ -export type InventoryType = string; - -/** Optional parameters. */ -export interface VirtualMachineInstancesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualMachineInstancesListResponse = - VirtualMachineInstanceListResult; - -/** Optional parameters. */ -export interface VirtualMachineInstancesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; - -/** Optional parameters. */ -export interface VirtualMachineInstancesCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type VirtualMachineInstancesCreateOrUpdateResponse = - VirtualMachineInstance; - -/** Optional parameters. */ -export interface VirtualMachineInstancesUpdateOptionalParams - 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 update operation. */ -export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; - -/** Optional parameters. */ -export interface VirtualMachineInstancesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** Whether to disable the VM from azure and also delete it from Vmm. */ - deleteFromHost?: DeleteFromHost; - /** 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 delete operation. */ -export type VirtualMachineInstancesDeleteResponse = - VirtualMachineInstancesDeleteHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesCreateCheckpointOptionalParams - 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 createCheckpoint operation. */ -export type VirtualMachineInstancesCreateCheckpointResponse = - VirtualMachineInstancesCreateCheckpointHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesDeleteCheckpointOptionalParams - 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 deleteCheckpoint operation. */ -export type VirtualMachineInstancesDeleteCheckpointResponse = - VirtualMachineInstancesDeleteCheckpointHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesRestartOptionalParams - 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 restart operation. */ -export type VirtualMachineInstancesRestartResponse = - VirtualMachineInstancesRestartHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesRestoreCheckpointOptionalParams - 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 restoreCheckpoint operation. */ -export type VirtualMachineInstancesRestoreCheckpointResponse = - VirtualMachineInstancesRestoreCheckpointHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesStartOptionalParams - 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 start operation. */ -export type VirtualMachineInstancesStartResponse = - VirtualMachineInstancesStartHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesStopOptionalParams - 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 stop operation. */ -export type VirtualMachineInstancesStopResponse = - VirtualMachineInstancesStopHeaders; - -/** Optional parameters. */ -export interface VirtualMachineInstancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualMachineInstancesListNextResponse = - VirtualMachineInstanceListResult; - -/** Optional parameters. */ -export interface GuestAgentsListByVirtualMachineInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualMachineInstance operation. */ -export type GuestAgentsListByVirtualMachineInstanceResponse = - GuestAgentListResult; - -/** Optional parameters. */ -export interface GuestAgentsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GuestAgentsGetResponse = GuestAgent; - -/** Optional parameters. */ -export interface GuestAgentsCreateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type GuestAgentsCreateResponse = GuestAgent; - -/** Optional parameters. */ -export interface GuestAgentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GuestAgentsListByVirtualMachineInstanceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualMachineInstanceNext operation. */ -export type GuestAgentsListByVirtualMachineInstanceNextResponse = - GuestAgentListResult; - -/** Optional parameters. */ -export interface VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualMachineInstance operation. */ -export type VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceResponse = - VmInstanceHybridIdentityMetadataListResult; - -/** Optional parameters. */ -export interface VmInstanceHybridIdentityMetadatasGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VmInstanceHybridIdentityMetadatasGetResponse = - VmInstanceHybridIdentityMetadata; - -/** Optional parameters. */ -export interface VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualMachineInstanceNext operation. */ -export type VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextResponse = - VmInstanceHybridIdentityMetadataListResult; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface AvailabilitySetsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AvailabilitySetsListBySubscriptionResponse = - AvailabilitySetListResult; - -/** Optional parameters. */ -export interface AvailabilitySetsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AvailabilitySetsListByResourceGroupResponse = - AvailabilitySetListResult; - -/** Optional parameters. */ -export interface AvailabilitySetsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AvailabilitySetsGetResponse = AvailabilitySet; - -/** Optional parameters. */ -export interface AvailabilitySetsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; - -/** Optional parameters. */ -export interface AvailabilitySetsUpdateOptionalParams - 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 update operation. */ -export type AvailabilitySetsUpdateResponse = AvailabilitySet; - -/** Optional parameters. */ -export interface AvailabilitySetsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** 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 delete operation. */ -export type AvailabilitySetsDeleteResponse = AvailabilitySetsDeleteHeaders; - -/** Optional parameters. */ -export interface AvailabilitySetsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type AvailabilitySetsListBySubscriptionNextResponse = - AvailabilitySetListResult; - -/** Optional parameters. */ -export interface AvailabilitySetsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AvailabilitySetsListByResourceGroupNextResponse = - AvailabilitySetListResult; - -/** Optional parameters. */ -export interface CloudsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type CloudsListBySubscriptionResponse = CloudListResult; - -/** Optional parameters. */ -export interface CloudsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type CloudsListByResourceGroupResponse = CloudListResult; - -/** Optional parameters. */ -export interface CloudsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CloudsGetResponse = Cloud; - -/** Optional parameters. */ -export interface CloudsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type CloudsCreateOrUpdateResponse = Cloud; - -/** Optional parameters. */ -export interface CloudsUpdateOptionalParams - 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 update operation. */ -export type CloudsUpdateResponse = Cloud; - -/** Optional parameters. */ -export interface CloudsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** 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 delete operation. */ -export type CloudsDeleteResponse = CloudsDeleteHeaders; - -/** Optional parameters. */ -export interface CloudsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type CloudsListBySubscriptionNextResponse = CloudListResult; - -/** Optional parameters. */ -export interface CloudsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type CloudsListByResourceGroupNextResponse = CloudListResult; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type VirtualMachineTemplatesListBySubscriptionResponse = - VirtualMachineTemplateListResult; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachineTemplatesListByResourceGroupResponse = - VirtualMachineTemplateListResult; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachineTemplatesGetResponse = VirtualMachineTemplate; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type VirtualMachineTemplatesCreateOrUpdateResponse = - VirtualMachineTemplate; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesUpdateOptionalParams - 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 update operation. */ -export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** 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 delete operation. */ -export type VirtualMachineTemplatesDeleteResponse = - VirtualMachineTemplatesDeleteHeaders; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type VirtualMachineTemplatesListBySubscriptionNextResponse = - VirtualMachineTemplateListResult; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualMachineTemplatesListByResourceGroupNextResponse = - VirtualMachineTemplateListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type VirtualNetworksListBySubscriptionResponse = - VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualNetworksListByResourceGroupResponse = - VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualNetworksGetResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksUpdateOptionalParams - 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 update operation. */ -export type VirtualNetworksUpdateResponse = VirtualNetwork; - -/** Optional parameters. */ -export interface VirtualNetworksDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** 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 delete operation. */ -export type VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; - -/** Optional parameters. */ -export interface VirtualNetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type VirtualNetworksListBySubscriptionNextResponse = - VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VirtualNetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualNetworksListByResourceGroupNextResponse = - VirtualNetworkListResult; - -/** Optional parameters. */ -export interface VmmServersListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type VmmServersListBySubscriptionResponse = VmmServerListResult; - -/** Optional parameters. */ -export interface VmmServersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VmmServersListByResourceGroupResponse = VmmServerListResult; - -/** Optional parameters. */ -export interface VmmServersGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VmmServersGetResponse = VmmServer; - -/** Optional parameters. */ -export interface VmmServersCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type VmmServersCreateOrUpdateResponse = VmmServer; - -/** Optional parameters. */ -export interface VmmServersUpdateOptionalParams - 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 update operation. */ -export type VmmServersUpdateResponse = VmmServer; - -/** Optional parameters. */ -export interface VmmServersDeleteOptionalParams - extends coreClient.OperationOptions { - /** Forces the resource to be deleted. */ - force?: ForceDelete; - /** 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 delete operation. */ -export type VmmServersDeleteResponse = VmmServersDeleteHeaders; - -/** Optional parameters. */ -export interface VmmServersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type VmmServersListBySubscriptionNextResponse = VmmServerListResult; - -/** Optional parameters. */ -export interface VmmServersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VmmServersListByResourceGroupNextResponse = VmmServerListResult; - -/** Optional parameters. */ -export interface InventoryItemsListByVmmServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVmmServer operation. */ -export type InventoryItemsListByVmmServerResponse = InventoryItemListResult; - -/** Optional parameters. */ -export interface InventoryItemsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type InventoryItemsGetResponse = InventoryItem; - -/** Optional parameters. */ -export interface InventoryItemsCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type InventoryItemsCreateResponse = InventoryItem; - -/** Optional parameters. */ -export interface InventoryItemsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface InventoryItemsListByVmmServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVmmServerNext operation. */ -export type InventoryItemsListByVmmServerNextResponse = InventoryItemListResult; - -/** Optional parameters. */ -export interface ScVmmOptionalParams extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + GuestAgent, + GuestAgentProperties, + GuestCredential, + HttpProxyConfiguration, + KnownProvisioningAction, + ProvisioningAction, + KnownProvisioningState, + ProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataProperties, + VirtualMachineInstance, + VirtualMachineInstanceProperties, + AvailabilitySetListItem, + OsProfileForVmInstance, + KnownOsType, + OsType, + HardwareProfile, + KnownLimitCpuForMigration, + LimitCpuForMigration, + KnownDynamicMemoryEnabled, + DynamicMemoryEnabled, + KnownIsHighlyAvailable, + IsHighlyAvailable, + NetworkProfile, + NetworkInterface, + KnownAllocationMethod, + AllocationMethod, + StorageProfile, + VirtualDisk, + StorageQosPolicyDetails, + KnownCreateDiffDisk, + CreateDiffDisk, + InfrastructureProfile, + Checkpoint, + ExtendedLocation, + ExtensionResource, + VirtualMachineInstanceUpdate, + VirtualMachineInstanceUpdateProperties, + HardwareProfileUpdate, + NetworkProfileUpdate, + NetworkInterfaceUpdate, + StorageProfileUpdate, + VirtualDiskUpdate, + InfrastructureProfileUpdate, + StopVirtualMachineOptions, + KnownSkipShutdown, + SkipShutdown, + VirtualMachineCreateCheckpoint, + VirtualMachineDeleteCheckpoint, + VirtualMachineRestoreCheckpoint, + InventoryItem, + InventoryItemProperties, + InventoryItemPropertiesUnion, + KnownInventoryType, + InventoryType, + CloudInventoryItem, + VirtualNetworkInventoryItem, + VirtualMachineTemplateInventoryItem, + VirtualMachineInventoryItem, + InventoryItemDetails, + AvailabilitySet, + AvailabilitySetProperties, + TrackedResource, + AvailabilitySetTagsUpdate, + VirtualMachineTemplate, + VirtualMachineTemplateProperties, + KnownIsCustomizable, + IsCustomizable, + VirtualMachineTemplateTagsUpdate, + VirtualNetwork, + VirtualNetworkProperties, + VirtualNetworkTagsUpdate, + Cloud, + CloudProperties, + CloudCapacity, + StorageQosPolicy, + CloudTagsUpdate, + VmmServer, + VmmServerProperties, + VmmCredential, + VmmServerTagsUpdate, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownForceDelete, + ForceDelete, + KnownDeleteFromHost, + DeleteFromHost, + KnownVersions, +} from "./models.js"; diff --git a/sdk/scvmm/arm-scvmm/src/models/mappers.ts b/sdk/scvmm/arm-scvmm/src/models/mappers.ts deleted file mode 100644 index 41a3ca0ab468..000000000000 --- a/sdk/scvmm/arm-scvmm/src/models/mappers.ts +++ /dev/null @@ -1,3106 +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 * as coreClient from "@azure/core-client"; - -export const VirtualMachineInstanceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstanceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineInstance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineInstanceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstanceProperties", - modelProperties: { - availabilitySets: { - serializedName: "availabilitySets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailabilitySetListItem", - }, - }, - }, - }, - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "OsProfileForVmInstance", - }, - }, - hardwareProfile: { - serializedName: "hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile", - }, - }, - networkProfile: { - serializedName: "networkProfile", - type: { - name: "Composite", - className: "NetworkProfile", - }, - }, - storageProfile: { - serializedName: "storageProfile", - type: { - name: "Composite", - className: "StorageProfile", - }, - }, - infrastructureProfile: { - serializedName: "infrastructureProfile", - type: { - name: "Composite", - className: "InfrastructureProfile", - }, - }, - powerState: { - serializedName: "powerState", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilitySetListItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetListItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OsProfileForVmInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileForVmInstance", - modelProperties: { - adminPassword: { - serializedName: "adminPassword", - type: { - name: "String", - }, - }, - computerName: { - serializedName: "computerName", - type: { - name: "String", - }, - }, - osType: { - serializedName: "osType", - readOnly: true, - type: { - name: "String", - }, - }, - osSku: { - serializedName: "osSku", - readOnly: true, - type: { - name: "String", - }, - }, - osVersion: { - serializedName: "osVersion", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HardwareProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareProfile", - modelProperties: { - memoryMB: { - serializedName: "memoryMB", - type: { - name: "Number", - }, - }, - cpuCount: { - serializedName: "cpuCount", - type: { - name: "Number", - }, - }, - limitCpuForMigration: { - serializedName: "limitCpuForMigration", - type: { - name: "String", - }, - }, - dynamicMemoryEnabled: { - serializedName: "dynamicMemoryEnabled", - type: { - name: "String", - }, - }, - dynamicMemoryMaxMB: { - serializedName: "dynamicMemoryMaxMB", - type: { - name: "Number", - }, - }, - dynamicMemoryMinMB: { - serializedName: "dynamicMemoryMinMB", - type: { - name: "Number", - }, - }, - isHighlyAvailable: { - serializedName: "isHighlyAvailable", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - }, - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String", - }, - }, - ipv4Addresses: { - serializedName: "ipv4Addresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - ipv6Addresses: { - serializedName: "ipv6Addresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - macAddress: { - serializedName: "macAddress", - type: { - name: "String", - }, - }, - virtualNetworkId: { - serializedName: "virtualNetworkId", - type: { - name: "String", - }, - }, - networkName: { - serializedName: "networkName", - readOnly: true, - type: { - name: "String", - }, - }, - ipv4AddressType: { - serializedName: "ipv4AddressType", - type: { - name: "String", - }, - }, - ipv6AddressType: { - serializedName: "ipv6AddressType", - type: { - name: "String", - }, - }, - macAddressType: { - serializedName: "macAddressType", - type: { - name: "String", - }, - }, - nicId: { - serializedName: "nicId", - 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", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualDisk", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String", - }, - }, - diskId: { - serializedName: "diskId", - type: { - name: "String", - }, - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number", - }, - }, - maxDiskSizeGB: { - serializedName: "maxDiskSizeGB", - readOnly: true, - type: { - name: "Number", - }, - }, - bus: { - serializedName: "bus", - type: { - name: "Number", - }, - }, - lun: { - serializedName: "lun", - type: { - name: "Number", - }, - }, - busType: { - serializedName: "busType", - type: { - name: "String", - }, - }, - vhdType: { - serializedName: "vhdType", - type: { - name: "String", - }, - }, - volumeType: { - serializedName: "volumeType", - readOnly: true, - type: { - name: "String", - }, - }, - vhdFormatType: { - serializedName: "vhdFormatType", - readOnly: true, - type: { - name: "String", - }, - }, - templateDiskId: { - serializedName: "templateDiskId", - type: { - name: "String", - }, - }, - storageQosPolicy: { - serializedName: "storageQoSPolicy", - type: { - name: "Composite", - className: "StorageQosPolicyDetails", - }, - }, - createDiffDisk: { - serializedName: "createDiffDisk", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageQosPolicyDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageQosPolicyDetails", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InfrastructureProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InfrastructureProfile", - modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String", - }, - }, - vmmServerId: { - serializedName: "vmmServerId", - type: { - name: "String", - }, - }, - cloudId: { - serializedName: "cloudId", - type: { - name: "String", - }, - }, - templateId: { - serializedName: "templateId", - type: { - name: "String", - }, - }, - vmName: { - constraints: { - MinLength: 1, - }, - serializedName: "vmName", - type: { - name: "String", - }, - }, - uuid: { - serializedName: "uuid", - type: { - name: "String", - }, - }, - lastRestoredVmCheckpoint: { - serializedName: "lastRestoredVMCheckpoint", - type: { - name: "Composite", - className: "Checkpoint", - }, - }, - checkpoints: { - serializedName: "checkpoints", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Checkpoint", - }, - }, - }, - }, - checkpointType: { - serializedName: "checkpointType", - type: { - name: "String", - }, - }, - generation: { - serializedName: "generation", - type: { - name: "Number", - }, - }, - biosGuid: { - serializedName: "biosGuid", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Checkpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Checkpoint", - modelProperties: { - parentCheckpointId: { - serializedName: "parentCheckpointID", - type: { - name: "String", - }, - }, - checkpointId: { - serializedName: "checkpointID", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const VirtualMachineInstanceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstanceUpdate", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualMachineInstanceUpdateProperties", - }, - }, - }, - }, -}; - -export const VirtualMachineInstanceUpdateProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstanceUpdateProperties", - modelProperties: { - availabilitySets: { - serializedName: "availabilitySets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailabilitySetListItem", - }, - }, - }, - }, - hardwareProfile: { - serializedName: "hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfileUpdate", - }, - }, - networkProfile: { - serializedName: "networkProfile", - type: { - name: "Composite", - className: "NetworkProfileUpdate", - }, - }, - storageProfile: { - serializedName: "storageProfile", - type: { - name: "Composite", - className: "StorageProfileUpdate", - }, - }, - infrastructureProfile: { - serializedName: "infrastructureProfile", - type: { - name: "Composite", - className: "InfrastructureProfileUpdate", - }, - }, - }, - }, - }; - -export const HardwareProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareProfileUpdate", - modelProperties: { - memoryMB: { - serializedName: "memoryMB", - type: { - name: "Number", - }, - }, - cpuCount: { - serializedName: "cpuCount", - type: { - name: "Number", - }, - }, - limitCpuForMigration: { - serializedName: "limitCpuForMigration", - type: { - name: "String", - }, - }, - dynamicMemoryEnabled: { - serializedName: "dynamicMemoryEnabled", - type: { - name: "String", - }, - }, - dynamicMemoryMaxMB: { - serializedName: "dynamicMemoryMaxMB", - type: { - name: "Number", - }, - }, - dynamicMemoryMinMB: { - serializedName: "dynamicMemoryMinMB", - type: { - name: "Number", - }, - }, - }, - }, -}; - -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", - }, - }, - macAddress: { - serializedName: "macAddress", - type: { - name: "String", - }, - }, - virtualNetworkId: { - serializedName: "virtualNetworkId", - type: { - name: "String", - }, - }, - ipv4AddressType: { - serializedName: "ipv4AddressType", - type: { - name: "String", - }, - }, - ipv6AddressType: { - serializedName: "ipv6AddressType", - type: { - name: "String", - }, - }, - macAddressType: { - serializedName: "macAddressType", - type: { - name: "String", - }, - }, - nicId: { - serializedName: "nicId", - 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", - type: { - name: "String", - }, - }, - diskId: { - serializedName: "diskId", - type: { - name: "String", - }, - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number", - }, - }, - bus: { - serializedName: "bus", - type: { - name: "Number", - }, - }, - lun: { - serializedName: "lun", - type: { - name: "Number", - }, - }, - busType: { - serializedName: "busType", - type: { - name: "String", - }, - }, - vhdType: { - serializedName: "vhdType", - type: { - name: "String", - }, - }, - storageQosPolicy: { - serializedName: "storageQoSPolicy", - type: { - name: "Composite", - className: "StorageQosPolicyDetails", - }, - }, - }, - }, -}; - -export const InfrastructureProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InfrastructureProfileUpdate", - modelProperties: { - checkpointType: { - serializedName: "checkpointType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineCreateCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineCreateCheckpoint", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineDeleteCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineDeleteCheckpoint", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GuestAgentListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgentListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GuestAgent", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GuestAgentProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgentProperties", - modelProperties: { - uuid: { - serializedName: "uuid", - readOnly: true, - type: { - name: "String", - }, - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "GuestCredential", - }, - }, - httpProxyConfig: { - serializedName: "httpProxyConfig", - type: { - name: "Composite", - className: "HttpProxyConfiguration", - }, - }, - provisioningAction: { - serializedName: "provisioningAction", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - customResourceName: { - serializedName: "customResourceName", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GuestCredential: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestCredential", - modelProperties: { - username: { - serializedName: "username", - required: true, - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HttpProxyConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpProxyConfiguration", - modelProperties: { - httpsProxy: { - serializedName: "httpsProxy", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmInstanceHybridIdentityMetadataListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VmInstanceHybridIdentityMetadataListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmInstanceHybridIdentityMetadata", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VmInstanceHybridIdentityMetadataProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VmInstanceHybridIdentityMetadataProperties", - modelProperties: { - resourceUid: { - serializedName: "resourceUid", - type: { - name: "String", - }, - }, - publicKey: { - serializedName: "publicKey", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VirtualMachineRestoreCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineRestoreCheckpoint", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StopVirtualMachineOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StopVirtualMachineOptions", - modelProperties: { - skipShutdown: { - defaultValue: "false", - serializedName: "skipShutdown", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilitySetListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailabilitySet", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilitySetProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetProperties", - modelProperties: { - availabilitySetName: { - constraints: { - MinLength: 1, - }, - serializedName: "availabilitySetName", - type: { - name: "String", - }, - }, - vmmServerId: { - serializedName: "vmmServerId", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Cloud", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudProperties", - modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String", - }, - }, - uuid: { - constraints: { - Pattern: new RegExp( - "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - ), - }, - serializedName: "uuid", - type: { - name: "String", - }, - }, - vmmServerId: { - serializedName: "vmmServerId", - type: { - name: "String", - }, - }, - cloudName: { - serializedName: "cloudName", - readOnly: true, - type: { - name: "String", - }, - }, - cloudCapacity: { - serializedName: "cloudCapacity", - type: { - name: "Composite", - className: "CloudCapacity", - }, - }, - storageQosPolicies: { - serializedName: "storageQoSPolicies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageQosPolicy", - }, - }, - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudCapacity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudCapacity", - modelProperties: { - cpuCount: { - serializedName: "cpuCount", - readOnly: true, - type: { - name: "Number", - }, - }, - memoryMB: { - serializedName: "memoryMB", - readOnly: true, - type: { - name: "Number", - }, - }, - vmCount: { - serializedName: "vmCount", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const StorageQosPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageQosPolicy", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - iopsMaximum: { - serializedName: "iopsMaximum", - type: { - name: "Number", - }, - }, - iopsMinimum: { - serializedName: "iopsMinimum", - type: { - name: "Number", - }, - }, - bandwidthLimit: { - serializedName: "bandwidthLimit", - type: { - name: "Number", - }, - }, - policyId: { - serializedName: "policyId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineTemplateListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineTemplateListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineTemplate", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineTemplateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineTemplateProperties", - modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String", - }, - }, - uuid: { - constraints: { - Pattern: new RegExp( - "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - ), - }, - serializedName: "uuid", - type: { - name: "String", - }, - }, - vmmServerId: { - serializedName: "vmmServerId", - type: { - name: "String", - }, - }, - osType: { - serializedName: "osType", - readOnly: true, - type: { - name: "String", - }, - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String", - }, - }, - computerName: { - serializedName: "computerName", - readOnly: true, - type: { - name: "String", - }, - }, - memoryMB: { - serializedName: "memoryMB", - readOnly: true, - type: { - name: "Number", - }, - }, - cpuCount: { - serializedName: "cpuCount", - readOnly: true, - type: { - name: "Number", - }, - }, - limitCpuForMigration: { - serializedName: "limitCpuForMigration", - readOnly: true, - type: { - name: "String", - }, - }, - dynamicMemoryEnabled: { - serializedName: "dynamicMemoryEnabled", - readOnly: true, - type: { - name: "String", - }, - }, - isCustomizable: { - serializedName: "isCustomizable", - readOnly: true, - type: { - name: "String", - }, - }, - dynamicMemoryMaxMB: { - serializedName: "dynamicMemoryMaxMB", - readOnly: true, - type: { - name: "Number", - }, - }, - dynamicMemoryMinMB: { - serializedName: "dynamicMemoryMinMB", - readOnly: true, - type: { - name: "Number", - }, - }, - isHighlyAvailable: { - serializedName: "isHighlyAvailable", - readOnly: true, - type: { - name: "String", - }, - }, - generation: { - serializedName: "generation", - readOnly: true, - type: { - name: "Number", - }, - }, - networkInterfaces: { - serializedName: "networkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - disks: { - serializedName: "disks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDisk", - }, - }, - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetwork", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkProperties", - modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String", - }, - }, - uuid: { - constraints: { - Pattern: new RegExp( - "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - ), - }, - serializedName: "uuid", - type: { - name: "String", - }, - }, - vmmServerId: { - serializedName: "vmmServerId", - type: { - name: "String", - }, - }, - networkName: { - serializedName: "networkName", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmmServerListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServerListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmmServer", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmmServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServerProperties", - modelProperties: { - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "VmmCredential", - }, - }, - fqdn: { - constraints: { - MinLength: 1, - }, - serializedName: "fqdn", - required: true, - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - errorMessage: { - serializedName: "errorMessage", - readOnly: true, - type: { - name: "String", - }, - }, - uuid: { - serializedName: "uuid", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmmCredential: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmCredential", - modelProperties: { - username: { - serializedName: "username", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilitySetTagsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetTagsUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const CloudTagsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudTagsUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const VirtualMachineTemplateTagsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineTemplateTagsUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const VirtualNetworkTagsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworkTagsUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const VmmServerTagsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServerTagsUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const InventoryItemListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InventoryItemListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InventoryItem", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - }, - }, - managedResourceId: { - serializedName: "managedResourceId", - readOnly: true, - type: { - name: "String", - }, - }, - uuid: { - serializedName: "uuid", - readOnly: true, - type: { - name: "String", - }, - }, - inventoryItemName: { - serializedName: "inventoryItemName", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InventoryItemDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InventoryItemDetails", - modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String", - }, - }, - inventoryItemName: { - serializedName: "inventoryItemName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudInventoryItem: coreClient.CompositeMapper = { - serializedName: "Cloud", - type: { - name: "Composite", - className: "CloudInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, - modelProperties: { - ...InventoryItemProperties.type.modelProperties, - }, - }, -}; - -export const VirtualMachineInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualMachine", - type: { - name: "Composite", - className: "VirtualMachineInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, - modelProperties: { - ...InventoryItemProperties.type.modelProperties, - osType: { - serializedName: "osType", - readOnly: true, - type: { - name: "String", - }, - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String", - }, - }, - osVersion: { - serializedName: "osVersion", - readOnly: true, - type: { - name: "String", - }, - }, - powerState: { - serializedName: "powerState", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddresses: { - serializedName: "ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - cloud: { - serializedName: "cloud", - type: { - name: "Composite", - className: "InventoryItemDetails", - }, - }, - biosGuid: { - serializedName: "biosGuid", - readOnly: true, - type: { - name: "String", - }, - }, - managedMachineResourceId: { - serializedName: "managedMachineResourceId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualMachineTemplate", - type: { - name: "Composite", - className: "VirtualMachineTemplateInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, - modelProperties: { - ...InventoryItemProperties.type.modelProperties, - cpuCount: { - serializedName: "cpuCount", - readOnly: true, - type: { - name: "Number", - }, - }, - memoryMB: { - serializedName: "memoryMB", - readOnly: true, - type: { - name: "Number", - }, - }, - osType: { - serializedName: "osType", - readOnly: true, - type: { - name: "String", - }, - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualNetwork", - type: { - name: "Composite", - className: "VirtualNetworkInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, - modelProperties: { - ...InventoryItemProperties.type.modelProperties, - }, - }, -}; - -export const VirtualMachineInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstance", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualMachineInstanceProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const GuestAgent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgent", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "GuestAgentProperties", - }, - }, - }, - }, -}; - -export const VmInstanceHybridIdentityMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmInstanceHybridIdentityMetadata", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VmInstanceHybridIdentityMetadataProperties", - }, - }, - }, - }, -}; - -export const InventoryItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InventoryItem", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "InventoryItemProperties", - }, - }, - kind: { - serializedName: "kind", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilitySet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySet", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AvailabilitySetProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const Cloud: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Cloud", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CloudProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const VirtualMachineTemplate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineTemplate", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualMachineTemplateProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const VirtualNetwork: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetwork", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualNetworkProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const VmmServer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServer", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VmmServerProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const VirtualMachineInstancesCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesDeleteHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesCreateCheckpointHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesCreateCheckpointHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesDeleteCheckpointHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesDeleteCheckpointHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesRestartHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesRestartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesRestoreCheckpointHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineInstancesRestoreCheckpointHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineInstancesStartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstancesStartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VirtualMachineInstancesStopHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstancesStopHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const GuestAgentsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgentsCreateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AvailabilitySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "AvailabilitySetsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const AvailabilitySetsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetsUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AvailabilitySetsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilitySetsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudsUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VirtualMachineTemplatesCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineTemplatesCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineTemplatesUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineTemplatesUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualMachineTemplatesDeleteHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachineTemplatesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualNetworksCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualNetworksCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const VirtualNetworksUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworksUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VmmServersCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServersCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VmmServersUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServersUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VmmServersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmmServersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export let discriminators = { - InventoryItemProperties: InventoryItemProperties, - "InventoryItemProperties.Cloud": CloudInventoryItem, - "InventoryItemProperties.VirtualMachine": VirtualMachineInventoryItem, - "InventoryItemProperties.VirtualMachineTemplate": - VirtualMachineTemplateInventoryItem, - "InventoryItemProperties.VirtualNetwork": VirtualNetworkInventoryItem, -}; diff --git a/sdk/scvmm/arm-scvmm/src/models/models.ts b/sdk/scvmm/arm-scvmm/src/models/models.ts new file mode 100644 index 000000000000..09653e4fb115 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/models/models.ts @@ -0,0 +1,2585 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Defines the GuestAgent. */ +export interface GuestAgent extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: GuestAgentProperties; +} + +export function guestAgentSerializer(item: GuestAgent): any { + return { + properties: !item["properties"] + ? item["properties"] + : guestAgentPropertiesSerializer(item["properties"]), + }; +} + +export function guestAgentDeserializer(item: any): GuestAgent { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : guestAgentPropertiesDeserializer(item["properties"]), + }; +} + +/** Defines the resource properties. */ +export interface GuestAgentProperties { + /** Gets a unique identifier for this resource. */ + readonly uuid?: string; + /** Username / Password Credentials to provision guest agent. */ + credentials?: GuestCredential; + /** HTTP Proxy configuration for the VM. */ + httpProxyConfig?: HttpProxyConfiguration; + /** Gets or sets the guest agent provisioning action. */ + provisioningAction?: ProvisioningAction; + /** Gets the guest agent status. */ + readonly status?: string; + /** Gets the name of the corresponding resource in Kubernetes. */ + readonly customResourceName?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; +} + +export function guestAgentPropertiesSerializer(item: GuestAgentProperties): any { + return { + credentials: !item["credentials"] + ? item["credentials"] + : guestCredentialSerializer(item["credentials"]), + httpProxyConfig: !item["httpProxyConfig"] + ? item["httpProxyConfig"] + : httpProxyConfigurationSerializer(item["httpProxyConfig"]), + provisioningAction: item["provisioningAction"], + privateLinkScopeResourceId: item["privateLinkScopeResourceId"], + }; +} + +export function guestAgentPropertiesDeserializer(item: any): GuestAgentProperties { + return { + uuid: item["uuid"], + credentials: !item["credentials"] + ? item["credentials"] + : guestCredentialDeserializer(item["credentials"]), + httpProxyConfig: !item["httpProxyConfig"] + ? item["httpProxyConfig"] + : httpProxyConfigurationDeserializer(item["httpProxyConfig"]), + provisioningAction: item["provisioningAction"], + status: item["status"], + customResourceName: item["customResourceName"], + provisioningState: item["provisioningState"], + privateLinkScopeResourceId: item["privateLinkScopeResourceId"], + }; +} + +/** Username / Password Credentials to connect to guest. */ +export interface GuestCredential { + /** Gets or sets username to connect with the guest. */ + username: string; + /** Gets or sets the password to connect with the guest. */ + password: string; +} + +export function guestCredentialSerializer(item: GuestCredential): any { + return { username: item["username"], password: item["password"] }; +} + +export function guestCredentialDeserializer(item: any): GuestCredential { + return { + username: item["username"], + password: item["password"], + }; +} + +/** HTTP Proxy configuration for the VM. */ +export interface HttpProxyConfiguration { + /** Gets or sets httpsProxy url. */ + httpsProxy?: string; +} + +export function httpProxyConfigurationSerializer(item: HttpProxyConfiguration): any { + return { httpsProxy: item["httpsProxy"] }; +} + +export function httpProxyConfigurationDeserializer(item: any): HttpProxyConfiguration { + return { + httpsProxy: item["httpsProxy"], + }; +} + +/** Guest agent provisioning action. */ +export enum KnownProvisioningAction { + /** Install guest agent. */ + install = "install", + /** Uninstall guest agent. */ + uninstall = "uninstall", + /** Repair guest agent. */ + repair = "repair", +} + +/** + * Guest agent provisioning action. \ + * {@link KnownProvisioningAction} can be used interchangeably with ProvisioningAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **install**: Install guest agent. \ + * **uninstall**: Uninstall guest agent. \ + * **repair**: Repair guest agent. + */ +export type ProvisioningAction = string; + +/** The provisioning state of the resource. */ +export enum KnownProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** The resource is provisioning. */ + Provisioning = "Provisioning", + /** The resource is updating. */ + Updating = "Updating", + /** The resource is being deleted. */ + Deleting = "Deleting", + /** The resource has been accepted. */ + Accepted = "Accepted", + /** The resource was created. */ + Created = "Created", +} + +/** + * The provisioning state of the resource. \ + * {@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**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Provisioning**: The resource is provisioning. \ + * **Updating**: The resource is updating. \ + * **Deleting**: The resource is being deleted. \ + * **Accepted**: The resource has been accepted. \ + * **Created**: The resource was created. + */ +export type ProvisioningState = string; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceSerializer(item: ProxyResource): any { + return item; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** 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} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(item: Resource): any { + return item; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@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**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo { + return item; +} + +/** The response of a GuestAgent list operation. */ +export interface _GuestAgentListResult { + /** The GuestAgent items on this page */ + value: GuestAgent[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _guestAgentListResultDeserializer(item: any): _GuestAgentListResult { + return { + value: guestAgentArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function guestAgentArraySerializer(result: Array): any[] { + return result.map((item) => { + return guestAgentSerializer(item); + }); +} + +export function guestAgentArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return guestAgentDeserializer(item); + }); +} + +/** Defines the HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: VmInstanceHybridIdentityMetadataProperties; +} + +export function vmInstanceHybridIdentityMetadataDeserializer( + item: any, +): VmInstanceHybridIdentityMetadata { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : vmInstanceHybridIdentityMetadataPropertiesDeserializer(item["properties"]), + }; +} + +/** Describes the properties of Hybrid Identity Metadata for a Virtual Machine. */ +export interface VmInstanceHybridIdentityMetadataProperties { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** Gets or sets the Public Key. */ + publicKey?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function vmInstanceHybridIdentityMetadataPropertiesDeserializer( + item: any, +): VmInstanceHybridIdentityMetadataProperties { + return { + resourceUid: item["resourceUid"], + publicKey: item["publicKey"], + provisioningState: item["provisioningState"], + }; +} + +/** The response of a VmInstanceHybridIdentityMetadata list operation. */ +export interface _VmInstanceHybridIdentityMetadataListResult { + /** The VmInstanceHybridIdentityMetadata items on this page */ + value: VmInstanceHybridIdentityMetadata[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _vmInstanceHybridIdentityMetadataListResultDeserializer( + item: any, +): _VmInstanceHybridIdentityMetadataListResult { + return { + value: vmInstanceHybridIdentityMetadataArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function vmInstanceHybridIdentityMetadataArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return vmInstanceHybridIdentityMetadataDeserializer(item); + }); +} + +/** Define the virtualMachineInstance. */ +export interface VirtualMachineInstance extends ExtensionResource { + /** The resource-specific properties for this resource. */ + properties?: VirtualMachineInstanceProperties; + /** Gets or sets the extended location. */ + extendedLocation: ExtendedLocation; +} + +export function virtualMachineInstanceSerializer(item: VirtualMachineInstance): any { + return { + properties: !item["properties"] + ? item["properties"] + : virtualMachineInstancePropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function virtualMachineInstanceDeserializer(item: any): VirtualMachineInstance { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : virtualMachineInstancePropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface VirtualMachineInstanceProperties { + /** Availability Sets in vm. */ + availabilitySets?: AvailabilitySetListItem[]; + /** OS properties. */ + osProfile?: OsProfileForVmInstance; + /** Hardware properties. */ + hardwareProfile?: HardwareProfile; + /** Network properties. */ + networkProfile?: NetworkProfile; + /** Storage properties. */ + storageProfile?: StorageProfile; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfile; + /** Gets the power state of the virtual machine. */ + readonly powerState?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function virtualMachineInstancePropertiesSerializer( + item: VirtualMachineInstanceProperties, +): any { + return { + availabilitySets: !item["availabilitySets"] + ? item["availabilitySets"] + : availabilitySetListItemArraySerializer(item["availabilitySets"]), + osProfile: !item["osProfile"] + ? item["osProfile"] + : osProfileForVmInstanceSerializer(item["osProfile"]), + hardwareProfile: !item["hardwareProfile"] + ? item["hardwareProfile"] + : hardwareProfileSerializer(item["hardwareProfile"]), + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkProfileSerializer(item["networkProfile"]), + storageProfile: !item["storageProfile"] + ? item["storageProfile"] + : storageProfileSerializer(item["storageProfile"]), + infrastructureProfile: !item["infrastructureProfile"] + ? item["infrastructureProfile"] + : infrastructureProfileSerializer(item["infrastructureProfile"]), + }; +} + +export function virtualMachineInstancePropertiesDeserializer( + item: any, +): VirtualMachineInstanceProperties { + return { + availabilitySets: !item["availabilitySets"] + ? item["availabilitySets"] + : availabilitySetListItemArrayDeserializer(item["availabilitySets"]), + osProfile: !item["osProfile"] + ? item["osProfile"] + : osProfileForVmInstanceDeserializer(item["osProfile"]), + hardwareProfile: !item["hardwareProfile"] + ? item["hardwareProfile"] + : hardwareProfileDeserializer(item["hardwareProfile"]), + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkProfileDeserializer(item["networkProfile"]), + storageProfile: !item["storageProfile"] + ? item["storageProfile"] + : storageProfileDeserializer(item["storageProfile"]), + infrastructureProfile: !item["infrastructureProfile"] + ? item["infrastructureProfile"] + : infrastructureProfileDeserializer(item["infrastructureProfile"]), + powerState: item["powerState"], + provisioningState: item["provisioningState"], + }; +} + +export function availabilitySetListItemArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return availabilitySetListItemSerializer(item); + }); +} + +export function availabilitySetListItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return availabilitySetListItemDeserializer(item); + }); +} + +/** Availability Set model */ +export interface AvailabilitySetListItem { + /** Gets the ARM Id of the microsoft.scvmm/availabilitySets resource. */ + id?: string; + /** Gets or sets the name of the availability set. */ + name?: string; +} + +export function availabilitySetListItemSerializer(item: AvailabilitySetListItem): any { + return { id: item["id"], name: item["name"] }; +} + +export function availabilitySetListItemDeserializer(item: any): AvailabilitySetListItem { + return { + id: item["id"], + name: item["name"], + }; +} + +/** Defines the resource properties. */ +export interface OsProfileForVmInstance { + /** Admin password of the virtual machine. */ + adminPassword?: string; + /** Gets or sets computer name. */ + computerName?: string; + /** Gets the type of the os. */ + readonly osType?: OsType; + /** Gets os sku. */ + readonly osSku?: string; + /** Gets os version. */ + readonly osVersion?: string; + /** Gets or sets the domain name. */ + domainName?: string; + /** Gets or sets the domain username. */ + domainUsername?: string; + /** Password of the domain the VM has to join. */ + domainPassword?: string; + /** Gets or sets the workgroup. */ + workgroup?: string; + /** Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx */ + productKey?: string; + /** Gets or sets the index value of the timezone. */ + timezone?: number; + /** Get or sets the commands to be run once at the time of creation separated by semicolons. */ + runOnceCommands?: string; +} + +export function osProfileForVmInstanceSerializer(item: OsProfileForVmInstance): any { + return { + adminPassword: item["adminPassword"], + computerName: item["computerName"], + domainName: item["domainName"], + domainUsername: item["domainUsername"], + domainPassword: item["domainPassword"], + workgroup: item["workgroup"], + productKey: item["productKey"], + timezone: item["timezone"], + runOnceCommands: item["runOnceCommands"], + }; +} + +export function osProfileForVmInstanceDeserializer(item: any): OsProfileForVmInstance { + return { + adminPassword: item["adminPassword"], + computerName: item["computerName"], + osType: item["osType"], + osSku: item["osSku"], + osVersion: item["osVersion"], + domainName: item["domainName"], + domainUsername: item["domainUsername"], + domainPassword: item["domainPassword"], + workgroup: item["workgroup"], + productKey: item["productKey"], + timezone: item["timezone"], + runOnceCommands: item["runOnceCommands"], + }; +} + +/** Virtual machine operating system type. */ +export enum KnownOsType { + /** Windows operating system. */ + Windows = "Windows", + /** Linux operating system. */ + Linux = "Linux", + /** Other operating system. */ + Other = "Other", +} + +/** + * Virtual machine operating system type. \ + * {@link KnownOsType} can be used interchangeably with OsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows**: Windows operating system. \ + * **Linux**: Linux operating system. \ + * **Other**: Other operating system. + */ +export type OsType = string; + +/** Defines the resource properties. */ +export interface HardwareProfile { + /** MemoryMB is the size of a virtual machine's memory, in MB. */ + memoryMB?: number; + /** Gets or sets the number of vCPUs for the vm. */ + cpuCount?: number; + /** Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. */ + limitCpuForMigration?: LimitCpuForMigration; + /** Gets or sets a value indicating whether to enable dynamic memory or not. */ + dynamicMemoryEnabled?: DynamicMemoryEnabled; + /** Gets or sets the max dynamic memory for the vm. */ + dynamicMemoryMaxMB?: number; + /** Gets or sets the min dynamic memory for the vm. */ + dynamicMemoryMinMB?: number; + /** Gets highly available property. */ + readonly isHighlyAvailable?: IsHighlyAvailable; +} + +export function hardwareProfileSerializer(item: HardwareProfile): any { + return { + memoryMB: item["memoryMB"], + cpuCount: item["cpuCount"], + limitCpuForMigration: item["limitCpuForMigration"], + dynamicMemoryEnabled: item["dynamicMemoryEnabled"], + dynamicMemoryMaxMB: item["dynamicMemoryMaxMB"], + dynamicMemoryMinMB: item["dynamicMemoryMinMB"], + }; +} + +export function hardwareProfileDeserializer(item: any): HardwareProfile { + return { + memoryMB: item["memoryMB"], + cpuCount: item["cpuCount"], + limitCpuForMigration: item["limitCpuForMigration"], + dynamicMemoryEnabled: item["dynamicMemoryEnabled"], + dynamicMemoryMaxMB: item["dynamicMemoryMaxMB"], + dynamicMemoryMinMB: item["dynamicMemoryMinMB"], + isHighlyAvailable: item["isHighlyAvailable"], + }; +} + +/** Limit CPU for migration. */ +export enum KnownLimitCpuForMigration { + /** Enable limit CPU for migration. */ + "true" = "true", + /** Disable limit CPU for migration. */ + "false" = "false", +} + +/** + * Limit CPU for migration. \ + * {@link KnownLimitCpuForMigration} can be used interchangeably with LimitCpuForMigration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable limit CPU for migration. \ + * **false**: Disable limit CPU for migration. + */ +export type LimitCpuForMigration = string; + +/** Dynamic memory enabled. */ +export enum KnownDynamicMemoryEnabled { + /** Enable dynamic memory. */ + "true" = "true", + /** Disable dynamic memory. */ + "false" = "false", +} + +/** + * Dynamic memory enabled. \ + * {@link KnownDynamicMemoryEnabled} can be used interchangeably with DynamicMemoryEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable dynamic memory. \ + * **false**: Disable dynamic memory. + */ +export type DynamicMemoryEnabled = string; + +/** Highly available. */ +export enum KnownIsHighlyAvailable { + /** Enable highly available. */ + "true" = "true", + /** Disable highly available. */ + "false" = "false", +} + +/** + * Highly available. \ + * {@link KnownIsHighlyAvailable} can be used interchangeably with IsHighlyAvailable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable highly available. \ + * **false**: Disable highly available. + */ +export type IsHighlyAvailable = string; + +/** Defines the resource properties. */ +export interface NetworkProfile { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterface[]; +} + +export function networkProfileSerializer(item: NetworkProfile): any { + return { + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArraySerializer(item["networkInterfaces"]), + }; +} + +export function networkProfileDeserializer(item: any): NetworkProfile { + return { + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + }; +} + +export function networkInterfaceArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkInterfaceSerializer(item); + }); +} + +export function networkInterfaceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkInterfaceDeserializer(item); + }); +} + +/** Network Interface model */ +export interface NetworkInterface { + /** Gets or sets the name of the network interface. */ + name?: string; + /** Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC when the name is not set. */ + readonly displayName?: string; + /** Gets the nic ipv4 addresses. */ + readonly ipv4Addresses?: string[]; + /** Gets the nic ipv6 addresses. */ + readonly ipv6Addresses?: string[]; + /** Gets or sets the nic MAC address. */ + macAddress?: string; + /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ + virtualNetworkId?: string; + /** Gets the name of the virtual network in vmmServer that the nic is connected to. */ + readonly networkName?: string; + /** Gets or sets the ipv4 address type. */ + ipv4AddressType?: AllocationMethod; + /** Gets or sets the ipv6 address type. */ + ipv6AddressType?: AllocationMethod; + /** Gets or sets the mac address type. */ + macAddressType?: AllocationMethod; + /** Gets or sets the nic id. */ + nicId?: string; +} + +export function networkInterfaceSerializer(item: NetworkInterface): any { + return { + name: item["name"], + macAddress: item["macAddress"], + virtualNetworkId: item["virtualNetworkId"], + ipv4AddressType: item["ipv4AddressType"], + ipv6AddressType: item["ipv6AddressType"], + macAddressType: item["macAddressType"], + nicId: item["nicId"], + }; +} + +export function networkInterfaceDeserializer(item: any): NetworkInterface { + return { + name: item["name"], + displayName: item["displayName"], + ipv4Addresses: !item["ipv4Addresses"] + ? item["ipv4Addresses"] + : item["ipv4Addresses"].map((p: any) => { + return p; + }), + ipv6Addresses: !item["ipv6Addresses"] + ? item["ipv6Addresses"] + : item["ipv6Addresses"].map((p: any) => { + return p; + }), + macAddress: item["macAddress"], + virtualNetworkId: item["virtualNetworkId"], + networkName: item["networkName"], + ipv4AddressType: item["ipv4AddressType"], + ipv6AddressType: item["ipv6AddressType"], + macAddressType: item["macAddressType"], + nicId: item["nicId"], + }; +} + +/** Network address allocation method. */ +export enum KnownAllocationMethod { + /** Dynamically allocated address. */ + Dynamic = "Dynamic", + /** Statically allocated address. */ + Static = "Static", +} + +/** + * Network address allocation method. \ + * {@link KnownAllocationMethod} can be used interchangeably with AllocationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dynamic**: Dynamically allocated address. \ + * **Static**: Statically allocated address. + */ +export type AllocationMethod = string; + +/** Defines the resource properties. */ +export interface StorageProfile { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDisk[]; +} + +export function storageProfileSerializer(item: StorageProfile): any { + return { + disks: !item["disks"] ? item["disks"] : virtualDiskArraySerializer(item["disks"]), + }; +} + +export function storageProfileDeserializer(item: any): StorageProfile { + return { + disks: !item["disks"] ? item["disks"] : virtualDiskArrayDeserializer(item["disks"]), + }; +} + +export function virtualDiskArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualDiskSerializer(item); + }); +} + +export function virtualDiskArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualDiskDeserializer(item); + }); +} + +/** Virtual disk model */ +export interface VirtualDisk { + /** Gets or sets the name of the disk. */ + name?: string; + /** Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when the name is not set. */ + readonly displayName?: string; + /** Gets or sets the disk id. */ + diskId?: string; + /** Gets or sets the disk total size. */ + diskSizeGB?: number; + /** Gets the max disk size. */ + readonly maxDiskSizeGB?: number; + /** Gets or sets the disk bus. */ + bus?: number; + /** Gets or sets the disk lun. */ + lun?: number; + /** Gets or sets the disk bus type. */ + busType?: string; + /** Gets or sets the disk vhd type. */ + vhdType?: string; + /** Gets the disk volume type. */ + readonly volumeType?: string; + /** Gets the disk vhd format type. */ + readonly vhdFormatType?: string; + /** Gets or sets the disk id in the template. */ + templateDiskId?: string; + /** The QoS policy for the disk. */ + storageQosPolicy?: StorageQosPolicyDetails; + /** Gets or sets a value indicating diff disk. */ + createDiffDisk?: CreateDiffDisk; +} + +export function virtualDiskSerializer(item: VirtualDisk): any { + return { + name: item["name"], + diskId: item["diskId"], + diskSizeGB: item["diskSizeGB"], + bus: item["bus"], + lun: item["lun"], + busType: item["busType"], + vhdType: item["vhdType"], + templateDiskId: item["templateDiskId"], + storageQoSPolicy: !item["storageQosPolicy"] + ? item["storageQosPolicy"] + : storageQosPolicyDetailsSerializer(item["storageQosPolicy"]), + createDiffDisk: item["createDiffDisk"], + }; +} + +export function virtualDiskDeserializer(item: any): VirtualDisk { + return { + name: item["name"], + displayName: item["displayName"], + diskId: item["diskId"], + diskSizeGB: item["diskSizeGB"], + maxDiskSizeGB: item["maxDiskSizeGB"], + bus: item["bus"], + lun: item["lun"], + busType: item["busType"], + vhdType: item["vhdType"], + volumeType: item["volumeType"], + vhdFormatType: item["vhdFormatType"], + templateDiskId: item["templateDiskId"], + storageQosPolicy: !item["storageQoSPolicy"] + ? item["storageQoSPolicy"] + : storageQosPolicyDetailsDeserializer(item["storageQoSPolicy"]), + createDiffDisk: item["createDiffDisk"], + }; +} + +/** The StorageQoSPolicyDetails definition. */ +export interface StorageQosPolicyDetails { + /** The name of the policy. */ + name?: string; + /** The ID of the QoS policy. */ + id?: string; +} + +export function storageQosPolicyDetailsSerializer(item: StorageQosPolicyDetails): any { + return { name: item["name"], id: item["id"] }; +} + +export function storageQosPolicyDetailsDeserializer(item: any): StorageQosPolicyDetails { + return { + name: item["name"], + id: item["id"], + }; +} + +/** Create diff disk. */ +export enum KnownCreateDiffDisk { + /** Enable create diff disk. */ + "true" = "true", + /** Disable create diff disk. */ + "false" = "false", +} + +/** + * Create diff disk. \ + * {@link KnownCreateDiffDisk} can be used interchangeably with CreateDiffDisk, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable create diff disk. \ + * **false**: Disable create diff disk. + */ +export type CreateDiffDisk = string; + +/** Specifies the vmmServer infrastructure specific settings for the virtual machine instance. */ +export interface InfrastructureProfile { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** ARM Id of the cloud resource to use for deploying the vm. */ + cloudId?: string; + /** ARM Id of the template resource to use for deploying the vm. */ + templateId?: string; + /** VMName is the name of VM on the SCVmm server. */ + vmName?: string; + /** Unique ID of the virtual machine. */ + uuid?: string; + /** Last restored checkpoint in the vm. */ + readonly lastRestoredVmCheckpoint?: Checkpoint; + /** Checkpoints in the vm. */ + readonly checkpoints?: Checkpoint[]; + /** Type of checkpoint supported for the vm. */ + checkpointType?: string; + /** Gets or sets the generation for the vm. */ + generation?: number; + /** Gets or sets the bios guid for the vm. */ + biosGuid?: string; +} + +export function infrastructureProfileSerializer(item: InfrastructureProfile): any { + return { + inventoryItemId: item["inventoryItemId"], + vmmServerId: item["vmmServerId"], + cloudId: item["cloudId"], + templateId: item["templateId"], + vmName: item["vmName"], + uuid: item["uuid"], + checkpointType: item["checkpointType"], + generation: item["generation"], + biosGuid: item["biosGuid"], + }; +} + +export function infrastructureProfileDeserializer(item: any): InfrastructureProfile { + return { + inventoryItemId: item["inventoryItemId"], + vmmServerId: item["vmmServerId"], + cloudId: item["cloudId"], + templateId: item["templateId"], + vmName: item["vmName"], + uuid: item["uuid"], + lastRestoredVmCheckpoint: !item["lastRestoredVMCheckpoint"] + ? item["lastRestoredVMCheckpoint"] + : checkpointDeserializer(item["lastRestoredVMCheckpoint"]), + checkpoints: !item["checkpoints"] + ? item["checkpoints"] + : checkpointArrayDeserializer(item["checkpoints"]), + checkpointType: item["checkpointType"], + generation: item["generation"], + biosGuid: item["biosGuid"], + }; +} + +/** Defines the resource properties. */ +export interface Checkpoint { + /** Gets ID of parent of the checkpoint. */ + parentCheckpointId?: string; + /** Gets ID of the checkpoint. */ + checkpointId?: string; + /** Gets name of the checkpoint. */ + name?: string; + /** Gets description of the checkpoint. */ + description?: string; +} + +export function checkpointDeserializer(item: any): Checkpoint { + return { + parentCheckpointId: item["parentCheckpointID"], + checkpointId: item["checkpointID"], + name: item["name"], + description: item["description"], + }; +} + +export function checkpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return checkpointDeserializer(item); + }); +} + +/** The extended location. */ +export interface ExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +export function extendedLocationSerializer(item: ExtendedLocation): any { + return { type: item["type"], name: item["name"] }; +} + +export function extendedLocationDeserializer(item: any): ExtendedLocation { + return { + type: item["type"], + name: item["name"], + }; +} + +/** The base extension resource. */ +export interface ExtensionResource extends Resource {} + +export function extensionResourceSerializer(item: ExtensionResource): any { + return item; +} + +export function extensionResourceDeserializer(item: any): ExtensionResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** The type used for update operations of the VirtualMachineInstance. */ +export interface VirtualMachineInstanceUpdate { + /** The update properties of the VirtualMachineInstance. */ + properties?: VirtualMachineInstanceUpdateProperties; +} + +export function virtualMachineInstanceUpdateSerializer(item: VirtualMachineInstanceUpdate): any { + return { + properties: !item["properties"] + ? item["properties"] + : virtualMachineInstanceUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** Virtual Machine Instance Properties Update model */ +export interface VirtualMachineInstanceUpdateProperties { + /** Availability Sets in vm. */ + availabilitySets?: AvailabilitySetListItem[]; + /** Hardware properties. */ + hardwareProfile?: HardwareProfileUpdate; + /** Network properties. */ + networkProfile?: NetworkProfileUpdate; + /** Storage properties. */ + storageProfile?: StorageProfileUpdate; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfileUpdate; +} + +export function virtualMachineInstanceUpdatePropertiesSerializer( + item: VirtualMachineInstanceUpdateProperties, +): any { + return { + availabilitySets: !item["availabilitySets"] + ? item["availabilitySets"] + : availabilitySetListItemArraySerializer(item["availabilitySets"]), + hardwareProfile: !item["hardwareProfile"] + ? item["hardwareProfile"] + : hardwareProfileUpdateSerializer(item["hardwareProfile"]), + networkProfile: !item["networkProfile"] + ? item["networkProfile"] + : networkProfileUpdateSerializer(item["networkProfile"]), + storageProfile: !item["storageProfile"] + ? item["storageProfile"] + : storageProfileUpdateSerializer(item["storageProfile"]), + infrastructureProfile: !item["infrastructureProfile"] + ? item["infrastructureProfile"] + : infrastructureProfileUpdateSerializer(item["infrastructureProfile"]), + }; +} + +/** Defines the resource update properties. */ +export interface HardwareProfileUpdate { + /** MemoryMB is the size of a virtual machine's memory, in MB. */ + memoryMB?: number; + /** Gets or sets the number of vCPUs for the vm. */ + cpuCount?: number; + /** Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. */ + limitCpuForMigration?: LimitCpuForMigration; + /** Gets or sets a value indicating whether to enable dynamic memory or not. */ + dynamicMemoryEnabled?: DynamicMemoryEnabled; + /** Gets or sets the max dynamic memory for the vm. */ + dynamicMemoryMaxMB?: number; + /** Gets or sets the min dynamic memory for the vm. */ + dynamicMemoryMinMB?: number; +} + +export function hardwareProfileUpdateSerializer(item: HardwareProfileUpdate): any { + return { + memoryMB: item["memoryMB"], + cpuCount: item["cpuCount"], + limitCpuForMigration: item["limitCpuForMigration"], + dynamicMemoryEnabled: item["dynamicMemoryEnabled"], + dynamicMemoryMaxMB: item["dynamicMemoryMaxMB"], + dynamicMemoryMinMB: item["dynamicMemoryMinMB"], + }; +} + +/** Defines the resource update properties. */ +export interface NetworkProfileUpdate { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterfaceUpdate[]; +} + +export function networkProfileUpdateSerializer(item: NetworkProfileUpdate): any { + return { + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceUpdateArraySerializer(item["networkInterfaces"]), + }; +} + +export function networkInterfaceUpdateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return networkInterfaceUpdateSerializer(item); + }); +} + +/** Network Interface Update model */ +export interface NetworkInterfaceUpdate { + /** Gets or sets the name of the network interface. */ + name?: string; + /** Gets or sets the nic MAC address. */ + macAddress?: string; + /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ + virtualNetworkId?: string; + /** Gets or sets the ipv4 address type. */ + ipv4AddressType?: AllocationMethod; + /** Gets or sets the ipv6 address type. */ + ipv6AddressType?: AllocationMethod; + /** Gets or sets the mac address type. */ + macAddressType?: AllocationMethod; + /** Gets or sets the nic id. */ + nicId?: string; +} + +export function networkInterfaceUpdateSerializer(item: NetworkInterfaceUpdate): any { + return { + name: item["name"], + macAddress: item["macAddress"], + virtualNetworkId: item["virtualNetworkId"], + ipv4AddressType: item["ipv4AddressType"], + ipv6AddressType: item["ipv6AddressType"], + macAddressType: item["macAddressType"], + nicId: item["nicId"], + }; +} + +/** Defines the resource update properties. */ +export interface StorageProfileUpdate { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDiskUpdate[]; +} + +export function storageProfileUpdateSerializer(item: StorageProfileUpdate): any { + return { + disks: !item["disks"] ? item["disks"] : virtualDiskUpdateArraySerializer(item["disks"]), + }; +} + +export function virtualDiskUpdateArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualDiskUpdateSerializer(item); + }); +} + +/** Virtual Disk Update model */ +export interface VirtualDiskUpdate { + /** Gets or sets the name of the disk. */ + name?: string; + /** Gets or sets the disk id. */ + diskId?: string; + /** Gets or sets the disk total size. */ + diskSizeGB?: number; + /** Gets or sets the disk bus. */ + bus?: number; + /** Gets or sets the disk lun. */ + lun?: number; + /** Gets or sets the disk bus type. */ + busType?: string; + /** Gets or sets the disk vhd type. */ + vhdType?: string; + /** The QoS policy for the disk. */ + storageQosPolicy?: StorageQosPolicyDetails; +} + +export function virtualDiskUpdateSerializer(item: VirtualDiskUpdate): any { + return { + name: item["name"], + diskId: item["diskId"], + diskSizeGB: item["diskSizeGB"], + bus: item["bus"], + lun: item["lun"], + busType: item["busType"], + vhdType: item["vhdType"], + storageQoSPolicy: !item["storageQosPolicy"] + ? item["storageQosPolicy"] + : storageQosPolicyDetailsSerializer(item["storageQosPolicy"]), + }; +} + +/** Specifies the vmmServer infrastructure specific update settings for the virtual machine instance. */ +export interface InfrastructureProfileUpdate { + /** Type of checkpoint supported for the vm. */ + checkpointType?: string; +} + +export function infrastructureProfileUpdateSerializer(item: InfrastructureProfileUpdate): any { + return { checkpointType: item["checkpointType"] }; +} + +/** The response of a VirtualMachineInstance list operation. */ +export interface _VirtualMachineInstanceListResult { + /** The VirtualMachineInstance items on this page */ + value: VirtualMachineInstance[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _virtualMachineInstanceListResultDeserializer( + item: any, +): _VirtualMachineInstanceListResult { + return { + value: virtualMachineInstanceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualMachineInstanceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachineInstanceSerializer(item); + }); +} + +export function virtualMachineInstanceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachineInstanceDeserializer(item); + }); +} + +/** 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?: SkipShutdown; +} + +export function stopVirtualMachineOptionsSerializer(item: StopVirtualMachineOptions): any { + return { skipShutdown: item["skipShutdown"] }; +} + +/** Skip shutdown. */ +export enum KnownSkipShutdown { + /** Enable skip shutdown. */ + "true" = "true", + /** Disable skip shutdown. */ + "false" = "false", +} + +/** + * Skip shutdown. \ + * {@link KnownSkipShutdown} can be used interchangeably with SkipShutdown, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable skip shutdown. \ + * **false**: Disable skip shutdown. + */ +export type SkipShutdown = string; + +/** Defines the create checkpoint action properties. */ +export interface VirtualMachineCreateCheckpoint { + /** Name of the checkpoint. */ + name?: string; + /** Description of the checkpoint. */ + description?: string; +} + +export function virtualMachineCreateCheckpointSerializer( + item: VirtualMachineCreateCheckpoint, +): any { + return { name: item["name"], description: item["description"] }; +} + +/** Defines the delete checkpoint action properties. */ +export interface VirtualMachineDeleteCheckpoint { + /** ID of the checkpoint to be deleted. */ + id?: string; +} + +export function virtualMachineDeleteCheckpointSerializer( + item: VirtualMachineDeleteCheckpoint, +): any { + return { id: item["id"] }; +} + +/** Defines the restore checkpoint action properties. */ +export interface VirtualMachineRestoreCheckpoint { + /** ID of the checkpoint to be restored to. */ + id?: string; +} + +export function virtualMachineRestoreCheckpointSerializer( + item: VirtualMachineRestoreCheckpoint, +): any { + return { id: item["id"] }; +} + +/** Defines the inventory item. */ +export interface InventoryItem extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: InventoryItemPropertiesUnion; + /** 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; +} + +export function inventoryItemSerializer(item: InventoryItem): any { + return { + properties: !item["properties"] + ? item["properties"] + : inventoryItemPropertiesUnionSerializer(item["properties"]), + kind: item["kind"], + }; +} + +export function inventoryItemDeserializer(item: any): InventoryItem { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : inventoryItemPropertiesUnionDeserializer(item["properties"]), + kind: item["kind"], + }; +} + +/** Defines the resource properties. */ +export interface InventoryItemProperties { + /** They inventory type. */ + /** The discriminator possible values: Cloud, VirtualNetwork, VirtualMachineTemplate, VirtualMachine */ + inventoryType: InventoryType; + /** Gets the tracked resource id corresponding to the inventory resource. */ + readonly managedResourceId?: string; + /** Gets the UUID (which is assigned by Vmm) for the inventory item. */ + readonly uuid?: string; + /** Gets the Managed Object name in Vmm for the inventory item. */ + readonly inventoryItemName?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function inventoryItemPropertiesSerializer(item: InventoryItemProperties): any { + return { inventoryType: item["inventoryType"] }; +} + +export function inventoryItemPropertiesDeserializer(item: any): InventoryItemProperties { + return { + inventoryType: item["inventoryType"], + managedResourceId: item["managedResourceId"], + uuid: item["uuid"], + inventoryItemName: item["inventoryItemName"], + provisioningState: item["provisioningState"], + }; +} + +/** Alias for InventoryItemPropertiesUnion */ +export type InventoryItemPropertiesUnion = + | CloudInventoryItem + | VirtualNetworkInventoryItem + | VirtualMachineTemplateInventoryItem + | VirtualMachineInventoryItem + | InventoryItemProperties; + +export function inventoryItemPropertiesUnionSerializer(item: InventoryItemPropertiesUnion): any { + switch (item.inventoryType) { + case "Cloud": + return cloudInventoryItemSerializer(item as CloudInventoryItem); + + case "VirtualNetwork": + return virtualNetworkInventoryItemSerializer(item as VirtualNetworkInventoryItem); + + case "VirtualMachineTemplate": + return virtualMachineTemplateInventoryItemSerializer( + item as VirtualMachineTemplateInventoryItem, + ); + + case "VirtualMachine": + return virtualMachineInventoryItemSerializer(item as VirtualMachineInventoryItem); + + default: + return inventoryItemPropertiesSerializer(item); + } +} + +export function inventoryItemPropertiesUnionDeserializer(item: any): InventoryItemPropertiesUnion { + switch (item.inventoryType) { + case "Cloud": + return cloudInventoryItemDeserializer(item as CloudInventoryItem); + + case "VirtualNetwork": + return virtualNetworkInventoryItemDeserializer(item as VirtualNetworkInventoryItem); + + case "VirtualMachineTemplate": + return virtualMachineTemplateInventoryItemDeserializer( + item as VirtualMachineTemplateInventoryItem, + ); + + case "VirtualMachine": + return virtualMachineInventoryItemDeserializer(item as VirtualMachineInventoryItem); + + default: + return inventoryItemPropertiesDeserializer(item); + } +} + +/** The inventory type */ +export enum KnownInventoryType { + /** Cloud inventory type */ + Cloud = "Cloud", + /** VirtualNetwork inventory type */ + VirtualNetwork = "VirtualNetwork", + /** VirtualMachine inventory type */ + VirtualMachine = "VirtualMachine", + /** VirtualMachineTemplate inventory type */ + VirtualMachineTemplate = "VirtualMachineTemplate", +} + +/** + * The inventory type \ + * {@link KnownInventoryType} can be used interchangeably with InventoryType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cloud**: Cloud inventory type \ + * **VirtualNetwork**: VirtualNetwork inventory type \ + * **VirtualMachine**: VirtualMachine inventory type \ + * **VirtualMachineTemplate**: VirtualMachineTemplate inventory type + */ +export type InventoryType = string; + +/** The Cloud inventory item. */ +export interface CloudInventoryItem extends InventoryItemProperties { + /** They inventory type. */ + inventoryType: "Cloud"; +} + +export function cloudInventoryItemSerializer(item: CloudInventoryItem): any { + return { inventoryType: item["inventoryType"] }; +} + +export function cloudInventoryItemDeserializer(item: any): CloudInventoryItem { + return { + inventoryType: item["inventoryType"], + managedResourceId: item["managedResourceId"], + uuid: item["uuid"], + inventoryItemName: item["inventoryItemName"], + provisioningState: item["provisioningState"], + }; +} + +/** The Virtual network inventory item. */ +export interface VirtualNetworkInventoryItem extends InventoryItemProperties { + /** They inventory type. */ + inventoryType: "VirtualNetwork"; +} + +export function virtualNetworkInventoryItemSerializer(item: VirtualNetworkInventoryItem): any { + return { inventoryType: item["inventoryType"] }; +} + +export function virtualNetworkInventoryItemDeserializer(item: any): VirtualNetworkInventoryItem { + return { + inventoryType: item["inventoryType"], + managedResourceId: item["managedResourceId"], + uuid: item["uuid"], + inventoryItemName: item["inventoryItemName"], + provisioningState: item["provisioningState"], + }; +} + +/** The Virtual machine template inventory item. */ +export interface VirtualMachineTemplateInventoryItem extends InventoryItemProperties { + /** Gets the desired number of vCPUs for the vm. */ + readonly cpuCount?: number; + /** MemoryMB is the desired size of a virtual machine's memory, in MB. */ + readonly memoryMB?: number; + /** Gets the type of the os. */ + readonly osType?: OsType; + /** Gets os name. */ + readonly osName?: string; + /** They inventory type. */ + inventoryType: "VirtualMachineTemplate"; +} + +export function virtualMachineTemplateInventoryItemSerializer( + item: VirtualMachineTemplateInventoryItem, +): any { + return { inventoryType: item["inventoryType"] }; +} + +export function virtualMachineTemplateInventoryItemDeserializer( + item: any, +): VirtualMachineTemplateInventoryItem { + return { + inventoryType: item["inventoryType"], + managedResourceId: item["managedResourceId"], + uuid: item["uuid"], + inventoryItemName: item["inventoryItemName"], + provisioningState: item["provisioningState"], + cpuCount: item["cpuCount"], + memoryMB: item["memoryMB"], + osType: item["osType"], + osName: item["osName"], + }; +} + +/** The Virtual machine inventory item. */ +export interface VirtualMachineInventoryItem extends InventoryItemProperties { + /** Gets the type of the os. */ + readonly osType?: OsType; + /** Gets os name. */ + readonly osName?: string; + /** Gets os version. */ + readonly osVersion?: string; + /** Gets the power state of the virtual machine. */ + readonly powerState?: string; + /** Gets or sets the nic ip addresses. */ + ipAddresses?: string[]; + /** Cloud inventory resource details where the VM is present. */ + cloud?: InventoryItemDetails; + /** Gets the bios guid. */ + readonly biosGuid?: string; + /** Gets the tracked resource id corresponding to the inventory resource. */ + readonly managedMachineResourceId?: string; + /** They inventory type. */ + inventoryType: "VirtualMachine"; +} + +export function virtualMachineInventoryItemSerializer(item: VirtualMachineInventoryItem): any { + return { + inventoryType: item["inventoryType"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + cloud: !item["cloud"] ? item["cloud"] : inventoryItemDetailsSerializer(item["cloud"]), + }; +} + +export function virtualMachineInventoryItemDeserializer(item: any): VirtualMachineInventoryItem { + return { + inventoryType: item["inventoryType"], + managedResourceId: item["managedResourceId"], + uuid: item["uuid"], + inventoryItemName: item["inventoryItemName"], + provisioningState: item["provisioningState"], + osType: item["osType"], + osName: item["osName"], + osVersion: item["osVersion"], + powerState: item["powerState"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + cloud: !item["cloud"] ? item["cloud"] : inventoryItemDetailsDeserializer(item["cloud"]), + biosGuid: item["biosGuid"], + managedMachineResourceId: item["managedMachineResourceId"], + }; +} + +/** Defines the resource properties. */ +export interface InventoryItemDetails { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Gets or sets the Managed Object name in Vmm for the resource. */ + inventoryItemName?: string; +} + +export function inventoryItemDetailsSerializer(item: InventoryItemDetails): any { + return { + inventoryItemId: item["inventoryItemId"], + inventoryItemName: item["inventoryItemName"], + }; +} + +export function inventoryItemDetailsDeserializer(item: any): InventoryItemDetails { + return { + inventoryItemId: item["inventoryItemId"], + inventoryItemName: item["inventoryItemName"], + }; +} + +/** The response of a InventoryItem list operation. */ +export interface _InventoryItemListResult { + /** The InventoryItem items on this page */ + value: InventoryItem[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _inventoryItemListResultDeserializer(item: any): _InventoryItemListResult { + return { + value: inventoryItemArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function inventoryItemArraySerializer(result: Array): any[] { + return result.map((item) => { + return inventoryItemSerializer(item); + }); +} + +export function inventoryItemArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return inventoryItemDeserializer(item); + }); +} + +/** The AvailabilitySets resource definition. */ +export interface AvailabilitySet extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: AvailabilitySetProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function availabilitySetSerializer(item: AvailabilitySet): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : availabilitySetPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function availabilitySetDeserializer(item: any): AvailabilitySet { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : availabilitySetPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface AvailabilitySetProperties { + /** Name of the availability set. */ + availabilitySetName?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function availabilitySetPropertiesSerializer(item: AvailabilitySetProperties): any { + return { + availabilitySetName: item["availabilitySetName"], + vmmServerId: item["vmmServerId"], + }; +} + +export function availabilitySetPropertiesDeserializer(item: any): AvailabilitySetProperties { + return { + availabilitySetName: item["availabilitySetName"], + vmmServerId: item["vmmServerId"], + provisioningState: item["provisioningState"], + }; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The type used for updating tags in AvailabilitySet resources. */ +export interface AvailabilitySetTagsUpdate { + /** Resource tags. */ + tags?: Record; +} + +export function availabilitySetTagsUpdateSerializer(item: AvailabilitySetTagsUpdate): any { + return { tags: item["tags"] }; +} + +/** The response of a AvailabilitySet list operation. */ +export interface _AvailabilitySetListResult { + /** The AvailabilitySet items on this page */ + value: AvailabilitySet[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _availabilitySetListResultDeserializer(item: any): _AvailabilitySetListResult { + return { + value: availabilitySetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function availabilitySetArraySerializer(result: Array): any[] { + return result.map((item) => { + return availabilitySetSerializer(item); + }); +} + +export function availabilitySetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return availabilitySetDeserializer(item); + }); +} + +/** The VirtualMachineTemplates resource definition. */ +export interface VirtualMachineTemplate extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: VirtualMachineTemplateProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function virtualMachineTemplateSerializer(item: VirtualMachineTemplate): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : virtualMachineTemplatePropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function virtualMachineTemplateDeserializer(item: any): VirtualMachineTemplate { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : virtualMachineTemplatePropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface VirtualMachineTemplateProperties { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the virtual machine template. */ + uuid?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** Gets the type of the os. */ + readonly osType?: OsType; + /** Gets os name. */ + readonly osName?: string; + /** Gets computer name. */ + readonly computerName?: string; + /** MemoryMB is the desired size of a virtual machine's memory, in MB. */ + readonly memoryMB?: number; + /** Gets the desired number of vCPUs for the vm. */ + readonly cpuCount?: number; + /** Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. */ + readonly limitCpuForMigration?: LimitCpuForMigration; + /** Gets a value indicating whether to enable dynamic memory or not. */ + readonly dynamicMemoryEnabled?: DynamicMemoryEnabled; + /** Gets a value indicating whether the vm template is customizable or not. */ + readonly isCustomizable?: IsCustomizable; + /** Gets the max dynamic memory for the vm. */ + readonly dynamicMemoryMaxMB?: number; + /** Gets the min dynamic memory for the vm. */ + readonly dynamicMemoryMinMB?: number; + /** Gets highly available property. */ + readonly isHighlyAvailable?: IsHighlyAvailable; + /** Gets the generation for the vm. */ + readonly generation?: number; + /** Gets the network interfaces of the template. */ + readonly networkInterfaces?: NetworkInterface[]; + /** Gets the disks of the template. */ + readonly disks?: VirtualDisk[]; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function virtualMachineTemplatePropertiesSerializer( + item: VirtualMachineTemplateProperties, +): any { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + }; +} + +export function virtualMachineTemplatePropertiesDeserializer( + item: any, +): VirtualMachineTemplateProperties { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + osType: item["osType"], + osName: item["osName"], + computerName: item["computerName"], + memoryMB: item["memoryMB"], + cpuCount: item["cpuCount"], + limitCpuForMigration: item["limitCpuForMigration"], + dynamicMemoryEnabled: item["dynamicMemoryEnabled"], + isCustomizable: item["isCustomizable"], + dynamicMemoryMaxMB: item["dynamicMemoryMaxMB"], + dynamicMemoryMinMB: item["dynamicMemoryMinMB"], + isHighlyAvailable: item["isHighlyAvailable"], + generation: item["generation"], + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + disks: !item["disks"] ? item["disks"] : virtualDiskArrayDeserializer(item["disks"]), + provisioningState: item["provisioningState"], + }; +} + +/** Customizable. */ +export enum KnownIsCustomizable { + /** Enable customizable. */ + "true" = "true", + /** Disable customizable. */ + "false" = "false", +} + +/** + * Customizable. \ + * {@link KnownIsCustomizable} can be used interchangeably with IsCustomizable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable customizable. \ + * **false**: Disable customizable. + */ +export type IsCustomizable = string; + +/** The type used for updating tags in VirtualMachineTemplate resources. */ +export interface VirtualMachineTemplateTagsUpdate { + /** Resource tags. */ + tags?: Record; +} + +export function virtualMachineTemplateTagsUpdateSerializer( + item: VirtualMachineTemplateTagsUpdate, +): any { + return { tags: item["tags"] }; +} + +/** The response of a VirtualMachineTemplate list operation. */ +export interface _VirtualMachineTemplateListResult { + /** The VirtualMachineTemplate items on this page */ + value: VirtualMachineTemplate[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _virtualMachineTemplateListResultDeserializer( + item: any, +): _VirtualMachineTemplateListResult { + return { + value: virtualMachineTemplateArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualMachineTemplateArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachineTemplateSerializer(item); + }); +} + +export function virtualMachineTemplateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachineTemplateDeserializer(item); + }); +} + +/** The VirtualNetworks resource definition. */ +export interface VirtualNetwork extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: VirtualNetworkProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function virtualNetworkSerializer(item: VirtualNetwork): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : virtualNetworkPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function virtualNetworkDeserializer(item: any): VirtualNetwork { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : virtualNetworkPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface VirtualNetworkProperties { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the virtual network. */ + uuid?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** Name of the virtual network in vmmServer. */ + readonly networkName?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function virtualNetworkPropertiesSerializer(item: VirtualNetworkProperties): any { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + }; +} + +export function virtualNetworkPropertiesDeserializer(item: any): VirtualNetworkProperties { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + networkName: item["networkName"], + provisioningState: item["provisioningState"], + }; +} + +/** The type used for updating tags in VirtualNetwork resources. */ +export interface VirtualNetworkTagsUpdate { + /** Resource tags. */ + tags?: Record; +} + +export function virtualNetworkTagsUpdateSerializer(item: VirtualNetworkTagsUpdate): any { + return { tags: item["tags"] }; +} + +/** The response of a VirtualNetwork list operation. */ +export interface _VirtualNetworkListResult { + /** The VirtualNetwork items on this page */ + value: VirtualNetwork[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _virtualNetworkListResultDeserializer(item: any): _VirtualNetworkListResult { + return { + value: virtualNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualNetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkSerializer(item); + }); +} + +export function virtualNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualNetworkDeserializer(item); + }); +} + +/** The Clouds resource definition. */ +export interface Cloud extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: CloudProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function cloudSerializer(item: Cloud): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : cloudPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function cloudDeserializer(item: any): Cloud { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : cloudPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface CloudProperties { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the cloud. */ + uuid?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** Name of the cloud in VmmServer. */ + readonly cloudName?: string; + /** Capacity of the cloud. */ + readonly cloudCapacity?: CloudCapacity; + /** List of QoS policies available for the cloud. */ + readonly storageQosPolicies?: StorageQosPolicy[]; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function cloudPropertiesSerializer(item: CloudProperties): any { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + }; +} + +export function cloudPropertiesDeserializer(item: any): CloudProperties { + return { + inventoryItemId: item["inventoryItemId"], + uuid: item["uuid"], + vmmServerId: item["vmmServerId"], + cloudName: item["cloudName"], + cloudCapacity: !item["cloudCapacity"] + ? item["cloudCapacity"] + : cloudCapacityDeserializer(item["cloudCapacity"]), + storageQosPolicies: !item["storageQoSPolicies"] + ? item["storageQoSPolicies"] + : storageQosPolicyArrayDeserializer(item["storageQoSPolicies"]), + provisioningState: item["provisioningState"], + }; +} + +/** Cloud Capacity model */ +export interface CloudCapacity { + /** CPUCount specifies the maximum number of CPUs that can be allocated in the cloud. */ + readonly cpuCount?: number; + /** MemoryMB specifies a memory usage limit in megabytes. */ + readonly memoryMB?: number; + /** VMCount gives the max number of VMs that can be deployed in the cloud. */ + readonly vmCount?: number; +} + +export function cloudCapacityDeserializer(item: any): CloudCapacity { + return { + cpuCount: item["cpuCount"], + memoryMB: item["memoryMB"], + vmCount: item["vmCount"], + }; +} + +export function storageQosPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return storageQosPolicyDeserializer(item); + }); +} + +/** The StorageQoSPolicy definition. */ +export interface StorageQosPolicy { + /** The name of the policy. */ + name?: string; + /** The ID of the QoS policy. */ + id?: string; + /** The maximum IO operations per second. */ + iopsMaximum?: number; + /** The minimum IO operations per second. */ + iopsMinimum?: number; + /** The Bandwidth Limit for internet traffic. */ + bandwidthLimit?: number; + /** The underlying policy. */ + policyId?: string; +} + +export function storageQosPolicyDeserializer(item: any): StorageQosPolicy { + return { + name: item["name"], + id: item["id"], + iopsMaximum: item["iopsMaximum"], + iopsMinimum: item["iopsMinimum"], + bandwidthLimit: item["bandwidthLimit"], + policyId: item["policyId"], + }; +} + +/** The type used for updating tags in Cloud resources. */ +export interface CloudTagsUpdate { + /** Resource tags. */ + tags?: Record; +} + +export function cloudTagsUpdateSerializer(item: CloudTagsUpdate): any { + return { tags: item["tags"] }; +} + +/** The response of a Cloud list operation. */ +export interface _CloudListResult { + /** The Cloud items on this page */ + value: Cloud[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _cloudListResultDeserializer(item: any): _CloudListResult { + return { + value: cloudArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function cloudArraySerializer(result: Array): any[] { + return result.map((item) => { + return cloudSerializer(item); + }); +} + +export function cloudArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return cloudDeserializer(item); + }); +} + +/** The VmmServers resource definition. */ +export interface VmmServer extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: VmmServerProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function vmmServerSerializer(item: VmmServer): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : vmmServerPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function vmmServerDeserializer(item: any): VmmServer { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : vmmServerPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the resource properties. */ +export interface VmmServerProperties { + /** Credentials to connect to VmmServer. */ + credentials?: VmmCredential; + /** Fqdn is the hostname/ip of the vmmServer. */ + fqdn: string; + /** Port is the port on which the vmmServer is listening. */ + port?: number; + /** Gets the connection status to the vmmServer. */ + readonly connectionStatus?: string; + /** Gets any error message if connection to vmmServer is having any issue. */ + readonly errorMessage?: string; + /** Unique ID of vmmServer. */ + readonly uuid?: string; + /** Version is the version of the vmmSever. */ + readonly version?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function vmmServerPropertiesSerializer(item: VmmServerProperties): any { + return { + credentials: !item["credentials"] + ? item["credentials"] + : vmmCredentialSerializer(item["credentials"]), + fqdn: item["fqdn"], + port: item["port"], + }; +} + +export function vmmServerPropertiesDeserializer(item: any): VmmServerProperties { + return { + credentials: !item["credentials"] + ? item["credentials"] + : vmmCredentialDeserializer(item["credentials"]), + fqdn: item["fqdn"], + port: item["port"], + connectionStatus: item["connectionStatus"], + errorMessage: item["errorMessage"], + uuid: item["uuid"], + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +/** Credentials to connect to VmmServer. */ +export interface VmmCredential { + /** Username to use to connect to VmmServer. */ + username?: string; + /** Password to use to connect to VmmServer. */ + password?: string; +} + +export function vmmCredentialSerializer(item: VmmCredential): any { + return { username: item["username"], password: item["password"] }; +} + +export function vmmCredentialDeserializer(item: any): VmmCredential { + return { + username: item["username"], + password: item["password"], + }; +} + +/** The type used for updating tags in VmmServer resources. */ +export interface VmmServerTagsUpdate { + /** Resource tags. */ + tags?: Record; +} + +export function vmmServerTagsUpdateSerializer(item: VmmServerTagsUpdate): any { + return { tags: item["tags"] }; +} + +/** The response of a VmmServer list operation. */ +export interface _VmmServerListResult { + /** The VmmServer items on this page */ + value: VmmServer[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _vmmServerListResultDeserializer(item: any): _VmmServerListResult { + return { + value: vmmServerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function vmmServerArraySerializer(result: Array): any[] { + return result.map((item) => { + return vmmServerSerializer(item); + }); +} + +export function vmmServerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vmmServerDeserializer(item); + }); +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + readonly nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + readonly actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for and operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export enum KnownOrigin { + /** Indicates the operation is initiated by a user. */ + user = "user", + /** Indicates the operation is initiated by a system. */ + system = "system", + /** Indicates the operation is initiated by a user or system. */ + "user,system" = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Force Delete */ +export enum KnownForceDelete { + /** Enable force delete. */ + "true" = "true", + /** Disable force delete. */ + "false" = "false", +} + +/** + * Force Delete \ + * {@link KnownForceDelete} can be used interchangeably with ForceDelete, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable force delete. \ + * **false**: Disable force delete. + */ +export type ForceDelete = string; + +/** Delete From Host */ +export enum KnownDeleteFromHost { + /** Enable delete from host. */ + "true" = "true", + /** Disable delete from host. */ + "false" = "false", +} + +/** + * Delete From Host \ + * {@link KnownDeleteFromHost} can be used interchangeably with DeleteFromHost, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: Enable delete from host. \ + * **false**: Disable delete from host. + */ +export type DeleteFromHost = string; + +/** The available API versions. */ +export enum KnownVersions { + /** Service version 2023-10-07. */ + v2023_10_07 = "2023-10-07", + /** Service version 2024-06-01. */ + v2024_06_01 = "2024-06-01", +} diff --git a/sdk/scvmm/arm-scvmm/src/models/parameters.ts b/sdk/scvmm/arm-scvmm/src/models/parameters.ts deleted file mode 100644 index 5f864b675018..000000000000 --- a/sdk/scvmm/arm-scvmm/src/models/parameters.ts +++ /dev/null @@ -1,337 +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 { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - VirtualMachineInstance as VirtualMachineInstanceMapper, - VirtualMachineInstanceUpdate as VirtualMachineInstanceUpdateMapper, - VirtualMachineCreateCheckpoint as VirtualMachineCreateCheckpointMapper, - VirtualMachineDeleteCheckpoint as VirtualMachineDeleteCheckpointMapper, - VirtualMachineRestoreCheckpoint as VirtualMachineRestoreCheckpointMapper, - StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, - GuestAgent as GuestAgentMapper, - AvailabilitySet as AvailabilitySetMapper, - AvailabilitySetTagsUpdate as AvailabilitySetTagsUpdateMapper, - Cloud as CloudMapper, - CloudTagsUpdate as CloudTagsUpdateMapper, - VirtualMachineTemplate as VirtualMachineTemplateMapper, - VirtualMachineTemplateTagsUpdate as VirtualMachineTemplateTagsUpdateMapper, - VirtualNetwork as VirtualNetworkMapper, - VirtualNetworkTagsUpdate as VirtualNetworkTagsUpdateMapper, - VmmServer as VmmServerMapper, - VmmServerTagsUpdate as VmmServerTagsUpdateMapper, - InventoryItem as InventoryItemMapper, -} from "../models/mappers.js"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2023-10-07", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const resourceUri: OperationURLParameter = { - parameterPath: "resourceUri", - mapper: { - serializedName: "resourceUri", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const resource: OperationParameter = { - parameterPath: "resource", - mapper: VirtualMachineInstanceMapper, -}; - -export const properties: OperationParameter = { - parameterPath: "properties", - mapper: VirtualMachineInstanceUpdateMapper, -}; - -export const force: OperationQueryParameter = { - parameterPath: ["options", "force"], - mapper: { - serializedName: "force", - type: { - name: "String", - }, - }, -}; - -export const deleteFromHost: OperationQueryParameter = { - parameterPath: ["options", "deleteFromHost"], - mapper: { - serializedName: "deleteFromHost", - type: { - name: "String", - }, - }, -}; - -export const body: OperationParameter = { - parameterPath: "body", - mapper: VirtualMachineCreateCheckpointMapper, -}; - -export const body1: OperationParameter = { - parameterPath: "body", - mapper: VirtualMachineDeleteCheckpointMapper, -}; - -export const body2: OperationParameter = { - parameterPath: "body", - mapper: VirtualMachineRestoreCheckpointMapper, -}; - -export const body3: OperationParameter = { - parameterPath: "body", - mapper: StopVirtualMachineOptionsMapper, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const resource1: OperationParameter = { - parameterPath: "resource", - mapper: GuestAgentMapper, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "Uuid", - }, - }, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const availabilitySetResourceName: OperationURLParameter = { - parameterPath: "availabilitySetResourceName", - mapper: { - constraints: { - Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), - MaxLength: 54, - MinLength: 1, - }, - serializedName: "availabilitySetResourceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource2: OperationParameter = { - parameterPath: "resource", - mapper: AvailabilitySetMapper, -}; - -export const properties1: OperationParameter = { - parameterPath: "properties", - mapper: AvailabilitySetTagsUpdateMapper, -}; - -export const cloudResourceName: OperationURLParameter = { - parameterPath: "cloudResourceName", - mapper: { - constraints: { - Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), - MaxLength: 54, - MinLength: 1, - }, - serializedName: "cloudResourceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource3: OperationParameter = { - parameterPath: "resource", - mapper: CloudMapper, -}; - -export const properties2: OperationParameter = { - parameterPath: "properties", - mapper: CloudTagsUpdateMapper, -}; - -export const virtualMachineTemplateName: OperationURLParameter = { - parameterPath: "virtualMachineTemplateName", - mapper: { - constraints: { - Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), - MaxLength: 54, - MinLength: 1, - }, - serializedName: "virtualMachineTemplateName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource4: OperationParameter = { - parameterPath: "resource", - mapper: VirtualMachineTemplateMapper, -}; - -export const properties3: OperationParameter = { - parameterPath: "properties", - mapper: VirtualMachineTemplateTagsUpdateMapper, -}; - -export const virtualNetworkName: OperationURLParameter = { - parameterPath: "virtualNetworkName", - mapper: { - constraints: { - Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), - MaxLength: 54, - MinLength: 1, - }, - serializedName: "virtualNetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource5: OperationParameter = { - parameterPath: "resource", - mapper: VirtualNetworkMapper, -}; - -export const properties4: OperationParameter = { - parameterPath: "properties", - mapper: VirtualNetworkTagsUpdateMapper, -}; - -export const vmmServerName: OperationURLParameter = { - parameterPath: "vmmServerName", - mapper: { - constraints: { - Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), - MaxLength: 54, - MinLength: 1, - }, - serializedName: "vmmServerName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource6: OperationParameter = { - parameterPath: "resource", - mapper: VmmServerMapper, -}; - -export const properties5: OperationParameter = { - parameterPath: "properties", - mapper: VmmServerTagsUpdateMapper, -}; - -export const inventoryItemResourceName: OperationURLParameter = { - parameterPath: "inventoryItemResourceName", - mapper: { - constraints: { - Pattern: new RegExp( - "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - ), - }, - serializedName: "inventoryItemResourceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource7: OperationParameter = { - parameterPath: "resource", - mapper: InventoryItemMapper, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts b/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts deleted file mode 100644 index 030f1e9b27f8..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts +++ /dev/null @@ -1,738 +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.js"; -import { AvailabilitySets } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - AvailabilitySet, - AvailabilitySetsListBySubscriptionNextOptionalParams, - AvailabilitySetsListBySubscriptionOptionalParams, - AvailabilitySetsListBySubscriptionResponse, - AvailabilitySetsListByResourceGroupNextOptionalParams, - AvailabilitySetsListByResourceGroupOptionalParams, - AvailabilitySetsListByResourceGroupResponse, - AvailabilitySetsGetOptionalParams, - AvailabilitySetsGetResponse, - AvailabilitySetsCreateOrUpdateOptionalParams, - AvailabilitySetsCreateOrUpdateResponse, - AvailabilitySetTagsUpdate, - AvailabilitySetsUpdateOptionalParams, - AvailabilitySetsUpdateResponse, - AvailabilitySetsDeleteOptionalParams, - AvailabilitySetsDeleteResponse, - AvailabilitySetsListBySubscriptionNextResponse, - AvailabilitySetsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailabilitySets operations. */ -export class AvailabilitySetsImpl implements AvailabilitySets { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class AvailabilitySets class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List of AvailabilitySets in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: AvailabilitySetsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: AvailabilitySetsListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailabilitySetsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: AvailabilitySetsListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AvailabilitySetsListByResourceGroupOptionalParams, - ): 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?: AvailabilitySetsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AvailabilitySetsListByResourceGroupResponse; - 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?: AvailabilitySetsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List of AvailabilitySets in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: AvailabilitySetsListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AvailabilitySetsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Implements AvailabilitySet GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, availabilitySetResourceName, options }, - getOperationSpec, - ); - } - - /** - * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - availabilitySetResourceName: string, - resource: AvailabilitySet, - options?: AvailabilitySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - availabilitySetResourceName, - resource, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - AvailabilitySetsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - resource: AvailabilitySet, - options?: AvailabilitySetsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - availabilitySetResourceName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - availabilitySetResourceName: string, - properties: AvailabilitySetTagsUpdate, - options?: AvailabilitySetsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - availabilitySetResourceName, - properties, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - AvailabilitySetsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - properties: AvailabilitySetTagsUpdate, - options?: AvailabilitySetsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - availabilitySetResourceName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, availabilitySetResourceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - AvailabilitySetsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - availabilitySetResourceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: AvailabilitySetsListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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?: AvailabilitySetsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySetListResult, - }, - 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.ScVmm/availabilitySets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.availabilitySetResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySet, - }, - 201: { - bodyMapper: Mappers.AvailabilitySet, - }, - 202: { - bodyMapper: Mappers.AvailabilitySet, - }, - 204: { - bodyMapper: Mappers.AvailabilitySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.availabilitySetResourceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySet, - }, - 201: { - bodyMapper: Mappers.AvailabilitySet, - }, - 202: { - bodyMapper: Mappers.AvailabilitySet, - }, - 204: { - bodyMapper: Mappers.AvailabilitySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.availabilitySetResourceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.AvailabilitySetsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.AvailabilitySetsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.AvailabilitySetsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.AvailabilitySetsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.availabilitySetResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilitySetListResult, - }, - 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.AvailabilitySetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/clouds.ts b/sdk/scvmm/arm-scvmm/src/operations/clouds.ts deleted file mode 100644 index 1ca074f5923e..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/clouds.ts +++ /dev/null @@ -1,722 +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.js"; -import { Clouds } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - Cloud, - CloudsListBySubscriptionNextOptionalParams, - CloudsListBySubscriptionOptionalParams, - CloudsListBySubscriptionResponse, - CloudsListByResourceGroupNextOptionalParams, - CloudsListByResourceGroupOptionalParams, - CloudsListByResourceGroupResponse, - CloudsGetOptionalParams, - CloudsGetResponse, - CloudsCreateOrUpdateOptionalParams, - CloudsCreateOrUpdateResponse, - CloudTagsUpdate, - CloudsUpdateOptionalParams, - CloudsUpdateResponse, - CloudsDeleteOptionalParams, - CloudsDeleteResponse, - CloudsListBySubscriptionNextResponse, - CloudsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Clouds operations. */ -export class CloudsImpl implements Clouds { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class Clouds class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List of Clouds in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: CloudsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: CloudsListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CloudsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: CloudsListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: CloudsListByResourceGroupOptionalParams, - ): 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?: CloudsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CloudsListByResourceGroupResponse; - 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?: CloudsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List of Clouds in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: CloudsListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: CloudsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Implements Cloud GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudResourceName, options }, - getOperationSpec, - ); - } - - /** - * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - cloudResourceName: string, - resource: Cloud, - options?: CloudsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, cloudResourceName, resource, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - CloudsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - cloudResourceName: string, - resource: Cloud, - options?: CloudsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - cloudResourceName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - cloudResourceName: string, - properties: CloudTagsUpdate, - options?: CloudsUpdateOptionalParams, - ): Promise< - SimplePollerLike, CloudsUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, cloudResourceName, properties, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - CloudsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - cloudResourceName: string, - properties: CloudTagsUpdate, - options?: CloudsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - cloudResourceName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsDeleteOptionalParams, - ): Promise< - SimplePollerLike, CloudsDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, cloudResourceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - CloudsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - cloudResourceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: CloudsListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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?: CloudsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudListResult, - }, - 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.ScVmm/clouds", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Cloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Cloud, - }, - 201: { - bodyMapper: Mappers.Cloud, - }, - 202: { - bodyMapper: Mappers.Cloud, - }, - 204: { - bodyMapper: Mappers.Cloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudResourceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Cloud, - }, - 201: { - bodyMapper: Mappers.Cloud, - }, - 202: { - bodyMapper: Mappers.Cloud, - }, - 204: { - bodyMapper: Mappers.Cloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudResourceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.CloudsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.CloudsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.CloudsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.CloudsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudListResult, - }, - 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.CloudListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts b/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts deleted file mode 100644 index dd9b95831133..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts +++ /dev/null @@ -1,365 +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.js"; -import { GuestAgents } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - GuestAgent, - GuestAgentsListByVirtualMachineInstanceNextOptionalParams, - GuestAgentsListByVirtualMachineInstanceOptionalParams, - GuestAgentsListByVirtualMachineInstanceResponse, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsDeleteOptionalParams, - GuestAgentsListByVirtualMachineInstanceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GuestAgents operations. */ -export class GuestAgentsImpl implements GuestAgents { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class GuestAgents class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * Returns the list of GuestAgent of the given vm. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - public listByVirtualMachineInstance( - resourceUri: string, - options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVirtualMachineInstancePagingAll( - 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.listByVirtualMachineInstancePagingPage( - resourceUri, - options, - settings, - ); - }, - }; - } - - private async *listByVirtualMachineInstancePagingPage( - resourceUri: string, - options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GuestAgentsListByVirtualMachineInstanceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVirtualMachineInstance(resourceUri, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVirtualMachineInstanceNext( - resourceUri, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVirtualMachineInstancePagingAll( - resourceUri: string, - options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVirtualMachineInstancePagingPage( - resourceUri, - options, - )) { - yield* page; - } - } - - /** - * Returns the list of GuestAgent of the given vm. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - private _listByVirtualMachineInstance( - resourceUri: string, - options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listByVirtualMachineInstanceOperationSpec, - ); - } - - /** - * Implements GuestAgent GET method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: GuestAgentsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getOperationSpec, - ); - } - - /** - * Create Or Update GuestAgent. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreate( - resourceUri: string, - resource: GuestAgent, - options?: GuestAgentsCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GuestAgentsCreateResponse - > - > { - 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, resource, options }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - GuestAgentsCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create Or Update GuestAgent. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceUri: string, - resource: GuestAgent, - options?: GuestAgentsCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate(resourceUri, resource, options); - return poller.pollUntilDone(); - } - - /** - * Implements GuestAgent DELETE method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - delete( - resourceUri: string, - options?: GuestAgentsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - deleteOperationSpec, - ); - } - - /** - * ListByVirtualMachineInstanceNext - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param nextLink The nextLink from the previous successful call to the ListByVirtualMachineInstance - * method. - * @param options The options parameters. - */ - private _listByVirtualMachineInstanceNext( - resourceUri: string, - nextLink: string, - options?: GuestAgentsListByVirtualMachineInstanceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listByVirtualMachineInstanceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByVirtualMachineInstanceOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GuestAgentListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GuestAgent, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GuestAgent, - }, - 201: { - bodyMapper: Mappers.GuestAgent, - }, - 202: { - bodyMapper: Mappers.GuestAgent, - }, - 204: { - bodyMapper: Mappers.GuestAgent, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource1, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVirtualMachineInstanceNextOperationSpec: coreClient.OperationSpec = -{ - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GuestAgentListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/index.ts b/sdk/scvmm/arm-scvmm/src/operations/index.ts deleted file mode 100644 index 57e7e2659094..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/index.ts +++ /dev/null @@ -1,18 +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. - */ - -export * from "./virtualMachineInstances.js"; -export * from "./guestAgents.js"; -export * from "./vmInstanceHybridIdentityMetadatas.js"; -export * from "./operations.js"; -export * from "./availabilitySets.js"; -export * from "./clouds.js"; -export * from "./virtualMachineTemplates.js"; -export * from "./virtualNetworks.js"; -export * from "./vmmServers.js"; -export * from "./inventoryItems.js"; diff --git a/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts b/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts deleted file mode 100644 index 0c6314ed2a39..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts +++ /dev/null @@ -1,341 +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.js"; -import { InventoryItems } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - InventoryItem, - InventoryItemsListByVmmServerNextOptionalParams, - InventoryItemsListByVmmServerOptionalParams, - InventoryItemsListByVmmServerResponse, - InventoryItemsGetOptionalParams, - InventoryItemsGetResponse, - InventoryItemsCreateOptionalParams, - InventoryItemsCreateResponse, - InventoryItemsDeleteOptionalParams, - InventoryItemsListByVmmServerNextResponse, -} from "../models/index.js"; - -/// -/** Class containing InventoryItems operations. */ -export class InventoryItemsImpl implements InventoryItems { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class InventoryItems class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * Returns the list of inventoryItems in the given VmmServer. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - public listByVmmServer( - resourceGroupName: string, - vmmServerName: string, - options?: InventoryItemsListByVmmServerOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVmmServerPagingAll( - resourceGroupName, - vmmServerName, - 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.listByVmmServerPagingPage( - resourceGroupName, - vmmServerName, - options, - settings, - ); - }, - }; - } - - private async *listByVmmServerPagingPage( - resourceGroupName: string, - vmmServerName: string, - options?: InventoryItemsListByVmmServerOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: InventoryItemsListByVmmServerResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVmmServer( - resourceGroupName, - vmmServerName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVmmServerNext( - resourceGroupName, - vmmServerName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVmmServerPagingAll( - resourceGroupName: string, - vmmServerName: string, - options?: InventoryItemsListByVmmServerOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVmmServerPagingPage( - resourceGroupName, - vmmServerName, - options, - )) { - yield* page; - } - } - - /** - * Returns the list of inventoryItems in the given VmmServer. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - private _listByVmmServer( - resourceGroupName: string, - vmmServerName: string, - options?: InventoryItemsListByVmmServerOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, options }, - listByVmmServerOperationSpec, - ); - } - - /** - * Shows an inventory item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - options?: InventoryItemsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, inventoryItemResourceName, options }, - getOperationSpec, - ); - } - - /** - * Create Or Update InventoryItem. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - resource: InventoryItem, - options?: InventoryItemsCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmmServerName, - inventoryItemResourceName, - resource, - options, - }, - createOperationSpec, - ); - } - - /** - * Deletes an inventoryItem. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - options?: InventoryItemsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, inventoryItemResourceName, options }, - deleteOperationSpec, - ); - } - - /** - * ListByVmmServerNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param nextLink The nextLink from the previous successful call to the ListByVmmServer method. - * @param options The options parameters. - */ - private _listByVmmServerNext( - resourceGroupName: string, - vmmServerName: string, - nextLink: string, - options?: InventoryItemsListByVmmServerNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, nextLink, options }, - listByVmmServerNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByVmmServerOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InventoryItemListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InventoryItem, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - Parameters.inventoryItemResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.InventoryItem, - }, - 201: { - bodyMapper: Mappers.InventoryItem, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - Parameters.inventoryItemResourceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - Parameters.inventoryItemResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByVmmServerNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InventoryItemListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/operations.ts b/sdk/scvmm/arm-scvmm/src/operations/operations.ts deleted file mode 100644 index e023c3c9f8d5..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/operations.ts +++ /dev/null @@ -1,149 +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.js"; -import { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams, - ): 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?: OperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationsListResponse; - 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?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ScVmm/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts deleted file mode 100644 index 7bc80aac8e39..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts +++ /dev/null @@ -1,1239 +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.js"; -import { VirtualMachineInstances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - VirtualMachineInstance, - VirtualMachineInstancesListNextOptionalParams, - VirtualMachineInstancesListOptionalParams, - VirtualMachineInstancesListResponse, - VirtualMachineInstancesGetOptionalParams, - VirtualMachineInstancesGetResponse, - VirtualMachineInstancesCreateOrUpdateOptionalParams, - VirtualMachineInstancesCreateOrUpdateResponse, - VirtualMachineInstanceUpdate, - VirtualMachineInstancesUpdateOptionalParams, - VirtualMachineInstancesUpdateResponse, - VirtualMachineInstancesDeleteOptionalParams, - VirtualMachineInstancesDeleteResponse, - VirtualMachineCreateCheckpoint, - VirtualMachineInstancesCreateCheckpointOptionalParams, - VirtualMachineInstancesCreateCheckpointResponse, - VirtualMachineDeleteCheckpoint, - VirtualMachineInstancesDeleteCheckpointOptionalParams, - VirtualMachineInstancesDeleteCheckpointResponse, - VirtualMachineInstancesRestartOptionalParams, - VirtualMachineInstancesRestartResponse, - VirtualMachineRestoreCheckpoint, - VirtualMachineInstancesRestoreCheckpointOptionalParams, - VirtualMachineInstancesRestoreCheckpointResponse, - VirtualMachineInstancesStartOptionalParams, - VirtualMachineInstancesStartResponse, - StopVirtualMachineOptions, - VirtualMachineInstancesStopOptionalParams, - VirtualMachineInstancesStopResponse, - VirtualMachineInstancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualMachineInstances operations. */ -export class VirtualMachineInstancesImpl implements VirtualMachineInstances { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class VirtualMachineInstances class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - 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 resource. - * @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; - } - } - - /** - * Lists all of the virtual machine instances within the specified parent resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: VirtualMachineInstancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec, - ); - } - - /** - * Retrieves information about a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: VirtualMachineInstancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getOperationSpec, - ); - } - - /** - * 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 resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceUri: string, - resource: VirtualMachineInstance, - 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, resource, 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 resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceUri: string, - resource: VirtualMachineInstance, - options?: VirtualMachineInstancesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceUri, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The operation to update a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceUri: string, - properties: VirtualMachineInstanceUpdate, - 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, properties, 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 resource. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceUri: string, - properties: VirtualMachineInstanceUpdate, - options?: VirtualMachineInstancesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceUri, properties, options); - return poller.pollUntilDone(); - } - - /** - * The operation to delete a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceUri: string, - options?: VirtualMachineInstancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceUri, options); - return poller.pollUntilDone(); - } - - /** - * Creates a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginCreateCheckpoint( - resourceUri: string, - body: VirtualMachineCreateCheckpoint, - options?: VirtualMachineInstancesCreateCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesCreateCheckpointResponse - > - > { - 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, body, options }, - spec: createCheckpointOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineInstancesCreateCheckpointResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginCreateCheckpointAndWait( - resourceUri: string, - body: VirtualMachineCreateCheckpoint, - options?: VirtualMachineInstancesCreateCheckpointOptionalParams, - ): Promise { - const poller = await this.beginCreateCheckpoint(resourceUri, body, options); - return poller.pollUntilDone(); - } - - /** - * Deletes a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginDeleteCheckpoint( - resourceUri: string, - body: VirtualMachineDeleteCheckpoint, - options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesDeleteCheckpointResponse - > - > { - 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, body, options }, - spec: deleteCheckpointOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineInstancesDeleteCheckpointResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginDeleteCheckpointAndWait( - resourceUri: string, - body: VirtualMachineDeleteCheckpoint, - options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, - ): Promise { - const poller = await this.beginDeleteCheckpoint(resourceUri, body, options); - return poller.pollUntilDone(); - } - - /** - * The operation to restart a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceUri: string, - options?: VirtualMachineInstancesRestartOptionalParams, - ): Promise { - const poller = await this.beginRestart(resourceUri, options); - return poller.pollUntilDone(); - } - - /** - * Restores to a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginRestoreCheckpoint( - resourceUri: string, - body: VirtualMachineRestoreCheckpoint, - options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesRestoreCheckpointResponse - > - > { - 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, body, options }, - spec: restoreCheckpointOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineInstancesRestoreCheckpointResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restores to a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginRestoreCheckpointAndWait( - resourceUri: string, - body: VirtualMachineRestoreCheckpoint, - options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, - ): Promise { - const poller = await this.beginRestoreCheckpoint( - resourceUri, - body, - options, - ); - return poller.pollUntilDone(); - } - - /** - * The operation to start a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @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 power off (stop) a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginStop( - resourceUri: string, - body: StopVirtualMachineOptions, - 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, body, 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 resource. - * @param body The content of the action request - * @param options The options parameters. - */ - async beginStopAndWait( - resourceUri: string, - body: StopVirtualMachineOptions, - options?: VirtualMachineInstancesStopOptionalParams, - ): Promise { - const poller = await this.beginStop(resourceUri, body, options); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineInstanceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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 createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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.resource, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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.properties, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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 createCheckpointOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders, - }, - 201: { - headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders, - }, - 202: { - headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders, - }, - 204: { - headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteCheckpointOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders, - }, - 201: { - headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders, - }, - 202: { - headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders, - }, - 204: { - headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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 restoreCheckpointOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders, - }, - 201: { - headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders, - }, - 202: { - headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders, - }, - 204: { - headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const startOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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 stopOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineInstanceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts deleted file mode 100644 index 86928e68988e..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts +++ /dev/null @@ -1,738 +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.js"; -import { VirtualMachineTemplates } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - VirtualMachineTemplate, - VirtualMachineTemplatesListBySubscriptionNextOptionalParams, - VirtualMachineTemplatesListBySubscriptionOptionalParams, - VirtualMachineTemplatesListBySubscriptionResponse, - VirtualMachineTemplatesListByResourceGroupNextOptionalParams, - VirtualMachineTemplatesListByResourceGroupOptionalParams, - VirtualMachineTemplatesListByResourceGroupResponse, - VirtualMachineTemplatesGetOptionalParams, - VirtualMachineTemplatesGetResponse, - VirtualMachineTemplatesCreateOrUpdateOptionalParams, - VirtualMachineTemplatesCreateOrUpdateResponse, - VirtualMachineTemplateTagsUpdate, - VirtualMachineTemplatesUpdateOptionalParams, - VirtualMachineTemplatesUpdateResponse, - VirtualMachineTemplatesDeleteOptionalParams, - VirtualMachineTemplatesDeleteResponse, - VirtualMachineTemplatesListBySubscriptionNextResponse, - VirtualMachineTemplatesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualMachineTemplates operations. */ -export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class VirtualMachineTemplates class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List of VirtualMachineTemplates in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualMachineTemplatesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachineTemplatesListByResourceGroupOptionalParams, - ): 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?: VirtualMachineTemplatesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualMachineTemplatesListByResourceGroupResponse; - 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?: VirtualMachineTemplatesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List of VirtualMachineTemplates in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachineTemplatesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Implements VirtualMachineTemplate GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineTemplateName, options }, - getOperationSpec, - ); - } - - /** - * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineTemplateName: string, - resource: VirtualMachineTemplate, - options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualMachineTemplateName, - resource, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineTemplatesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - resource: VirtualMachineTemplate, - options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualMachineTemplateName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineTemplateName: string, - properties: VirtualMachineTemplateTagsUpdate, - options?: VirtualMachineTemplatesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualMachineTemplateName, - properties, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineTemplatesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - properties: VirtualMachineTemplateTagsUpdate, - options?: VirtualMachineTemplatesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualMachineTemplateName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineTemplateName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachineTemplatesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineTemplateName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VirtualMachineTemplatesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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?: VirtualMachineTemplatesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplateListResult, - }, - 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.ScVmm/virtualMachineTemplates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplateListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineTemplateName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 201: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 202: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 204: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineTemplateName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 201: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 202: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - 204: { - bodyMapper: Mappers.VirtualMachineTemplate, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineTemplateName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineTemplateName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineTemplateListResult, - }, - 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.VirtualMachineTemplateListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts deleted file mode 100644 index 87e8c5c72666..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts +++ /dev/null @@ -1,728 +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.js"; -import { VirtualNetworks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - VirtualNetwork, - VirtualNetworksListBySubscriptionNextOptionalParams, - VirtualNetworksListBySubscriptionOptionalParams, - VirtualNetworksListBySubscriptionResponse, - VirtualNetworksListByResourceGroupNextOptionalParams, - VirtualNetworksListByResourceGroupOptionalParams, - VirtualNetworksListByResourceGroupResponse, - VirtualNetworksGetOptionalParams, - VirtualNetworksGetResponse, - VirtualNetworksCreateOrUpdateOptionalParams, - VirtualNetworksCreateOrUpdateResponse, - VirtualNetworkTagsUpdate, - VirtualNetworksUpdateOptionalParams, - VirtualNetworksUpdateResponse, - VirtualNetworksDeleteOptionalParams, - VirtualNetworksDeleteResponse, - VirtualNetworksListBySubscriptionNextResponse, - VirtualNetworksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualNetworks operations. */ -export class VirtualNetworksImpl implements VirtualNetworks { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class VirtualNetworks class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List of VirtualNetworks in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VirtualNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: VirtualNetworksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: VirtualNetworksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworksListByResourceGroupOptionalParams, - ): 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?: VirtualNetworksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualNetworksListByResourceGroupResponse; - 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?: VirtualNetworksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List of VirtualNetworks in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VirtualNetworksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Implements VirtualNetwork GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworkName, options }, - getOperationSpec, - ); - } - - /** - * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - resource: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, resource, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - resource: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualNetworkName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualNetworkName: string, - properties: VirtualNetworkTagsUpdate, - options?: VirtualNetworksUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, properties, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworksUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - properties: VirtualNetworkTagsUpdate, - options?: VirtualNetworksUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualNetworkName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualNetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VirtualNetworksDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualNetworkName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VirtualNetworksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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?: VirtualNetworksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - 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.ScVmm/virtualNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - 201: { - bodyMapper: Mappers.VirtualNetwork, - }, - 202: { - bodyMapper: Mappers.VirtualNetwork, - }, - 204: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetwork, - }, - 201: { - bodyMapper: Mappers.VirtualNetwork, - }, - 202: { - bodyMapper: Mappers.VirtualNetwork, - }, - 204: { - bodyMapper: Mappers.VirtualNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VirtualNetworksDeleteHeaders, - }, - 201: { - headersMapper: Mappers.VirtualNetworksDeleteHeaders, - }, - 202: { - headersMapper: Mappers.VirtualNetworksDeleteHeaders, - }, - 204: { - headersMapper: Mappers.VirtualNetworksDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkListResult, - }, - 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.VirtualNetworkListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts b/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts deleted file mode 100644 index 104fdaafaff3..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts +++ /dev/null @@ -1,214 +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.js"; -import { VmInstanceHybridIdentityMetadatas } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - VmInstanceHybridIdentityMetadata, - VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextOptionalParams, - VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceResponse, - VmInstanceHybridIdentityMetadatasGetOptionalParams, - VmInstanceHybridIdentityMetadatasGetResponse, - VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VmInstanceHybridIdentityMetadatas operations. */ -export class VmInstanceHybridIdentityMetadatasImpl - implements VmInstanceHybridIdentityMetadatas { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class VmInstanceHybridIdentityMetadatas class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * Returns the list of HybridIdentityMetadata of the given VM. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - public listByVirtualMachineInstance( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVirtualMachineInstancePagingAll( - 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.listByVirtualMachineInstancePagingPage( - resourceUri, - options, - settings, - ); - }, - }; - } - - private async *listByVirtualMachineInstancePagingPage( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVirtualMachineInstance(resourceUri, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVirtualMachineInstanceNext( - resourceUri, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVirtualMachineInstancePagingAll( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVirtualMachineInstancePagingPage( - resourceUri, - options, - )) { - yield* page; - } - } - - /** - * Returns the list of HybridIdentityMetadata of the given VM. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - private _listByVirtualMachineInstance( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listByVirtualMachineInstanceOperationSpec, - ); - } - - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getOperationSpec, - ); - } - - /** - * ListByVirtualMachineInstanceNext - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param nextLink The nextLink from the previous successful call to the ListByVirtualMachineInstance - * method. - * @param options The options parameters. - */ - private _listByVirtualMachineInstanceNext( - resourceUri: string, - nextLink: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listByVirtualMachineInstanceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByVirtualMachineInstanceOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmInstanceHybridIdentityMetadataListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ScVmm/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 listByVirtualMachineInstanceNextOperationSpec: coreClient.OperationSpec = -{ - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmInstanceHybridIdentityMetadataListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts b/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts deleted file mode 100644 index 8c2386401436..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts +++ /dev/null @@ -1,728 +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.js"; -import { VmmServers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ScVmm } from "../scVmm.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - VmmServer, - VmmServersListBySubscriptionNextOptionalParams, - VmmServersListBySubscriptionOptionalParams, - VmmServersListBySubscriptionResponse, - VmmServersListByResourceGroupNextOptionalParams, - VmmServersListByResourceGroupOptionalParams, - VmmServersListByResourceGroupResponse, - VmmServersGetOptionalParams, - VmmServersGetResponse, - VmmServersCreateOrUpdateOptionalParams, - VmmServersCreateOrUpdateResponse, - VmmServerTagsUpdate, - VmmServersUpdateOptionalParams, - VmmServersUpdateResponse, - VmmServersDeleteOptionalParams, - VmmServersDeleteResponse, - VmmServersListBySubscriptionNextResponse, - VmmServersListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VmmServers operations. */ -export class VmmServersImpl implements VmmServers { - private readonly client: ScVmm; - - /** - * Initialize a new instance of the class VmmServers class. - * @param client Reference to the service client - */ - constructor(client: ScVmm) { - this.client = client; - } - - /** - * List of VmmServers in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VmmServersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: VmmServersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VmmServersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: VmmServersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VmmServersListByResourceGroupOptionalParams, - ): 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?: VmmServersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VmmServersListByResourceGroupResponse; - 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?: VmmServersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List of VmmServers in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VmmServersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VmmServersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Implements VmmServer GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, options }, - getOperationSpec, - ); - } - - /** - * Onboards the SCVmm fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - vmmServerName: string, - resource: VmmServer, - options?: VmmServersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vmmServerName, resource, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VmmServersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Onboards the SCVmm fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - vmmServerName: string, - resource: VmmServer, - options?: VmmServersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - vmmServerName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - vmmServerName: string, - properties: VmmServerTagsUpdate, - options?: VmmServersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vmmServerName, properties, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - VmmServersUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - vmmServerName: string, - properties: VmmServerTagsUpdate, - options?: VmmServersUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - vmmServerName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Removes the SCVmm fabric from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, vmmServerName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VmmServersDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Removes the SCVmm fabric from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - vmmServerName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VmmServersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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?: VmmServersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmmServerListResult, - }, - 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.ScVmm/vmmServers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmmServerListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmmServer, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VmmServer, - }, - 201: { - bodyMapper: Mappers.VmmServer, - }, - 202: { - bodyMapper: Mappers.VmmServer, - }, - 204: { - bodyMapper: Mappers.VmmServer, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VmmServer, - }, - 201: { - bodyMapper: Mappers.VmmServer, - }, - 202: { - bodyMapper: Mappers.VmmServer, - }, - 204: { - bodyMapper: Mappers.VmmServer, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VmmServersDeleteHeaders, - }, - 201: { - headersMapper: Mappers.VmmServersDeleteHeaders, - }, - 202: { - headersMapper: Mappers.VmmServersDeleteHeaders, - }, - 204: { - headersMapper: Mappers.VmmServersDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.vmmServerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmmServerListResult, - }, - 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.VmmServerListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts deleted file mode 100644 index c14482bd914d..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts +++ /dev/null @@ -1,145 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - AvailabilitySet, - AvailabilitySetsListBySubscriptionOptionalParams, - AvailabilitySetsListByResourceGroupOptionalParams, - AvailabilitySetsGetOptionalParams, - AvailabilitySetsGetResponse, - AvailabilitySetsCreateOrUpdateOptionalParams, - AvailabilitySetsCreateOrUpdateResponse, - AvailabilitySetTagsUpdate, - AvailabilitySetsUpdateOptionalParams, - AvailabilitySetsUpdateResponse, - AvailabilitySetsDeleteOptionalParams, - AvailabilitySetsDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a AvailabilitySets. */ -export interface AvailabilitySets { - /** - * List of AvailabilitySets in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: AvailabilitySetsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AvailabilitySetsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements AvailabilitySet GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsGetOptionalParams, - ): Promise; - /** - * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - availabilitySetResourceName: string, - resource: AvailabilitySet, - options?: AvailabilitySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsCreateOrUpdateResponse - > - >; - /** - * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - resource: AvailabilitySet, - options?: AvailabilitySetsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - availabilitySetResourceName: string, - properties: AvailabilitySetTagsUpdate, - options?: AvailabilitySetsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsUpdateResponse - > - >; - /** - * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - properties: AvailabilitySetTagsUpdate, - options?: AvailabilitySetsUpdateOptionalParams, - ): Promise; - /** - * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AvailabilitySetsDeleteResponse - > - >; - /** - * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - availabilitySetResourceName: string, - options?: AvailabilitySetsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts deleted file mode 100644 index facd6d333b9b..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts +++ /dev/null @@ -1,139 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Cloud, - CloudsListBySubscriptionOptionalParams, - CloudsListByResourceGroupOptionalParams, - CloudsGetOptionalParams, - CloudsGetResponse, - CloudsCreateOrUpdateOptionalParams, - CloudsCreateOrUpdateResponse, - CloudTagsUpdate, - CloudsUpdateOptionalParams, - CloudsUpdateResponse, - CloudsDeleteOptionalParams, - CloudsDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Clouds. */ -export interface Clouds { - /** - * List of Clouds in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: CloudsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: CloudsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements Cloud GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsGetOptionalParams, - ): Promise; - /** - * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - cloudResourceName: string, - resource: Cloud, - options?: CloudsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudsCreateOrUpdateResponse - > - >; - /** - * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - cloudResourceName: string, - resource: Cloud, - options?: CloudsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - cloudResourceName: string, - properties: CloudTagsUpdate, - options?: CloudsUpdateOptionalParams, - ): Promise< - SimplePollerLike, CloudsUpdateResponse> - >; - /** - * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - cloudResourceName: string, - properties: CloudTagsUpdate, - options?: CloudsUpdateOptionalParams, - ): Promise; - /** - * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsDeleteOptionalParams, - ): Promise< - SimplePollerLike, CloudsDeleteResponse> - >; - /** - * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - cloudResourceName: string, - options?: CloudsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/guestAgents.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/guestAgents.ts deleted file mode 100644 index aa55cbb7ed06..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/guestAgents.ts +++ /dev/null @@ -1,78 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - GuestAgent, - GuestAgentsListByVirtualMachineInstanceOptionalParams, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GuestAgents. */ -export interface GuestAgents { - /** - * Returns the list of GuestAgent of the given vm. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - listByVirtualMachineInstance( - resourceUri: string, - options?: GuestAgentsListByVirtualMachineInstanceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements GuestAgent GET method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: GuestAgentsGetOptionalParams, - ): Promise; - /** - * Create Or Update GuestAgent. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreate( - resourceUri: string, - resource: GuestAgent, - options?: GuestAgentsCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GuestAgentsCreateResponse - > - >; - /** - * Create Or Update GuestAgent. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceUri: string, - resource: GuestAgent, - options?: GuestAgentsCreateOptionalParams, - ): Promise; - /** - * Implements GuestAgent DELETE method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - delete( - resourceUri: string, - options?: GuestAgentsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts deleted file mode 100644 index 57e7e2659094..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,18 +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. - */ - -export * from "./virtualMachineInstances.js"; -export * from "./guestAgents.js"; -export * from "./vmInstanceHybridIdentityMetadatas.js"; -export * from "./operations.js"; -export * from "./availabilitySets.js"; -export * from "./clouds.js"; -export * from "./virtualMachineTemplates.js"; -export * from "./virtualNetworks.js"; -export * from "./vmmServers.js"; -export * from "./inventoryItems.js"; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts deleted file mode 100644 index b1349a809958..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts +++ /dev/null @@ -1,75 +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 { - InventoryItem, - InventoryItemsListByVmmServerOptionalParams, - InventoryItemsGetOptionalParams, - InventoryItemsGetResponse, - InventoryItemsCreateOptionalParams, - InventoryItemsCreateResponse, - InventoryItemsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a InventoryItems. */ -export interface InventoryItems { - /** - * Returns the list of inventoryItems in the given VmmServer. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - listByVmmServer( - resourceGroupName: string, - vmmServerName: string, - options?: InventoryItemsListByVmmServerOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Shows an inventory item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - options?: InventoryItemsGetOptionalParams, - ): Promise; - /** - * Create Or Update InventoryItem. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - resource: InventoryItem, - options?: InventoryItemsCreateOptionalParams, - ): Promise; - /** - * Deletes an inventoryItem. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param inventoryItemResourceName Name of the inventoryItem. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - vmmServerName: string, - inventoryItemResourceName: string, - options?: InventoryItemsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts deleted file mode 100644 index 2c280c7eb723..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +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 { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * List the operations for the provider - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts deleted file mode 100644 index deb0c2095ae2..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts +++ /dev/null @@ -1,295 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - VirtualMachineInstance, - VirtualMachineInstancesListOptionalParams, - VirtualMachineInstancesGetOptionalParams, - VirtualMachineInstancesGetResponse, - VirtualMachineInstancesCreateOrUpdateOptionalParams, - VirtualMachineInstancesCreateOrUpdateResponse, - VirtualMachineInstanceUpdate, - VirtualMachineInstancesUpdateOptionalParams, - VirtualMachineInstancesUpdateResponse, - VirtualMachineInstancesDeleteOptionalParams, - VirtualMachineInstancesDeleteResponse, - VirtualMachineCreateCheckpoint, - VirtualMachineInstancesCreateCheckpointOptionalParams, - VirtualMachineInstancesCreateCheckpointResponse, - VirtualMachineDeleteCheckpoint, - VirtualMachineInstancesDeleteCheckpointOptionalParams, - VirtualMachineInstancesDeleteCheckpointResponse, - VirtualMachineInstancesRestartOptionalParams, - VirtualMachineInstancesRestartResponse, - VirtualMachineRestoreCheckpoint, - VirtualMachineInstancesRestoreCheckpointOptionalParams, - VirtualMachineInstancesRestoreCheckpointResponse, - VirtualMachineInstancesStartOptionalParams, - VirtualMachineInstancesStartResponse, - StopVirtualMachineOptions, - VirtualMachineInstancesStopOptionalParams, - VirtualMachineInstancesStopResponse, -} from "../models/index.js"; - -/// -/** 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 resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: VirtualMachineInstancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Retrieves information about a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: VirtualMachineInstancesGetOptionalParams, - ): Promise; - /** - * 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 resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceUri: string, - resource: VirtualMachineInstance, - 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 resource. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceUri: string, - resource: VirtualMachineInstance, - options?: VirtualMachineInstancesCreateOrUpdateOptionalParams, - ): Promise; - /** - * The operation to update a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceUri: string, - properties: VirtualMachineInstanceUpdate, - 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 resource. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceUri: string, - properties: VirtualMachineInstanceUpdate, - options?: VirtualMachineInstancesUpdateOptionalParams, - ): Promise; - /** - * The operation to delete a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceUri: string, - options?: VirtualMachineInstancesDeleteOptionalParams, - ): Promise; - /** - * Creates a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginCreateCheckpoint( - resourceUri: string, - body: VirtualMachineCreateCheckpoint, - options?: VirtualMachineInstancesCreateCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesCreateCheckpointResponse - > - >; - /** - * Creates a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginCreateCheckpointAndWait( - resourceUri: string, - body: VirtualMachineCreateCheckpoint, - options?: VirtualMachineInstancesCreateCheckpointOptionalParams, - ): Promise; - /** - * Deletes a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginDeleteCheckpoint( - resourceUri: string, - body: VirtualMachineDeleteCheckpoint, - options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesDeleteCheckpointResponse - > - >; - /** - * Deletes a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginDeleteCheckpointAndWait( - resourceUri: string, - body: VirtualMachineDeleteCheckpoint, - options?: VirtualMachineInstancesDeleteCheckpointOptionalParams, - ): Promise; - /** - * The operation to restart a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceUri: string, - options?: VirtualMachineInstancesRestartOptionalParams, - ): Promise; - /** - * Restores to a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginRestoreCheckpoint( - resourceUri: string, - body: VirtualMachineRestoreCheckpoint, - options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineInstancesRestoreCheckpointResponse - > - >; - /** - * Restores to a checkpoint in virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginRestoreCheckpointAndWait( - resourceUri: string, - body: VirtualMachineRestoreCheckpoint, - options?: VirtualMachineInstancesRestoreCheckpointOptionalParams, - ): Promise; - /** - * The operation to start a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @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 resource. - * @param options The options parameters. - */ - beginStartAndWait( - resourceUri: string, - options?: VirtualMachineInstancesStartOptionalParams, - ): Promise; - /** - * The operation to power off (stop) a virtual machine instance. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginStop( - resourceUri: string, - body: StopVirtualMachineOptions, - 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 resource. - * @param body The content of the action request - * @param options The options parameters. - */ - beginStopAndWait( - resourceUri: string, - body: StopVirtualMachineOptions, - options?: VirtualMachineInstancesStopOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts deleted file mode 100644 index 3786555ed64d..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts +++ /dev/null @@ -1,145 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - VirtualMachineTemplate, - VirtualMachineTemplatesListBySubscriptionOptionalParams, - VirtualMachineTemplatesListByResourceGroupOptionalParams, - VirtualMachineTemplatesGetOptionalParams, - VirtualMachineTemplatesGetResponse, - VirtualMachineTemplatesCreateOrUpdateOptionalParams, - VirtualMachineTemplatesCreateOrUpdateResponse, - VirtualMachineTemplateTagsUpdate, - VirtualMachineTemplatesUpdateOptionalParams, - VirtualMachineTemplatesUpdateResponse, - VirtualMachineTemplatesDeleteOptionalParams, - VirtualMachineTemplatesDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualMachineTemplates. */ -export interface VirtualMachineTemplates { - /** - * List of VirtualMachineTemplates in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VirtualMachineTemplatesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachineTemplatesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements VirtualMachineTemplate GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesGetOptionalParams, - ): Promise; - /** - * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineTemplateName: string, - resource: VirtualMachineTemplate, - options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesCreateOrUpdateResponse - > - >; - /** - * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - resource: VirtualMachineTemplate, - options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineTemplateName: string, - properties: VirtualMachineTemplateTagsUpdate, - options?: VirtualMachineTemplatesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesUpdateResponse - > - >; - /** - * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - properties: VirtualMachineTemplateTagsUpdate, - options?: VirtualMachineTemplatesUpdateOptionalParams, - ): Promise; - /** - * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachineTemplatesDeleteResponse - > - >; - /** - * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineTemplateName: string, - options?: VirtualMachineTemplatesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts deleted file mode 100644 index 805074fb1dad..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts +++ /dev/null @@ -1,145 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - VirtualNetwork, - VirtualNetworksListBySubscriptionOptionalParams, - VirtualNetworksListByResourceGroupOptionalParams, - VirtualNetworksGetOptionalParams, - VirtualNetworksGetResponse, - VirtualNetworksCreateOrUpdateOptionalParams, - VirtualNetworksCreateOrUpdateResponse, - VirtualNetworkTagsUpdate, - VirtualNetworksUpdateOptionalParams, - VirtualNetworksUpdateResponse, - VirtualNetworksDeleteOptionalParams, - VirtualNetworksDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualNetworks. */ -export interface VirtualNetworks { - /** - * List of VirtualNetworks in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VirtualNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualNetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements VirtualNetwork GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksGetOptionalParams, - ): Promise; - /** - * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualNetworkName: string, - resource: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksCreateOrUpdateResponse - > - >; - /** - * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - resource: VirtualNetwork, - options?: VirtualNetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualNetworkName: string, - properties: VirtualNetworkTagsUpdate, - options?: VirtualNetworksUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksUpdateResponse - > - >; - /** - * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualNetworkName: string, - properties: VirtualNetworkTagsUpdate, - options?: VirtualNetworksUpdateOptionalParams, - ): Promise; - /** - * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualNetworksDeleteResponse - > - >; - /** - * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualNetworkName: string, - options?: VirtualNetworksDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmInstanceHybridIdentityMetadatas.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmInstanceHybridIdentityMetadatas.ts deleted file mode 100644 index c20ec9568508..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmInstanceHybridIdentityMetadatas.ts +++ /dev/null @@ -1,38 +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 { - VmInstanceHybridIdentityMetadata, - VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - VmInstanceHybridIdentityMetadatasGetOptionalParams, - VmInstanceHybridIdentityMetadatasGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VmInstanceHybridIdentityMetadatas. */ -export interface VmInstanceHybridIdentityMetadatas { - /** - * Returns the list of HybridIdentityMetadata of the given VM. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - listByVirtualMachineInstance( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - options?: VmInstanceHybridIdentityMetadatasGetOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts deleted file mode 100644 index 20481dcbdd6d..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts +++ /dev/null @@ -1,145 +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 { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - VmmServer, - VmmServersListBySubscriptionOptionalParams, - VmmServersListByResourceGroupOptionalParams, - VmmServersGetOptionalParams, - VmmServersGetResponse, - VmmServersCreateOrUpdateOptionalParams, - VmmServersCreateOrUpdateResponse, - VmmServerTagsUpdate, - VmmServersUpdateOptionalParams, - VmmServersUpdateResponse, - VmmServersDeleteOptionalParams, - VmmServersDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VmmServers. */ -export interface VmmServers { - /** - * List of VmmServers in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VmmServersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VmmServersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Implements VmmServer GET method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersGetOptionalParams, - ): Promise; - /** - * Onboards the SCVmm fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - vmmServerName: string, - resource: VmmServer, - options?: VmmServersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersCreateOrUpdateResponse - > - >; - /** - * Onboards the SCVmm fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - vmmServerName: string, - resource: VmmServer, - options?: VmmServersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - vmmServerName: string, - properties: VmmServerTagsUpdate, - options?: VmmServersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersUpdateResponse - > - >; - /** - * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - vmmServerName: string, - properties: VmmServerTagsUpdate, - options?: VmmServersUpdateOptionalParams, - ): Promise; - /** - * Removes the SCVmm fabric from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VmmServersDeleteResponse - > - >; - /** - * Removes the SCVmm fabric from Azure. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - vmmServerName: string, - options?: VmmServersDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/pagingHelper.ts b/sdk/scvmm/arm-scvmm/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/scvmm/arm-scvmm/src/pagingHelper.ts +++ /dev/null @@ -1,39 +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. - */ - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined, -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/scvmm/arm-scvmm/src/restorePollerHelpers.ts b/sdk/scvmm/arm-scvmm/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..ea8c4aeda594 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/restorePollerHelpers.ts @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScVmmClient } from "./scVmmClient.js"; +import { _guestAgentsCreateDeserialize } from "./api/guestAgents/index.js"; +import { + _virtualMachineInstancesRestoreCheckpointDeserialize, + _virtualMachineInstancesDeleteCheckpointDeserialize, + _virtualMachineInstancesCreateCheckpointDeserialize, + _virtualMachineInstancesRestartDeserialize, + _virtualMachineInstancesStartDeserialize, + _virtualMachineInstancesStopDeserialize, + _virtualMachineInstancesDeleteDeserialize, + _virtualMachineInstancesUpdateDeserialize, + _virtualMachineInstancesCreateOrUpdateDeserialize, +} from "./api/virtualMachineInstances/index.js"; +import { + _availabilitySetsDeleteDeserialize, + _availabilitySetsUpdateDeserialize, + _availabilitySetsCreateOrUpdateDeserialize, +} from "./api/availabilitySets/index.js"; +import { + _virtualMachineTemplatesDeleteDeserialize, + _virtualMachineTemplatesUpdateDeserialize, + _virtualMachineTemplatesCreateOrUpdateDeserialize, +} from "./api/virtualMachineTemplates/index.js"; +import { + _virtualNetworksDeleteDeserialize, + _virtualNetworksUpdateDeserialize, + _virtualNetworksCreateOrUpdateDeserialize, +} from "./api/virtualNetworks/index.js"; +import { + _cloudsDeleteDeserialize, + _cloudsUpdateDeserialize, + _cloudsCreateOrUpdateDeserialize, +} from "./api/clouds/index.js"; +import { + _vmmServersDeleteDeserialize, + _vmmServersUpdateDeserialize, + _vmmServersCreateOrUpdateDeserialize, +} from "./api/vmmServers/index.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: ScVmmClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "PUT /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default": + { + deserializer: _guestAgentsCreateDeserialize, + expectedStatuses: ["200", "201"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint": + { + deserializer: _virtualMachineInstancesRestoreCheckpointDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint": + { + deserializer: _virtualMachineInstancesDeleteCheckpointDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint": + { + deserializer: _virtualMachineInstancesCreateCheckpointDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart": { + deserializer: _virtualMachineInstancesRestartDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start": { + deserializer: _virtualMachineInstancesStartDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop": { + deserializer: _virtualMachineInstancesStopDeserialize, + expectedStatuses: ["202", "200"], + }, + "DELETE /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default": { + deserializer: _virtualMachineInstancesDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default": { + deserializer: _virtualMachineInstancesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default": { + deserializer: _virtualMachineInstancesCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}": + { + deserializer: _availabilitySetsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}": + { + deserializer: _availabilitySetsUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}": + { + deserializer: _availabilitySetsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}": + { + deserializer: _virtualMachineTemplatesDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}": + { + deserializer: _virtualMachineTemplatesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}": + { + deserializer: _virtualMachineTemplatesCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}": + { + deserializer: _virtualNetworksDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}": + { + deserializer: _virtualNetworksUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}": + { + deserializer: _virtualNetworksCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}": + { + deserializer: _cloudsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}": + { + deserializer: _cloudsUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}": + { + deserializer: _cloudsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}": + { + deserializer: _vmmServersDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}": + { + deserializer: _vmmServersUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}": + { + deserializer: _vmmServersCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/scvmm/arm-scvmm/src/scVmm.ts b/sdk/scvmm/arm-scvmm/src/scVmm.ts deleted file mode 100644 index 0b90b62ed9ff..000000000000 --- a/sdk/scvmm/arm-scvmm/src/scVmm.ts +++ /dev/null @@ -1,196 +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 * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - VirtualMachineInstancesImpl, - GuestAgentsImpl, - VmInstanceHybridIdentityMetadatasImpl, - OperationsImpl, - AvailabilitySetsImpl, - CloudsImpl, - VirtualMachineTemplatesImpl, - VirtualNetworksImpl, - VmmServersImpl, - InventoryItemsImpl, -} from "./operations/index.js"; -import { - VirtualMachineInstances, - GuestAgents, - VmInstanceHybridIdentityMetadatas, - Operations, - AvailabilitySets, - Clouds, - VirtualMachineTemplates, - VirtualNetworks, - VmmServers, - InventoryItems, -} from "./operationsInterfaces/index.js"; -import { ScVmmOptionalParams } from "./models/index.js"; - -export class ScVmm extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId?: string; - - /** - * Initializes a new instance of the ScVmm class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: ScVmmOptionalParams, - ); - constructor( - credentials: coreAuth.TokenCredential, - options?: ScVmmOptionalParams, - ); - constructor( - credentials: coreAuth.TokenCredential, - subscriptionIdOrOptions?: ScVmmOptionalParams | string, - options?: ScVmmOptionalParams, - ) { - if (credentials === undefined) { - throw new Error("'credentials' 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 - if (!options) { - options = {}; - } - const defaults: ScVmmOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-scvmm/1.0.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-10-07"; - this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); - this.guestAgents = new GuestAgentsImpl(this); - this.vmInstanceHybridIdentityMetadatas = - new VmInstanceHybridIdentityMetadatasImpl(this); - this.operations = new OperationsImpl(this); - this.availabilitySets = new AvailabilitySetsImpl(this); - this.clouds = new CloudsImpl(this); - this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this); - this.virtualNetworks = new VirtualNetworksImpl(this); - this.vmmServers = new VmmServersImpl(this); - this.inventoryItems = new InventoryItemsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest, - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - }, - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - - virtualMachineInstances: VirtualMachineInstances; - guestAgents: GuestAgents; - vmInstanceHybridIdentityMetadatas: VmInstanceHybridIdentityMetadatas; - operations: Operations; - availabilitySets: AvailabilitySets; - clouds: Clouds; - virtualMachineTemplates: VirtualMachineTemplates; - virtualNetworks: VirtualNetworks; - vmmServers: VmmServers; - inventoryItems: InventoryItems; -} diff --git a/sdk/scvmm/arm-scvmm/src/scVmmClient.ts b/sdk/scvmm/arm-scvmm/src/scVmmClient.ts new file mode 100644 index 000000000000..718e878e6d66 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/scVmmClient.ts @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { _getGuestAgentsOperations, GuestAgentsOperations } from "./classic/guestAgents/index.js"; +import { + _getVmInstanceHybridIdentityMetadatasOperations, + VmInstanceHybridIdentityMetadatasOperations, +} from "./classic/vmInstanceHybridIdentityMetadatas/index.js"; +import { + _getVirtualMachineInstancesOperations, + VirtualMachineInstancesOperations, +} from "./classic/virtualMachineInstances/index.js"; +import { + _getInventoryItemsOperations, + InventoryItemsOperations, +} from "./classic/inventoryItems/index.js"; +import { + _getAvailabilitySetsOperations, + AvailabilitySetsOperations, +} from "./classic/availabilitySets/index.js"; +import { + _getVirtualMachineTemplatesOperations, + VirtualMachineTemplatesOperations, +} from "./classic/virtualMachineTemplates/index.js"; +import { + _getVirtualNetworksOperations, + VirtualNetworksOperations, +} from "./classic/virtualNetworks/index.js"; +import { _getCloudsOperations, CloudsOperations } from "./classic/clouds/index.js"; +import { _getVmmServersOperations, VmmServersOperations } from "./classic/vmmServers/index.js"; +import { _getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; +import { createScVmm, ScVmmContext, ScVmmClientOptionalParams } from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { ScVmmClientOptionalParams } from "./api/scVmmContext.js"; + +export class ScVmmClient { + private _client: ScVmmContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + /** The Microsoft.ScVmm Rest API spec. */ + constructor( + credential: TokenCredential, + subscriptionId: string, + options: ScVmmClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createScVmm(credential, subscriptionId, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.guestAgents = _getGuestAgentsOperations(this._client); + this.vmInstanceHybridIdentityMetadatas = _getVmInstanceHybridIdentityMetadatasOperations( + this._client, + ); + this.virtualMachineInstances = _getVirtualMachineInstancesOperations(this._client); + this.inventoryItems = _getInventoryItemsOperations(this._client); + this.availabilitySets = _getAvailabilitySetsOperations(this._client); + this.virtualMachineTemplates = _getVirtualMachineTemplatesOperations(this._client); + this.virtualNetworks = _getVirtualNetworksOperations(this._client); + this.clouds = _getCloudsOperations(this._client); + this.vmmServers = _getVmmServersOperations(this._client); + this.operations = _getOperationsOperations(this._client); + } + + /** The operation groups for guestAgents */ + public readonly guestAgents: GuestAgentsOperations; + /** The operation groups for vmInstanceHybridIdentityMetadatas */ + public readonly vmInstanceHybridIdentityMetadatas: VmInstanceHybridIdentityMetadatasOperations; + /** The operation groups for virtualMachineInstances */ + public readonly virtualMachineInstances: VirtualMachineInstancesOperations; + /** The operation groups for inventoryItems */ + public readonly inventoryItems: InventoryItemsOperations; + /** The operation groups for availabilitySets */ + public readonly availabilitySets: AvailabilitySetsOperations; + /** The operation groups for virtualMachineTemplates */ + public readonly virtualMachineTemplates: VirtualMachineTemplatesOperations; + /** The operation groups for virtualNetworks */ + public readonly virtualNetworks: VirtualNetworksOperations; + /** The operation groups for clouds */ + public readonly clouds: CloudsOperations; + /** The operation groups for vmmServers */ + public readonly vmmServers: VmmServersOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; +} diff --git a/sdk/scvmm/arm-scvmm/src/static-helpers/pagingHelpers.ts b/sdk/scvmm/arm-scvmm/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..ce33af5f4178 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).get(); + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/scvmm/arm-scvmm/src/static-helpers/pollingHelpers.ts b/sdk/scvmm/arm-scvmm/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..f01c41bab69d --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client.pathUnchecked(path).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/scvmm/arm-scvmm/test/public/sampleTest.spec.ts b/sdk/scvmm/arm-scvmm/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/scvmm/arm-scvmm/test/public/utils/recordedClient.ts b/sdk/scvmm/arm-scvmm/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/scvmm/arm-scvmm/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/scvmm/arm-scvmm/test/scvmm_operations_test.spec.ts b/sdk/scvmm/arm-scvmm/test/scvmm_operations_test.spec.ts deleted file mode 100644 index feeb5cc722cb..000000000000 --- a/sdk/scvmm/arm-scvmm/test/scvmm_operations_test.spec.ts +++ /dev/null @@ -1,55 +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 { env, Recorder, RecorderStartOptions, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { ScVmm } from "../src/scVmm.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888", -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Scvmm test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ScVmm; - - beforeEach(async (ctx) => { - recorder = new Recorder(ctx); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new ScVmm(credential, subscriptionId, recorder.configureClientOptions({})); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("operation list test", async () => { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/scvmm/arm-scvmm/test/snippets.spec.ts b/sdk/scvmm/arm-scvmm/test/snippets.spec.ts deleted file mode 100644 index 56dcd02d689b..000000000000 --- a/sdk/scvmm/arm-scvmm/test/snippets.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ScVmm } from "../src/index.js"; -import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; -import { setLogLevel } from "@azure/logger"; -import { describe, it } from "vitest"; - -describe("snippets", () => { - it("ReadmeSampleCreateClient_Node", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ScVmm(new DefaultAzureCredential(), subscriptionId); - }); - - it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", - }); - const client = new ScVmm(credential, subscriptionId); - }); - - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/scvmm/arm-scvmm/tsconfig.browser.config.json b/sdk/scvmm/arm-scvmm/tsconfig.browser.config.json index 0c8bafa97126..75871518e3a0 100644 --- a/sdk/scvmm/arm-scvmm/tsconfig.browser.config.json +++ b/sdk/scvmm/arm-scvmm/tsconfig.browser.config.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.test.json", - "../../../tsconfig.browser.base.json" - ] + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] } diff --git a/sdk/scvmm/arm-scvmm/tsconfig.samples.json b/sdk/scvmm/arm-scvmm/tsconfig.samples.json index c64149cc9265..630847c7b6cc 100644 --- a/sdk/scvmm/arm-scvmm/tsconfig.samples.json +++ b/sdk/scvmm/arm-scvmm/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-scvmm": [ - "./dist/esm" - ] + "@azure/arm-scvmm": ["./dist/esm"] } } } diff --git a/sdk/scvmm/arm-scvmm/tsconfig.test.json b/sdk/scvmm/arm-scvmm/tsconfig.test.json index 3c2b783a8c1b..290ca214aebc 100644 --- a/sdk/scvmm/arm-scvmm/tsconfig.test.json +++ b/sdk/scvmm/arm-scvmm/tsconfig.test.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/scvmm/arm-scvmm/tsp-location.yaml b/sdk/scvmm/arm-scvmm/tsp-location.yaml new file mode 100644 index 000000000000..f91edb529037 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/scvmm/ScVmm.Management +commit: 605911b2bdd478dadd4b68f5f97d9491131c74e2 +repo: ../azure-rest-api-specs +additionalDirectories: