From 868dcc182258e47006ef5b38a9e258c89b4adebc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 27 Sep 2024 04:04:51 +0000 Subject: [PATCH] CodeGen from PR 30768 in Azure/azure-rest-api-specs Merge f857628ff2d7bfaaefb117ed52ddcd5f082fdad0 into 139840784c38414085b3d799cee5545f9b6e8dec --- common/config/rush/pnpm-lock.yaml | 8 +- sdk/standbypool/arm-standbypool/CHANGELOG.md | 24 ++++ sdk/standbypool/arm-standbypool/README.md | 24 ++-- sdk/standbypool/arm-standbypool/assets.json | 6 - .../arm-standbypool/eslint.config.mjs | 6 +- sdk/standbypool/arm-standbypool/package.json | 98 +++++++------ .../review/arm-standbypool-api.api.md | 85 +++++++++++ .../review/arm-standbypool-models.api.md | 47 ++++-- .../review/arm-standbypool.api.md | 47 ++++-- sdk/standbypool/arm-standbypool/sample.env | 1 - .../samples-dev/operationsListSample.ts | 29 ---- ...ContainerGroupPoolRuntimeViewsGetSample.ts | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.ts | 32 ----- ...ContainerGroupPoolsCreateOrUpdateSample.ts | 42 ------ .../standbyContainerGroupPoolsDeleteSample.ts | 24 ---- .../standbyContainerGroupPoolsGetSample.ts | 25 ---- ...inerGroupPoolsListByResourceGroupSample.ts | 29 ---- ...ainerGroupPoolsListBySubscriptionSample.ts | 29 ---- .../standbyContainerGroupPoolsUpdateSample.ts | 41 ------ ...VirtualMachinePoolRuntimeViewsGetSample.ts | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.ts | 32 ----- ...VirtualMachinePoolsCreateOrUpdateSample.ts | 34 ----- .../standbyVirtualMachinePoolsDeleteSample.ts | 24 ---- .../standbyVirtualMachinePoolsGetSample.ts | 25 ---- ...alMachinePoolsListByResourceGroupSample.ts | 29 ---- ...ualMachinePoolsListBySubscriptionSample.ts | 29 ---- .../standbyVirtualMachinePoolsUpdateSample.ts | 33 ----- .../standbyVirtualMachinesGetSample.ts | 25 ---- ...StandbyVirtualMachinePoolResourceSample.ts | 32 ----- .../samples/v1/javascript/README.md | 86 ----------- .../v1/javascript/operationsListSample.js | 29 ---- .../samples/v1/javascript/package.json | 33 ----- .../samples/v1/javascript/sample.env | 1 - ...ContainerGroupPoolRuntimeViewsGetSample.js | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.js | 32 ----- ...ContainerGroupPoolsCreateOrUpdateSample.js | 42 ------ .../standbyContainerGroupPoolsDeleteSample.js | 24 ---- .../standbyContainerGroupPoolsGetSample.js | 25 ---- ...inerGroupPoolsListByResourceGroupSample.js | 29 ---- ...ainerGroupPoolsListBySubscriptionSample.js | 29 ---- .../standbyContainerGroupPoolsUpdateSample.js | 41 ------ ...VirtualMachinePoolRuntimeViewsGetSample.js | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.js | 32 ----- ...VirtualMachinePoolsCreateOrUpdateSample.js | 34 ----- .../standbyVirtualMachinePoolsDeleteSample.js | 24 ---- .../standbyVirtualMachinePoolsGetSample.js | 25 ---- ...alMachinePoolsListByResourceGroupSample.js | 29 ---- ...ualMachinePoolsListBySubscriptionSample.js | 29 ---- .../standbyVirtualMachinePoolsUpdateSample.js | 33 ----- .../standbyVirtualMachinesGetSample.js | 25 ---- ...StandbyVirtualMachinePoolResourceSample.js | 32 ----- .../samples/v1/typescript/README.md | 99 ------------- .../samples/v1/typescript/package.json | 42 ------ .../samples/v1/typescript/sample.env | 1 - .../v1/typescript/src/operationsListSample.ts | 29 ---- ...ContainerGroupPoolRuntimeViewsGetSample.ts | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.ts | 32 ----- ...ContainerGroupPoolsCreateOrUpdateSample.ts | 42 ------ .../standbyContainerGroupPoolsDeleteSample.ts | 24 ---- .../standbyContainerGroupPoolsGetSample.ts | 25 ---- ...inerGroupPoolsListByResourceGroupSample.ts | 29 ---- ...ainerGroupPoolsListBySubscriptionSample.ts | 29 ---- .../standbyContainerGroupPoolsUpdateSample.ts | 41 ------ ...VirtualMachinePoolRuntimeViewsGetSample.ts | 29 ---- ...PoolRuntimeViewsListByStandbyPoolSample.ts | 32 ----- ...VirtualMachinePoolsCreateOrUpdateSample.ts | 34 ----- .../standbyVirtualMachinePoolsDeleteSample.ts | 24 ---- .../standbyVirtualMachinePoolsGetSample.ts | 25 ---- ...alMachinePoolsListByResourceGroupSample.ts | 29 ---- ...ualMachinePoolsListBySubscriptionSample.ts | 29 ---- .../standbyVirtualMachinePoolsUpdateSample.ts | 33 ----- .../src/standbyVirtualMachinesGetSample.ts | 25 ---- ...StandbyVirtualMachinePoolResourceSample.ts | 32 ----- .../samples/v1/typescript/tsconfig.json | 17 --- .../index.ts | 30 ++-- .../api/standbyContainerGroupPools/index.ts | 124 ++++++++++------ .../src/api/standbyPoolManagementContext.ts | 10 +- .../index.ts | 32 +++-- .../api/standbyVirtualMachinePools/index.ts | 75 +++++++--- .../src/api/standbyVirtualMachines/index.ts | 6 +- .../src/classic/operations/index.ts | 11 +- .../standbyContainerGroupPools/index.ts | 15 +- .../standbyVirtualMachinePools/index.ts | 15 +- .../classic/standbyVirtualMachines/index.ts | 5 +- .../src/helpers/serializerHelpers.ts | 12 +- sdk/standbypool/arm-standbypool/src/index.ts | 7 +- .../arm-standbypool/src/models/index.ts | 7 +- .../arm-standbypool/src/models/models.ts | 134 ++++++++++++------ .../arm-standbypool/src/models/options.ts | 33 +++-- .../src/restorePollerHelpers.ts | 26 +++- .../src/standbyPoolManagementClient.ts | 22 ++- .../src/static-helpers/pagingHelpers.ts | 55 +++++-- .../src/static-helpers/pollingHelpers.ts | 19 ++- .../test/public/sampleTest.spec.ts | 21 +++ .../standbypool_operations_test.spec.ts | 48 ------- .../test/public/utils/recordedClient.ts | 14 +- sdk/standbypool/arm-standbypool/tsconfig.json | 6 +- .../arm-standbypool/tsp-location.yaml | 6 +- .../arm-standbypool/vitest.browser.config.ts | 1 - .../arm-standbypool/vitest.config.ts | 1 - sdk/standbypool/ci.mgmt.yml | 5 +- 101 files changed, 742 insertions(+), 2339 deletions(-) delete mode 100644 sdk/standbypool/arm-standbypool/assets.json create mode 100644 sdk/standbypool/arm-standbypool/review/arm-standbypool-api.api.md delete mode 100644 sdk/standbypool/arm-standbypool/sample.env delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/operationsListSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsCreateOrUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsDeleteSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListByResourceGroupSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListBySubscriptionSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsCreateOrUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsDeleteSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListByResourceGroupSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListBySubscriptionSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/README.md delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/operationsListSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/package.json delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/sample.env delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsGetSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsCreateOrUpdateSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsDeleteSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsGetSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListByResourceGroupSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListBySubscriptionSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsUpdateSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsGetSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsCreateOrUpdateSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsDeleteSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsGetSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListByResourceGroupSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListBySubscriptionSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsUpdateSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesGetSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/README.md delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/sample.env delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/operationsListSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsCreateOrUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsDeleteSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListByResourceGroupSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListBySubscriptionSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsCreateOrUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsDeleteSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListByResourceGroupSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListBySubscriptionSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsUpdateSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesGetSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts delete mode 100644 sdk/standbypool/arm-standbypool/samples/v1/typescript/tsconfig.json create mode 100644 sdk/standbypool/arm-standbypool/test/public/sampleTest.spec.ts delete mode 100644 sdk/standbypool/arm-standbypool/test/public/standbypool_operations_test.spec.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0c39bffa5ee4..e0c785dd32f9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -16732,7 +16732,7 @@ packages: dev: false file:projects/arm-mongocluster.tgz: - resolution: {integrity: sha512-5qfO0a31+swfnXGpyq3cmrbZ8Bj0tsLzx4frzixKRWNYsjpj3dbGiuLoIQDzcaw7mADeSVcXqduGOLAPxhtsdw==, tarball: file:projects/arm-mongocluster.tgz} + resolution: {integrity: sha512-EU8WPXxVnF2TP9sFdHD+Fhu0oD4WBj2gtulPY6pw393PtU2cp7IyaeETiBLyH2xxw4WRCyX1pjtNxADgOWpq1g==, tarball: file:projects/arm-mongocluster.tgz} name: '@rush-temp/arm-mongocluster' version: 0.0.0 dependencies: @@ -18984,7 +18984,7 @@ packages: dev: false file:projects/arm-standbypool.tgz: - resolution: {integrity: sha512-cZ+3KqNhZXQ8w2JL3VlYce2KrfDPCXGHgRqZQiOUbujloVx+MYlARSceN8vLAF1WdVx2Mpz/R1xQQmKgPnLA6A==, tarball: file:projects/arm-standbypool.tgz} + resolution: {integrity: sha512-RA7FbmDLZOkNF8NGzmcG2AzyQ/IlvajjibpOkVM7IdTgHFhumThLzssHoB44fKP9DYImkzGxxmtzpaUSmy/TEw==, tarball: file:projects/arm-standbypool.tgz} name: '@rush-temp/arm-standbypool' version: 0.0.0 dependencies: @@ -18997,7 +18997,7 @@ packages: '@types/chai': 4.3.19 '@types/mocha': 10.0.8 '@types/node': 18.19.50 - '@vitest/browser': 2.1.1(playwright@1.47.2)(typescript@5.6.2)(vitest@2.1.1) + '@vitest/browser': 2.1.1(playwright@1.47.2)(typescript@5.5.4)(vitest@2.1.1) '@vitest/coverage-istanbul': 2.1.1(vitest@2.1.1) chai: 4.3.10 cross-env: 7.0.3 @@ -19012,7 +19012,7 @@ packages: ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.6.2) tshy: 1.18.0 tslib: 2.7.0 - typescript: 5.6.2 + typescript: 5.5.4 uglify-js: 3.19.3 vitest: 2.1.1(@types/node@18.19.50)(@vitest/browser@2.1.1) transitivePeerDependencies: diff --git a/sdk/standbypool/arm-standbypool/CHANGELOG.md b/sdk/standbypool/arm-standbypool/CHANGELOG.md index d4f28b48a25a..0534529911f3 100644 --- a/sdk/standbypool/arm-standbypool/CHANGELOG.md +++ b/sdk/standbypool/arm-standbypool/CHANGELOG.md @@ -1,5 +1,29 @@ # Release History +## 2.0.0 (2024-09-27) + +### Features Added + + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Type Alias ResourceProvisioningState + - Added Type Alias Versions + - Added Enum KnownResourceProvisioningState + - Enum KnownOrigin has a new value "user,system" + - Enum KnownOrigin has a new value system + - Enum KnownOrigin has a new value user + - Enum KnownRefillPolicy has a new value always + +### Breaking Changes + + - Removed Enum KnownProvisioningState + - Enum KnownOrigin no longer has value System + - Enum KnownOrigin no longer has value User + - Enum KnownOrigin no longer has value UserSystem + - Enum KnownRefillPolicy no longer has value Always + + ## 1.0.0 (2024-09-11) ### Features Added diff --git a/sdk/standbypool/arm-standbypool/README.md b/sdk/standbypool/arm-standbypool/README.md index 6d7900d04072..b34f5b67f4ec 100644 --- a/sdk/standbypool/arm-standbypool/README.md +++ b/sdk/standbypool/arm-standbypool/README.md @@ -1,13 +1,11 @@ -# Azure StandbyPoolManagement client library for JavaScript +# Azure StandbyPool client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure StandbyPoolManagement client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure StandbyPool client. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/standbypool/arm-standbypool) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-standbypool) | [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-standbypool?view=azure-node-preview) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -24,16 +22,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP ### Install the `@azure/arm-standbypool` package -Install the Azure StandbyPoolManagement client library for JavaScript with `npm`: +Install the Azure StandbyPool client library for JavaScript with `npm`: ```bash npm install @azure/arm-standbypool ``` -### Create and authenticate a `StandbyPoolManagementClient` +### Create and authenticate a `StandbyPoolClient` -To create a client object to access the Azure StandbyPoolManagement API, you will need the `endpoint` of your Azure StandbyPoolManagement resource and a `credential`. The Azure StandbyPoolManagement client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure StandbyPoolManagement resource in the [Azure Portal][azure_portal]. +To create a client object to access the Azure StandbyPool API, you will need the `endpoint` of your Azure StandbyPool resource and a `credential`. The Azure StandbyPool client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure StandbyPool resource in the [Azure Portal][azure_portal]. You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). @@ -49,19 +47,19 @@ Set the values of the client ID, tenant ID, and client secret of the AAD applica For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); +const { StandbyPoolClient } = require("@azure/arm-standbypool"); 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 StandbyPoolManagementClient(new DefaultAzureCredential(), subscriptionId); +const client = new StandbyPoolClient(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new StandbyPoolManagementClient(credential, subscriptionId); +// const client = new StandbyPoolClient(credential, subscriptionId); ``` @@ -70,9 +68,9 @@ To use this client library in the browser, first you need to use a bundler. For ## Key concepts -### StandbyPoolManagementClient +### StandbyPoolClient -`StandbyPoolManagementClient` is the primary interface for developers using the Azure StandbyPoolManagement client library. Explore the methods on this client object to understand the different features of the Azure StandbyPoolManagement service that you can access. +`StandbyPoolClient` is the primary interface for developers using the Azure StandbyPool client library. Explore the methods on this client object to understand the different features of the Azure StandbyPool service that you can access. ## Troubleshooting diff --git a/sdk/standbypool/arm-standbypool/assets.json b/sdk/standbypool/arm-standbypool/assets.json deleted file mode 100644 index 445398fbebea..000000000000 --- a/sdk/standbypool/arm-standbypool/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/standbypool/arm-standbypool", - "Tag": "js/standbypool/arm-standbypool_28160fe3fd" -} diff --git a/sdk/standbypool/arm-standbypool/eslint.config.mjs b/sdk/standbypool/arm-standbypool/eslint.config.mjs index 03244d34a19f..113bdc3eaf5f 100644 --- a/sdk/standbypool/arm-standbypool/eslint.config.mjs +++ b/sdk/standbypool/arm-standbypool/eslint.config.mjs @@ -11,7 +11,7 @@ export default [ "@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", - }, - }, + "tsdoc/syntax": "warn" + } + } ]; diff --git a/sdk/standbypool/arm-standbypool/package.json b/sdk/standbypool/arm-standbypool/package.json index 68f03daea2a0..a7cada8f3894 100644 --- a/sdk/standbypool/arm-standbypool/package.json +++ b/sdk/standbypool/arm-standbypool/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-standbypool", - "version": "1.0.0", + "version": "2.0.0", "description": "A generated SDK for StandbyPoolClient.", "engines": { "node": ">=18.0.0" @@ -11,6 +11,7 @@ "exports": { "./package.json": "./package.json", ".": "./src/index.ts", + "./api": "./src/api/index.ts", "./models": "./src/models/index.ts" }, "dialects": [ @@ -56,68 +57,59 @@ ] }, "dependencies": { + "@azure/core-util": "^1.9.2", "@azure-rest/core-client": "^2.1.0", - "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", - "@azure/core-lro": "^3.0.0", "@azure/core-rest-pipeline": "^1.5.0", - "@azure/core-util": "^1.9.2", "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" + "tslib": "^2.6.2", + "@azure/core-lro": "^3.0.0", + "@azure/abort-controller": "^2.1.2" }, "devDependencies": { - "@azure-tools/test-credential": "^2.0.0", - "@azure-tools/test-recorder": "^4.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.2.1", + "dotenv": "^16.0.0", "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "@vitest/browser": "^2.0.5", - "@vitest/coverage-istanbul": "^2.0.5", - "dotenv": "^16.0.0", "eslint": "^8.55.0", - "mkdirp": "^3.0.1", - "playwright": "^1.41.2", "prettier": "^3.2.5", "rimraf": "^5.0.5", + "mkdirp": "^3.0.1", + "typescript": "~5.5.3", "tshy": "^1.11.1", - "typescript": "~5.6.2", - "vitest": "^2.0.5" + "@azure/identity": "^4.2.1", + "@vitest/browser": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.5", + "playwright": "^1.41.2", + "vitest": "^2.0.5", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0" }, "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build": "npm run clean && tshy && mkdirp ./review && dev-tool run extract-api", - "build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f", - "build:test": "npm run clean && tshy && 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}\" \"samples-dev/*.ts\"", "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "dev-tool samples run samples-dev", "extract-api": "rimraf review && mkdirp ./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}\" \"samples-dev/*.ts\"", - "generate:client": "echo skipped", + "pack": "npm pack 2>&1", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", - "lint": "echo skipped", - "lint:fix": "echo skipped", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build:samples": "echo skipped", + "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}\" ", + "execute:samples": "echo skipped", + "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", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "build:test": "npm run clean && tshy && dev-tool run build-test", + "build": "npm run clean && tshy && mkdirp ./review && dev-tool run extract-api", "test:node": "npm run clean && tshy && 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": "npm run build:test && dev-tool run test:vitest --browser", - "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "echo skipped" - }, - "//sampleConfiguration": { - "productName": "@azure/arm-standbypool", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-standbypool?view=azure-node-preview" + "test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test" }, "exports": { "./package.json": "./package.json", @@ -143,6 +135,28 @@ "default": "./dist/commonjs/index.js" } }, + "./api": { + "browser": { + "source": "./src/api/index.ts", + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "source": "./src/api/index.ts", + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "source": "./src/api/index.ts", + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "source": "./src/api/index.ts", + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, "./models": { "browser": { "source": "./src/models/index.ts", diff --git a/sdk/standbypool/arm-standbypool/review/arm-standbypool-api.api.md b/sdk/standbypool/arm-standbypool/review/arm-standbypool-api.api.md new file mode 100644 index 000000000000..fbb3ccccb62b --- /dev/null +++ b/sdk/standbypool/arm-standbypool/review/arm-standbypool-api.api.md @@ -0,0 +1,85 @@ +## API Report File for "@azure/arm-standbypool" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; + +// @public (undocumented) +export function createStandbyPoolManagement(credential: TokenCredential, options?: StandbyPoolManagementClientOptionalParams): StandbyPoolContext; + +// @public +export function operationsList(context: StandbyPoolContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyContainerGroupPoolRuntimeViewsGet(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, runtimeView: string, options?: StandbyContainerGroupPoolRuntimeViewsGetOptionalParams): Promise; + +// @public +export function standbyContainerGroupPoolRuntimeViewsListByStandbyPool(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, options?: StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyContainerGroupPoolsCreateOrUpdate(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, resource: StandbyContainerGroupPoolResource, options?: StandbyContainerGroupPoolsCreateOrUpdateOptionalParams): PollerLike, StandbyContainerGroupPoolResource>; + +// @public +export function standbyContainerGroupPoolsDelete(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, options?: StandbyContainerGroupPoolsDeleteOptionalParams): PollerLike, void>; + +// @public +export function standbyContainerGroupPoolsGet(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, options?: StandbyContainerGroupPoolsGetOptionalParams): Promise; + +// @public +export function standbyContainerGroupPoolsListByResourceGroup(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, options?: StandbyContainerGroupPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyContainerGroupPoolsListBySubscription(context: StandbyPoolContext, subscriptionId: string, options?: StandbyContainerGroupPoolsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyContainerGroupPoolsUpdate(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyContainerGroupPoolName: string, properties: StandbyContainerGroupPoolResourceUpdate, options?: StandbyContainerGroupPoolsUpdateOptionalParams): Promise; + +// @public (undocumented) +export interface StandbyPoolContext extends Client { +} + +// @public +export interface StandbyPoolManagementClientOptionalParams extends ClientOptions { + apiVersion?: string; +} + +// @public +export function standbyVirtualMachinePoolRuntimeViewsGet(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, runtimeView: string, options?: StandbyVirtualMachinePoolRuntimeViewsGetOptionalParams): Promise; + +// @public +export function standbyVirtualMachinePoolRuntimeViewsListByStandbyPool(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, options?: StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyVirtualMachinePoolsCreateOrUpdate(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, resource: StandbyVirtualMachinePoolResource, options?: StandbyVirtualMachinePoolsCreateOrUpdateOptionalParams): PollerLike, StandbyVirtualMachinePoolResource>; + +// @public +export function standbyVirtualMachinePoolsDelete(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, options?: StandbyVirtualMachinePoolsDeleteOptionalParams): PollerLike, void>; + +// @public +export function standbyVirtualMachinePoolsGet(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, options?: StandbyVirtualMachinePoolsGetOptionalParams): Promise; + +// @public +export function standbyVirtualMachinePoolsListByResourceGroup(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, options?: StandbyVirtualMachinePoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyVirtualMachinePoolsListBySubscription(context: StandbyPoolContext, subscriptionId: string, options?: StandbyVirtualMachinePoolsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function standbyVirtualMachinePoolsUpdate(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, properties: StandbyVirtualMachinePoolResourceUpdate, options?: StandbyVirtualMachinePoolsUpdateOptionalParams): Promise; + +// @public +export function standbyVirtualMachinesGet(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, standbyVirtualMachineName: string, options?: StandbyVirtualMachinesGetOptionalParams): Promise; + +// @public +export function standbyVirtualMachinesListByStandbyVirtualMachinePoolResource(context: StandbyPoolContext, subscriptionId: string, resourceGroupName: string, standbyVirtualMachinePoolName: string, options?: StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceOptionalParams): PagedAsyncIterableIterator; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/standbypool/arm-standbypool/review/arm-standbypool-models.api.md b/sdk/standbypool/arm-standbypool/review/arm-standbypool-models.api.md index 72b428d685ba..e443df085d36 100644 --- a/sdk/standbypool/arm-standbypool/review/arm-standbypool-models.api.md +++ b/sdk/standbypool/arm-standbypool/review/arm-standbypool-models.api.md @@ -29,6 +29,26 @@ export interface ContainerGroupProperties { // @public export type CreatedByType = 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 enum KnownActionType { Internal = "Internal" @@ -44,22 +64,21 @@ export enum KnownCreatedByType { // @public export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + "user,system" = "user,system", + system = "system", + user = "user" } // @public -export enum KnownProvisioningState { - Canceled = "Canceled", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded" +export enum KnownRefillPolicy { + always = "always" } // @public -export enum KnownRefillPolicy { - Always = "always" +export enum KnownResourceProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" } // @public @@ -99,7 +118,7 @@ export interface PoolResourceStateCount { } // @public -export type ProvisioningState = string; +export type ProvisioningState = string | ResourceProvisioningState | "Deleting"; // @public export interface ProxyResource extends Resource { @@ -116,6 +135,9 @@ export interface Resource { readonly type?: string; } +// @public +export type ResourceProvisioningState = string; + // @public export interface StandbyContainerGroupPoolElasticityProfile { maxReadyCapacity: number; @@ -308,6 +330,9 @@ export interface TrackedResource extends Resource { tags?: Record; } +// @public +export type Versions = "2023-12-01-preview" | "2024-03-01-preview" | "2024-03-01"; + // @public export interface VirtualMachineInstanceCountSummary { instanceCountsByState: PoolResourceStateCount[]; diff --git a/sdk/standbypool/arm-standbypool/review/arm-standbypool.api.md b/sdk/standbypool/arm-standbypool/review/arm-standbypool.api.md index 4a77b7ef7436..ec99b1ce4c81 100644 --- a/sdk/standbypool/arm-standbypool/review/arm-standbypool.api.md +++ b/sdk/standbypool/arm-standbypool/review/arm-standbypool.api.md @@ -41,6 +41,26 @@ export type ContinuablePage = TPage & { // @public export type CreatedByType = 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 enum KnownActionType { Internal = "Internal" @@ -56,22 +76,21 @@ export enum KnownCreatedByType { // @public export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + "user,system" = "user,system", + system = "system", + user = "user" } // @public -export enum KnownProvisioningState { - Canceled = "Canceled", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded" +export enum KnownRefillPolicy { + always = "always" } // @public -export enum KnownRefillPolicy { - Always = "always" +export enum KnownResourceProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" } // @public @@ -128,7 +147,7 @@ export interface PoolResourceStateCount { } // @public -export type ProvisioningState = string; +export type ProvisioningState = string | ResourceProvisioningState | "Deleting"; // @public export interface ProxyResource extends Resource { @@ -145,6 +164,9 @@ export interface Resource { readonly type?: string; } +// @public +export type ResourceProvisioningState = string; + // @public export function restorePoller(client: StandbyPoolManagementClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; @@ -402,6 +424,9 @@ export interface TrackedResource extends Resource { tags?: Record; } +// @public +export type Versions = "2023-12-01-preview" | "2024-03-01-preview" | "2024-03-01"; + // @public export interface VirtualMachineInstanceCountSummary { instanceCountsByState: PoolResourceStateCount[]; diff --git a/sdk/standbypool/arm-standbypool/sample.env b/sdk/standbypool/arm-standbypool/sample.env deleted file mode 100644 index efbc7787bd3b..000000000000 --- a/sdk/standbypool/arm-standbypool/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. diff --git a/sdk/standbypool/arm-standbypool/samples-dev/operationsListSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/operationsListSample.ts deleted file mode 100644 index 49bd314d08e6..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-03-01/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsGetSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsGetSample.ts deleted file mode 100644 index c332e9b97753..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolRuntimeViewResource - * - * @summary get a StandbyContainerGroupPoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json - */ -async function standbyContainerGroupPoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts deleted file mode 100644 index 9b2cec06f54c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * - * @summary list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyContainerGroupPoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsCreateOrUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsCreateOrUpdateSample.ts deleted file mode 100644 index bdaeaf05da9c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a StandbyContainerGroupPoolResource - * - * @summary create a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json - */ -async function standbyContainerGroupPoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 688, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 1, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsDeleteSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsDeleteSample.ts deleted file mode 100644 index 3cd4b4c38705..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a StandbyContainerGroupPoolResource - * - * @summary delete a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json - */ -async function standbyContainerGroupPoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyContainerGroupPools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyContainerGroupPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsGetSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsGetSample.ts deleted file mode 100644 index 1ac71a70ed77..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolResource - * - * @summary get a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json - */ -async function standbyContainerGroupPoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListByResourceGroupSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListByResourceGroupSample.ts deleted file mode 100644 index 685eed5edd66..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by resource group - * - * @summary list StandbyContainerGroupPoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json - */ -async function standbyContainerGroupPoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListBySubscriptionSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListBySubscriptionSample.ts deleted file mode 100644 index 0e388ebccf42..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by subscription ID - * - * @summary list StandbyContainerGroupPoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json - */ -async function standbyContainerGroupPoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsUpdateSample.ts deleted file mode 100644 index 635c23982de8..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyContainerGroupPoolsUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a StandbyContainerGroupPoolResource - * - * @summary update a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json - */ -async function standbyContainerGroupPoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 1743, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 2, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsGetSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsGetSample.ts deleted file mode 100644 index 7811a499ab75..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolRuntimeViewResource - * - * @summary get a StandbyVirtualMachinePoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json - */ -async function standbyVirtualMachinePoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts deleted file mode 100644 index f0636418c0f2..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyVirtualMachinePoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsCreateOrUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsCreateOrUpdateSample.ts deleted file mode 100644 index 9e01b5253953..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a StandbyVirtualMachinePoolResource - * - * @summary create a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json - */ -async function standbyVirtualMachinePoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsDeleteSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsDeleteSample.ts deleted file mode 100644 index 13854a5b536c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a StandbyVirtualMachinePoolResource - * - * @summary delete a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json - */ -async function standbyVirtualMachinePoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyVirtualMachinePools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyVirtualMachinePoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsGetSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsGetSample.ts deleted file mode 100644 index 6e711be3f83b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolResource - * - * @summary get a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json - */ -async function standbyVirtualMachinePoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListByResourceGroupSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListByResourceGroupSample.ts deleted file mode 100644 index 0d33c9646b67..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by resource group - * - * @summary list StandbyVirtualMachinePoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json - */ -async function standbyVirtualMachinePoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListBySubscriptionSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListBySubscriptionSample.ts deleted file mode 100644 index 95e2eb31d0f1..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by subscription ID - * - * @summary list StandbyVirtualMachinePoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json - */ -async function standbyVirtualMachinePoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsUpdateSample.ts deleted file mode 100644 index 2651641d2f1f..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinePoolsUpdateSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a StandbyVirtualMachinePoolResource - * - * @summary update a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json - */ -async function standbyVirtualMachinePoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesGetSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesGetSample.ts deleted file mode 100644 index 6a6003decb48..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachineResource - * - * @summary get a StandbyVirtualMachineResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json - */ -async function standbyVirtualMachinesGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachines.get("rgstandbypool", "pool", "virtualMachine"); - console.log(result); -} - -async function main() { - standbyVirtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts b/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts deleted file mode 100644 index d92be150cea1..000000000000 --- a/sdk/standbypool/arm-standbypool/samples-dev/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json - */ -async function standbyVirtualMachinesListByStandbyVirtualMachinePoolResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachines.listByStandbyVirtualMachinePoolResource( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinesListByStandbyVirtualMachinePoolResource(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/README.md b/sdk/standbypool/arm-standbypool/samples/v1/javascript/README.md deleted file mode 100644 index bd76b2ad7a92..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# @azure/arm-mongocluster client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for @azure/arm-mongocluster in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-03-01/Operations_List.json | -| [standbyContainerGroupPoolRuntimeViewsGetSample.js][standbycontainergrouppoolruntimeviewsgetsample] | get a StandbyContainerGroupPoolRuntimeViewResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json | -| [standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js][standbycontainergrouppoolruntimeviewslistbystandbypoolsample] | list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json | -| [standbyContainerGroupPoolsCreateOrUpdateSample.js][standbycontainergrouppoolscreateorupdatesample] | create a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json | -| [standbyContainerGroupPoolsDeleteSample.js][standbycontainergrouppoolsdeletesample] | delete a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json | -| [standbyContainerGroupPoolsGetSample.js][standbycontainergrouppoolsgetsample] | get a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json | -| [standbyContainerGroupPoolsListByResourceGroupSample.js][standbycontainergrouppoolslistbyresourcegroupsample] | list StandbyContainerGroupPoolResource resources by resource group x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json | -| [standbyContainerGroupPoolsListBySubscriptionSample.js][standbycontainergrouppoolslistbysubscriptionsample] | list StandbyContainerGroupPoolResource resources by subscription ID x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json | -| [standbyContainerGroupPoolsUpdateSample.js][standbycontainergrouppoolsupdatesample] | update a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json | -| [standbyVirtualMachinePoolRuntimeViewsGetSample.js][standbyvirtualmachinepoolruntimeviewsgetsample] | get a StandbyVirtualMachinePoolRuntimeViewResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json | -| [standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js][standbyvirtualmachinepoolruntimeviewslistbystandbypoolsample] | list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json | -| [standbyVirtualMachinePoolsCreateOrUpdateSample.js][standbyvirtualmachinepoolscreateorupdatesample] | create a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json | -| [standbyVirtualMachinePoolsDeleteSample.js][standbyvirtualmachinepoolsdeletesample] | delete a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json | -| [standbyVirtualMachinePoolsGetSample.js][standbyvirtualmachinepoolsgetsample] | get a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json | -| [standbyVirtualMachinePoolsListByResourceGroupSample.js][standbyvirtualmachinepoolslistbyresourcegroupsample] | list StandbyVirtualMachinePoolResource resources by resource group x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json | -| [standbyVirtualMachinePoolsListBySubscriptionSample.js][standbyvirtualmachinepoolslistbysubscriptionsample] | list StandbyVirtualMachinePoolResource resources by subscription ID x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json | -| [standbyVirtualMachinePoolsUpdateSample.js][standbyvirtualmachinepoolsupdatesample] | update a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json | -| [standbyVirtualMachinesGetSample.js][standbyvirtualmachinesgetsample] | get a StandbyVirtualMachineResource x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json | -| [standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js][standbyvirtualmachineslistbystandbyvirtualmachinepoolresourcesample] | list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.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 operationsListSample.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 cross-env node operationsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/operationsListSample.js -[standbycontainergrouppoolruntimeviewsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsGetSample.js -[standbycontainergrouppoolruntimeviewslistbystandbypoolsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js -[standbycontainergrouppoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsCreateOrUpdateSample.js -[standbycontainergrouppoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsDeleteSample.js -[standbycontainergrouppoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsGetSample.js -[standbycontainergrouppoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListByResourceGroupSample.js -[standbycontainergrouppoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListBySubscriptionSample.js -[standbycontainergrouppoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsUpdateSample.js -[standbyvirtualmachinepoolruntimeviewsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsGetSample.js -[standbyvirtualmachinepoolruntimeviewslistbystandbypoolsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js -[standbyvirtualmachinepoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsCreateOrUpdateSample.js -[standbyvirtualmachinepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsDeleteSample.js -[standbyvirtualmachinepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsGetSample.js -[standbyvirtualmachinepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListByResourceGroupSample.js -[standbyvirtualmachinepoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListBySubscriptionSample.js -[standbyvirtualmachinepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsUpdateSample.js -[standbyvirtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesGetSample.js -[standbyvirtualmachineslistbystandbyvirtualmachinepoolresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mongocluster?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/standbypool/arm-standbypool/README.md diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/operationsListSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index d6dbab938f6e..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/operationsListSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-03-01/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/package.json b/sdk/standbypool/arm-standbypool/samples/v1/javascript/package.json deleted file mode 100644 index 7982e96b6d2f..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@azure-samples/arm-standbypool-js", - "private": true, - "version": "1.0.0", - "description": "@azure/arm-mongocluster 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/standbypool/arm-standbypool" - }, - "keywords": [ - "node", - "azure", - "cloud", - "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/standbypool/arm-standbypool", - "dependencies": { - "@azure/arm-standbypool": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/sample.env b/sdk/standbypool/arm-standbypool/samples/v1/javascript/sample.env deleted file mode 100644 index efbc7787bd3b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsGetSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsGetSample.js deleted file mode 100644 index ddff44922df2..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolRuntimeViewResource - * - * @summary get a StandbyContainerGroupPoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json - */ -async function standbyContainerGroupPoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js deleted file mode 100644 index 64e50ef1a2f2..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * - * @summary list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyContainerGroupPoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsCreateOrUpdateSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsCreateOrUpdateSample.js deleted file mode 100644 index f2ef7760110b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a StandbyContainerGroupPoolResource - * - * @summary create a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json - */ -async function standbyContainerGroupPoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 688, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 1, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsDeleteSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsDeleteSample.js deleted file mode 100644 index a0760841001b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a StandbyContainerGroupPoolResource - * - * @summary delete a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json - */ -async function standbyContainerGroupPoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyContainerGroupPools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyContainerGroupPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsGetSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsGetSample.js deleted file mode 100644 index 44cc7784b4dd..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolResource - * - * @summary get a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json - */ -async function standbyContainerGroupPoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListByResourceGroupSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListByResourceGroupSample.js deleted file mode 100644 index 838225acbda9..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListByResourceGroupSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by resource group - * - * @summary list StandbyContainerGroupPoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json - */ -async function standbyContainerGroupPoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListBySubscriptionSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListBySubscriptionSample.js deleted file mode 100644 index 09e0eb540cdf..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by subscription ID - * - * @summary list StandbyContainerGroupPoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json - */ -async function standbyContainerGroupPoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsUpdateSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsUpdateSample.js deleted file mode 100644 index e598c600adab..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyContainerGroupPoolsUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to update a StandbyContainerGroupPoolResource - * - * @summary update a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json - */ -async function standbyContainerGroupPoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 1743, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 2, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsGetSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsGetSample.js deleted file mode 100644 index d1f1e08138a6..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolRuntimeViewResource - * - * @summary get a StandbyVirtualMachinePoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json - */ -async function standbyVirtualMachinePoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js deleted file mode 100644 index b102d89ad26d..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyVirtualMachinePoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsCreateOrUpdateSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsCreateOrUpdateSample.js deleted file mode 100644 index 9ba9b77815ec..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to create a StandbyVirtualMachinePoolResource - * - * @summary create a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json - */ -async function standbyVirtualMachinePoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsDeleteSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsDeleteSample.js deleted file mode 100644 index 756873e734c9..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsDeleteSample.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to delete a StandbyVirtualMachinePoolResource - * - * @summary delete a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json - */ -async function standbyVirtualMachinePoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyVirtualMachinePools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyVirtualMachinePoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsGetSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsGetSample.js deleted file mode 100644 index 47a36aceebc7..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolResource - * - * @summary get a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json - */ -async function standbyVirtualMachinePoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListByResourceGroupSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListByResourceGroupSample.js deleted file mode 100644 index 14c93af15d74..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListByResourceGroupSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by resource group - * - * @summary list StandbyVirtualMachinePoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json - */ -async function standbyVirtualMachinePoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListBySubscriptionSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListBySubscriptionSample.js deleted file mode 100644 index 96974219b753..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by subscription ID - * - * @summary list StandbyVirtualMachinePoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json - */ -async function standbyVirtualMachinePoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsUpdateSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsUpdateSample.js deleted file mode 100644 index 1b76e1315f80..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinePoolsUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to update a StandbyVirtualMachinePoolResource - * - * @summary update a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json - */ -async function standbyVirtualMachinePoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesGetSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesGetSample.js deleted file mode 100644 index 9e042802bb00..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to get a StandbyVirtualMachineResource - * - * @summary get a StandbyVirtualMachineResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json - */ -async function standbyVirtualMachinesGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachines.get("rgstandbypool", "pool", "virtualMachine"); - console.log(result); -} - -async function main() { - standbyVirtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js b/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js deleted file mode 100644 index 1928117b3382..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/javascript/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { StandbyPoolManagementClient } = require("@azure/arm-standbypool"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json - */ -async function standbyVirtualMachinesListByStandbyVirtualMachinePoolResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachines.listByStandbyVirtualMachinePoolResource( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinesListByStandbyVirtualMachinePoolResource(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/README.md b/sdk/standbypool/arm-standbypool/samples/v1/typescript/README.md deleted file mode 100644 index 99f53c34078b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# @azure/arm-mongocluster client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for @azure/arm-mongocluster in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-03-01/Operations_List.json | -| [standbyContainerGroupPoolRuntimeViewsGetSample.ts][standbycontainergrouppoolruntimeviewsgetsample] | get a StandbyContainerGroupPoolRuntimeViewResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json | -| [standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts][standbycontainergrouppoolruntimeviewslistbystandbypoolsample] | list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json | -| [standbyContainerGroupPoolsCreateOrUpdateSample.ts][standbycontainergrouppoolscreateorupdatesample] | create a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json | -| [standbyContainerGroupPoolsDeleteSample.ts][standbycontainergrouppoolsdeletesample] | delete a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json | -| [standbyContainerGroupPoolsGetSample.ts][standbycontainergrouppoolsgetsample] | get a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json | -| [standbyContainerGroupPoolsListByResourceGroupSample.ts][standbycontainergrouppoolslistbyresourcegroupsample] | list StandbyContainerGroupPoolResource resources by resource group x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json | -| [standbyContainerGroupPoolsListBySubscriptionSample.ts][standbycontainergrouppoolslistbysubscriptionsample] | list StandbyContainerGroupPoolResource resources by subscription ID x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json | -| [standbyContainerGroupPoolsUpdateSample.ts][standbycontainergrouppoolsupdatesample] | update a StandbyContainerGroupPoolResource x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json | -| [standbyVirtualMachinePoolRuntimeViewsGetSample.ts][standbyvirtualmachinepoolruntimeviewsgetsample] | get a StandbyVirtualMachinePoolRuntimeViewResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json | -| [standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts][standbyvirtualmachinepoolruntimeviewslistbystandbypoolsample] | list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json | -| [standbyVirtualMachinePoolsCreateOrUpdateSample.ts][standbyvirtualmachinepoolscreateorupdatesample] | create a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json | -| [standbyVirtualMachinePoolsDeleteSample.ts][standbyvirtualmachinepoolsdeletesample] | delete a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json | -| [standbyVirtualMachinePoolsGetSample.ts][standbyvirtualmachinepoolsgetsample] | get a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json | -| [standbyVirtualMachinePoolsListByResourceGroupSample.ts][standbyvirtualmachinepoolslistbyresourcegroupsample] | list StandbyVirtualMachinePoolResource resources by resource group x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json | -| [standbyVirtualMachinePoolsListBySubscriptionSample.ts][standbyvirtualmachinepoolslistbysubscriptionsample] | list StandbyVirtualMachinePoolResource resources by subscription ID x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json | -| [standbyVirtualMachinePoolsUpdateSample.ts][standbyvirtualmachinepoolsupdatesample] | update a StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json | -| [standbyVirtualMachinesGetSample.ts][standbyvirtualmachinesgetsample] | get a StandbyVirtualMachineResource x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json | -| [standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts][standbyvirtualmachineslistbystandbyvirtualmachinepoolresourcesample] | list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.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/operationsListSample.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 cross-env node dist/operationsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/operationsListSample.ts -[standbycontainergrouppoolruntimeviewsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsGetSample.ts -[standbycontainergrouppoolruntimeviewslistbystandbypoolsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts -[standbycontainergrouppoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsCreateOrUpdateSample.ts -[standbycontainergrouppoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsDeleteSample.ts -[standbycontainergrouppoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsGetSample.ts -[standbycontainergrouppoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListByResourceGroupSample.ts -[standbycontainergrouppoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListBySubscriptionSample.ts -[standbycontainergrouppoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsUpdateSample.ts -[standbyvirtualmachinepoolruntimeviewsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsGetSample.ts -[standbyvirtualmachinepoolruntimeviewslistbystandbypoolsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts -[standbyvirtualmachinepoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsCreateOrUpdateSample.ts -[standbyvirtualmachinepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsDeleteSample.ts -[standbyvirtualmachinepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsGetSample.ts -[standbyvirtualmachinepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListByResourceGroupSample.ts -[standbyvirtualmachinepoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListBySubscriptionSample.ts -[standbyvirtualmachinepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsUpdateSample.ts -[standbyvirtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesGetSample.ts -[standbyvirtualmachineslistbystandbyvirtualmachinepoolresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mongocluster?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/standbypool/arm-standbypool/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json b/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json deleted file mode 100644 index 2eaad5074105..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@azure-samples/arm-standbypool-ts", - "private": true, - "version": "1.0.0", - "description": "@azure/arm-mongocluster 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/standbypool/arm-standbypool" - }, - "keywords": [ - "node", - "azure", - "cloud", - "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/standbypool/arm-standbypool", - "dependencies": { - "@azure/arm-standbypool": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.6.2", - "rimraf": "latest" - } -} diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/sample.env b/sdk/standbypool/arm-standbypool/samples/v1/typescript/sample.env deleted file mode 100644 index efbc7787bd3b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/operationsListSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 49bd314d08e6..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2024-03-01/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsGetSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsGetSample.ts deleted file mode 100644 index c332e9b97753..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolRuntimeViewResource - * - * @summary get a StandbyContainerGroupPoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json - */ -async function standbyContainerGroupPoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts deleted file mode 100644 index 9b2cec06f54c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolRuntimeViewsListByStandbyPoolSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * - * @summary list StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyContainerGroupPoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsCreateOrUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsCreateOrUpdateSample.ts deleted file mode 100644 index bdaeaf05da9c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a StandbyContainerGroupPoolResource - * - * @summary create a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json - */ -async function standbyContainerGroupPoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 688, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 1, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsDeleteSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsDeleteSample.ts deleted file mode 100644 index 3cd4b4c38705..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a StandbyContainerGroupPoolResource - * - * @summary delete a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json - */ -async function standbyContainerGroupPoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyContainerGroupPools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyContainerGroupPoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsGetSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsGetSample.ts deleted file mode 100644 index 1ac71a70ed77..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyContainerGroupPoolResource - * - * @summary get a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json - */ -async function standbyContainerGroupPoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListByResourceGroupSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListByResourceGroupSample.ts deleted file mode 100644 index 685eed5edd66..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by resource group - * - * @summary list StandbyContainerGroupPoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json - */ -async function standbyContainerGroupPoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListBySubscriptionSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListBySubscriptionSample.ts deleted file mode 100644 index 0e388ebccf42..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyContainerGroupPoolResource resources by subscription ID - * - * @summary list StandbyContainerGroupPoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json - */ -async function standbyContainerGroupPoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyContainerGroupPools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyContainerGroupPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsUpdateSample.ts deleted file mode 100644 index 635c23982de8..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyContainerGroupPoolsUpdateSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a StandbyContainerGroupPoolResource - * - * @summary update a StandbyContainerGroupPoolResource - * x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json - */ -async function standbyContainerGroupPoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyContainerGroupPools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 1743, refillPolicy: "always" }, - containerGroupProperties: { - containerGroupProfile: { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile", - revision: 2, - }, - subnetIds: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet", - }, - ], - }, - }, - }); - console.log(result); -} - -async function main() { - standbyContainerGroupPoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsGetSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsGetSample.ts deleted file mode 100644 index 7811a499ab75..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolRuntimeViewResource - * - * @summary get a StandbyVirtualMachinePoolRuntimeViewResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json - */ -async function standbyVirtualMachinePoolRuntimeViewsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePoolRuntimeViews.get( - "rgstandbypool", - "pool", - "latest", - ); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts deleted file mode 100644 index f0636418c0f2..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json - */ -async function standbyVirtualMachinePoolRuntimeViewsListByStandbyPool() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePoolRuntimeViews.listByStandbyPool( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolRuntimeViewsListByStandbyPool(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsCreateOrUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsCreateOrUpdateSample.ts deleted file mode 100644 index 9e01b5253953..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create a StandbyVirtualMachinePoolResource - * - * @summary create a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json - */ -async function standbyVirtualMachinePoolsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.createOrUpdate("rgstandbypool", "pool", { - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - tags: {}, - location: "West US", - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsDeleteSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsDeleteSample.ts deleted file mode 100644 index 13854a5b536c..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsDeleteSample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete a StandbyVirtualMachinePoolResource - * - * @summary delete a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json - */ -async function standbyVirtualMachinePoolsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - await client.standbyVirtualMachinePools.delete("rgstandbypool", "pool"); -} - -async function main() { - standbyVirtualMachinePoolsDelete(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsGetSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsGetSample.ts deleted file mode 100644 index 6e711be3f83b..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachinePoolResource - * - * @summary get a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json - */ -async function standbyVirtualMachinePoolsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.get("rgstandbypool", "pool"); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListByResourceGroupSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListByResourceGroupSample.ts deleted file mode 100644 index 0d33c9646b67..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by resource group - * - * @summary list StandbyVirtualMachinePoolResource resources by resource group - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json - */ -async function standbyVirtualMachinePoolsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listByResourceGroup("rgstandbypool")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListBySubscriptionSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListBySubscriptionSample.ts deleted file mode 100644 index 95e2eb31d0f1..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachinePoolResource resources by subscription ID - * - * @summary list StandbyVirtualMachinePoolResource resources by subscription ID - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json - */ -async function standbyVirtualMachinePoolsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachinePools.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinePoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsUpdateSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsUpdateSample.ts deleted file mode 100644 index 2651641d2f1f..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinePoolsUpdateSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update a StandbyVirtualMachinePoolResource - * - * @summary update a StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json - */ -async function standbyVirtualMachinePoolsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachinePools.update("rgstandbypool", "pool", { - tags: {}, - properties: { - elasticityProfile: { maxReadyCapacity: 304, minReadyCapacity: 300 }, - virtualMachineState: "Running", - attachedVirtualMachineScaleSetId: - "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss", - }, - }); - console.log(result); -} - -async function main() { - standbyVirtualMachinePoolsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesGetSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesGetSample.ts deleted file mode 100644 index 6a6003decb48..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to get a StandbyVirtualMachineResource - * - * @summary get a StandbyVirtualMachineResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json - */ -async function standbyVirtualMachinesGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const result = await client.standbyVirtualMachines.get("rgstandbypool", "pool", "virtualMachine"); - console.log(result); -} - -async function main() { - standbyVirtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts b/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts deleted file mode 100644 index d92be150cea1..000000000000 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/src/standbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { StandbyPoolManagementClient } from "@azure/arm-standbypool"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * - * @summary list StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource - * x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json - */ -async function standbyVirtualMachinesListByStandbyVirtualMachinePoolResource() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-000000000009"; - const client = new StandbyPoolManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.standbyVirtualMachines.listByStandbyVirtualMachinePoolResource( - "rgstandbypool", - "pool", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - standbyVirtualMachinesListByStandbyVirtualMachinePoolResource(); -} - -main().catch(console.error); diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/tsconfig.json b/sdk/standbypool/arm-standbypool/samples/v1/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/standbypool/arm-standbypool/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/standbypool/arm-standbypool/src/api/standbyContainerGroupPoolRuntimeViews/index.ts b/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPoolRuntimeViews/index.ts index 055fce3dae78..fd339beabd3e 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPoolRuntimeViews/index.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPoolRuntimeViews/index.ts @@ -73,11 +73,15 @@ export async function _standbyContainerGroupPoolRuntimeViewsGetDeserialize( properties: !result.body.properties ? undefined : { - instanceCountSummary: result.body.properties?.["instanceCountSummary"].map((p: any) => { + instanceCountSummary: result.body.properties?.[ + "instanceCountSummary" + ].map((p: any) => { return { - instanceCountsByState: p["instanceCountsByState"].map((p: any) => { - return { state: p["state"], count: p["count"] }; - }), + instanceCountsByState: p["instanceCountsByState"].map( + (p: any) => { + return { state: p["state"], count: p["count"] }; + }, + ), }; }), provisioningState: result.body.properties?.["provisioningState"], @@ -159,13 +163,17 @@ export async function _standbyContainerGroupPoolRuntimeViewsListByStandbyPoolDes properties: !p.properties ? undefined : { - instanceCountSummary: p.properties?.["instanceCountSummary"].map((p: any) => { - return { - instanceCountsByState: p["instanceCountsByState"].map((p: any) => { - return { state: p["state"], count: p["count"] }; - }), - }; - }), + instanceCountSummary: p.properties?.["instanceCountSummary"].map( + (p: any) => { + return { + instanceCountsByState: p["instanceCountsByState"].map( + (p: any) => { + return { state: p["state"], count: p["count"] }; + }, + ), + }; + }, + ), provisioningState: p.properties?.["provisioningState"], }, }; diff --git a/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPools/index.ts b/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPools/index.ts index 3b0621773a94..80b3db122619 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPools/index.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyContainerGroupPools/index.ts @@ -16,11 +16,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { StandbyContainerGroupPoolsGetOptionalParams, @@ -82,19 +82,26 @@ export async function _standbyContainerGroupPoolsGetDeserialize( ? undefined : { elasticityProfile: { - maxReadyCapacity: result.body.properties?.elasticityProfile["maxReadyCapacity"], - refillPolicy: result.body.properties?.elasticityProfile["refillPolicy"], + maxReadyCapacity: + result.body.properties?.elasticityProfile["maxReadyCapacity"], + refillPolicy: + result.body.properties?.elasticityProfile["refillPolicy"], }, containerGroupProperties: { containerGroupProfile: { - id: result.body.properties?.containerGroupProperties.containerGroupProfile["id"], + id: result.body.properties?.containerGroupProperties + .containerGroupProfile["id"], revision: - result.body.properties?.containerGroupProperties.containerGroupProfile["revision"], + result.body.properties?.containerGroupProperties + .containerGroupProfile["revision"], }, subnetIds: - result.body.properties?.containerGroupProperties["subnetIds"] === undefined + result.body.properties?.containerGroupProperties["subnetIds"] === + undefined ? result.body.properties?.containerGroupProperties["subnetIds"] - : result.body.properties?.containerGroupProperties["subnetIds"].map((p: any) => { + : result.body.properties?.containerGroupProperties[ + "subnetIds" + ].map((p: any) => { return { id: p["id"] }; }), }, @@ -141,11 +148,15 @@ export function _standbyContainerGroupPoolsCreateOrUpdateSend( .put({ ...operationOptionsToRequestParameters(options), body: { - tags: !resource.tags ? resource.tags : (serializeRecord(resource.tags as any) as any), + tags: !resource.tags + ? resource.tags + : (serializeRecord(resource.tags as any) as any), location: resource["location"], properties: !resource.properties ? resource.properties - : standbyContainerGroupPoolResourcePropertiesSerializer(resource.properties), + : standbyContainerGroupPoolResourcePropertiesSerializer( + resource.properties, + ), }, }); } @@ -184,19 +195,26 @@ export async function _standbyContainerGroupPoolsCreateOrUpdateDeserialize( ? undefined : { elasticityProfile: { - maxReadyCapacity: result.body.properties?.elasticityProfile["maxReadyCapacity"], - refillPolicy: result.body.properties?.elasticityProfile["refillPolicy"], + maxReadyCapacity: + result.body.properties?.elasticityProfile["maxReadyCapacity"], + refillPolicy: + result.body.properties?.elasticityProfile["refillPolicy"], }, containerGroupProperties: { containerGroupProfile: { - id: result.body.properties?.containerGroupProperties.containerGroupProfile["id"], + id: result.body.properties?.containerGroupProperties + .containerGroupProfile["id"], revision: - result.body.properties?.containerGroupProperties.containerGroupProfile["revision"], + result.body.properties?.containerGroupProperties + .containerGroupProfile["revision"], }, subnetIds: - result.body.properties?.containerGroupProperties["subnetIds"] === undefined + result.body.properties?.containerGroupProperties["subnetIds"] === + undefined ? result.body.properties?.containerGroupProperties["subnetIds"] - : result.body.properties?.containerGroupProperties["subnetIds"].map((p: any) => { + : result.body.properties?.containerGroupProperties[ + "subnetIds" + ].map((p: any) => { return { id: p["id"] }; }), }, @@ -235,7 +253,6 @@ export function standbyContainerGroupPoolsCreateOrUpdate( resource, options, ), - resourceLocationConfig: "azure-async-operation", }, ) as PollerLike< OperationState, @@ -298,7 +315,6 @@ export function standbyContainerGroupPoolsDelete( standbyContainerGroupPoolName, options, ), - resourceLocationConfig: "location", }, ) as PollerLike, void>; } @@ -323,10 +339,14 @@ export function _standbyContainerGroupPoolsUpdateSend( .patch({ ...operationOptionsToRequestParameters(options), body: { - tags: !properties.tags ? properties.tags : (serializeRecord(properties.tags as any) as any), + tags: !properties.tags + ? properties.tags + : (serializeRecord(properties.tags as any) as any), properties: !properties.properties ? properties.properties - : standbyContainerGroupPoolResourceUpdatePropertiesSerializer(properties.properties), + : standbyContainerGroupPoolResourceUpdatePropertiesSerializer( + properties.properties, + ), }, }); } @@ -365,19 +385,26 @@ export async function _standbyContainerGroupPoolsUpdateDeserialize( ? undefined : { elasticityProfile: { - maxReadyCapacity: result.body.properties?.elasticityProfile["maxReadyCapacity"], - refillPolicy: result.body.properties?.elasticityProfile["refillPolicy"], + maxReadyCapacity: + result.body.properties?.elasticityProfile["maxReadyCapacity"], + refillPolicy: + result.body.properties?.elasticityProfile["refillPolicy"], }, containerGroupProperties: { containerGroupProfile: { - id: result.body.properties?.containerGroupProperties.containerGroupProfile["id"], + id: result.body.properties?.containerGroupProperties + .containerGroupProfile["id"], revision: - result.body.properties?.containerGroupProperties.containerGroupProfile["revision"], + result.body.properties?.containerGroupProperties + .containerGroupProfile["revision"], }, subnetIds: - result.body.properties?.containerGroupProperties["subnetIds"] === undefined + result.body.properties?.containerGroupProperties["subnetIds"] === + undefined ? result.body.properties?.containerGroupProperties["subnetIds"] - : result.body.properties?.containerGroupProperties["subnetIds"].map((p: any) => { + : result.body.properties?.containerGroupProperties[ + "subnetIds" + ].map((p: any) => { return { id: p["id"] }; }), }, @@ -461,21 +488,27 @@ export async function _standbyContainerGroupPoolsListByResourceGroupDeserialize( ? undefined : { elasticityProfile: { - maxReadyCapacity: p.properties?.elasticityProfile["maxReadyCapacity"], + maxReadyCapacity: + p.properties?.elasticityProfile["maxReadyCapacity"], refillPolicy: p.properties?.elasticityProfile["refillPolicy"], }, containerGroupProperties: { containerGroupProfile: { - id: p.properties?.containerGroupProperties.containerGroupProfile["id"], + id: p.properties?.containerGroupProperties + .containerGroupProfile["id"], revision: - p.properties?.containerGroupProperties.containerGroupProfile["revision"], + p.properties?.containerGroupProperties + .containerGroupProfile["revision"], }, subnetIds: - p.properties?.containerGroupProperties["subnetIds"] === undefined + p.properties?.containerGroupProperties["subnetIds"] === + undefined ? p.properties?.containerGroupProperties["subnetIds"] - : p.properties?.containerGroupProperties["subnetIds"].map((p: any) => { - return { id: p["id"] }; - }), + : p.properties?.containerGroupProperties["subnetIds"].map( + (p: any) => { + return { id: p["id"] }; + }, + ), }, provisioningState: p.properties?.["provisioningState"], }, @@ -560,21 +593,27 @@ export async function _standbyContainerGroupPoolsListBySubscriptionDeserialize( ? undefined : { elasticityProfile: { - maxReadyCapacity: p.properties?.elasticityProfile["maxReadyCapacity"], + maxReadyCapacity: + p.properties?.elasticityProfile["maxReadyCapacity"], refillPolicy: p.properties?.elasticityProfile["refillPolicy"], }, containerGroupProperties: { containerGroupProfile: { - id: p.properties?.containerGroupProperties.containerGroupProfile["id"], + id: p.properties?.containerGroupProperties + .containerGroupProfile["id"], revision: - p.properties?.containerGroupProperties.containerGroupProfile["revision"], + p.properties?.containerGroupProperties + .containerGroupProfile["revision"], }, subnetIds: - p.properties?.containerGroupProperties["subnetIds"] === undefined + p.properties?.containerGroupProperties["subnetIds"] === + undefined ? p.properties?.containerGroupProperties["subnetIds"] - : p.properties?.containerGroupProperties["subnetIds"].map((p: any) => { - return { id: p["id"] }; - }), + : p.properties?.containerGroupProperties["subnetIds"].map( + (p: any) => { + return { id: p["id"] }; + }, + ), }, provisioningState: p.properties?.["provisioningState"], }, @@ -594,7 +633,12 @@ export function standbyContainerGroupPoolsListBySubscription( ): PagedAsyncIterableIterator { return buildPagedAsyncIterator( context, - () => _standbyContainerGroupPoolsListBySubscriptionSend(context, subscriptionId, options), + () => + _standbyContainerGroupPoolsListBySubscriptionSend( + context, + subscriptionId, + options, + ), _standbyContainerGroupPoolsListBySubscriptionDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" }, diff --git a/sdk/standbypool/arm-standbypool/src/api/standbyPoolManagementContext.ts b/sdk/standbypool/arm-standbypool/src/api/standbyPoolManagementContext.ts index 6d1f98845197..0339c278dbe8 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyPoolManagementContext.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyPoolManagementContext.ts @@ -8,7 +8,8 @@ import { logger } from "../logger.js"; export interface StandbyPoolContext extends Client {} /** Optional parameters for the client. */ -export interface StandbyPoolManagementClientOptionalParams extends ClientOptions { +export interface StandbyPoolManagementClientOptionalParams + extends ClientOptions { /** The API version to use for this operation. */ apiVersion?: string; } @@ -17,10 +18,13 @@ export function createStandbyPoolManagement( credential: TokenCredential, options: StandbyPoolManagementClientOptionalParams = {}, ): StandbyPoolContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; + const endpointUrl = + options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api"; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api` + : "azsdk-js-api"; const { apiVersion: _, ...updatedOptions } = { ...options, userAgentOptions: { userAgentPrefix }, diff --git a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePoolRuntimeViews/index.ts b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePoolRuntimeViews/index.ts index 0e05d5a92b04..fb4e3d4c5742 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePoolRuntimeViews/index.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePoolRuntimeViews/index.ts @@ -73,12 +73,16 @@ export async function _standbyVirtualMachinePoolRuntimeViewsGetDeserialize( properties: !result.body.properties ? undefined : { - instanceCountSummary: result.body.properties?.["instanceCountSummary"].map((p: any) => { + instanceCountSummary: result.body.properties?.[ + "instanceCountSummary" + ].map((p: any) => { return { zone: p["zone"], - instanceCountsByState: p["instanceCountsByState"].map((p: any) => { - return { state: p["state"], count: p["count"] }; - }), + instanceCountsByState: p["instanceCountsByState"].map( + (p: any) => { + return { state: p["state"], count: p["count"] }; + }, + ), }; }), provisioningState: result.body.properties?.["provisioningState"], @@ -160,14 +164,18 @@ export async function _standbyVirtualMachinePoolRuntimeViewsListByStandbyPoolDes properties: !p.properties ? undefined : { - instanceCountSummary: p.properties?.["instanceCountSummary"].map((p: any) => { - return { - zone: p["zone"], - instanceCountsByState: p["instanceCountsByState"].map((p: any) => { - return { state: p["state"], count: p["count"] }; - }), - }; - }), + instanceCountSummary: p.properties?.["instanceCountSummary"].map( + (p: any) => { + return { + zone: p["zone"], + instanceCountsByState: p["instanceCountsByState"].map( + (p: any) => { + return { state: p["state"], count: p["count"] }; + }, + ), + }; + }, + ), provisioningState: p.properties?.["provisioningState"], }, }; diff --git a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePools/index.ts b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePools/index.ts index 57ff863d266c..b84374b9bfd7 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePools/index.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachinePools/index.ts @@ -16,11 +16,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { StandbyVirtualMachinePoolsGetOptionalParams, @@ -84,8 +84,14 @@ export async function _standbyVirtualMachinePoolsGetDeserialize( elasticityProfile: !result.body.properties?.elasticityProfile ? undefined : { - maxReadyCapacity: result.body.properties?.elasticityProfile?.["maxReadyCapacity"], - minReadyCapacity: result.body.properties?.elasticityProfile?.["minReadyCapacity"], + maxReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "maxReadyCapacity" + ], + minReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "minReadyCapacity" + ], }, virtualMachineState: result.body.properties?.["virtualMachineState"], attachedVirtualMachineScaleSetId: @@ -133,11 +139,15 @@ export function _standbyVirtualMachinePoolsCreateOrUpdateSend( .put({ ...operationOptionsToRequestParameters(options), body: { - tags: !resource.tags ? resource.tags : (serializeRecord(resource.tags as any) as any), + tags: !resource.tags + ? resource.tags + : (serializeRecord(resource.tags as any) as any), location: resource["location"], properties: !resource.properties ? resource.properties - : standbyVirtualMachinePoolResourcePropertiesSerializer(resource.properties), + : standbyVirtualMachinePoolResourcePropertiesSerializer( + resource.properties, + ), }, }); } @@ -178,8 +188,14 @@ export async function _standbyVirtualMachinePoolsCreateOrUpdateDeserialize( elasticityProfile: !result.body.properties?.elasticityProfile ? undefined : { - maxReadyCapacity: result.body.properties?.elasticityProfile?.["maxReadyCapacity"], - minReadyCapacity: result.body.properties?.elasticityProfile?.["minReadyCapacity"], + maxReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "maxReadyCapacity" + ], + minReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "minReadyCapacity" + ], }, virtualMachineState: result.body.properties?.["virtualMachineState"], attachedVirtualMachineScaleSetId: @@ -219,7 +235,6 @@ export function standbyVirtualMachinePoolsCreateOrUpdate( resource, options, ), - resourceLocationConfig: "azure-async-operation", }, ) as PollerLike< OperationState, @@ -282,7 +297,6 @@ export function standbyVirtualMachinePoolsDelete( standbyVirtualMachinePoolName, options, ), - resourceLocationConfig: "location", }, ) as PollerLike, void>; } @@ -307,10 +321,14 @@ export function _standbyVirtualMachinePoolsUpdateSend( .patch({ ...operationOptionsToRequestParameters(options), body: { - tags: !properties.tags ? properties.tags : (serializeRecord(properties.tags as any) as any), + tags: !properties.tags + ? properties.tags + : (serializeRecord(properties.tags as any) as any), properties: !properties.properties ? properties.properties - : standbyVirtualMachinePoolResourceUpdatePropertiesSerializer(properties.properties), + : standbyVirtualMachinePoolResourceUpdatePropertiesSerializer( + properties.properties, + ), }, }); } @@ -351,8 +369,14 @@ export async function _standbyVirtualMachinePoolsUpdateDeserialize( elasticityProfile: !result.body.properties?.elasticityProfile ? undefined : { - maxReadyCapacity: result.body.properties?.elasticityProfile?.["maxReadyCapacity"], - minReadyCapacity: result.body.properties?.elasticityProfile?.["minReadyCapacity"], + maxReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "maxReadyCapacity" + ], + minReadyCapacity: + result.body.properties?.elasticityProfile?.[ + "minReadyCapacity" + ], }, virtualMachineState: result.body.properties?.["virtualMachineState"], attachedVirtualMachineScaleSetId: @@ -439,11 +463,14 @@ export async function _standbyVirtualMachinePoolsListByResourceGroupDeserialize( elasticityProfile: !p.properties?.elasticityProfile ? undefined : { - maxReadyCapacity: p.properties?.elasticityProfile?.["maxReadyCapacity"], - minReadyCapacity: p.properties?.elasticityProfile?.["minReadyCapacity"], + maxReadyCapacity: + p.properties?.elasticityProfile?.["maxReadyCapacity"], + minReadyCapacity: + p.properties?.elasticityProfile?.["minReadyCapacity"], }, virtualMachineState: p.properties?.["virtualMachineState"], - attachedVirtualMachineScaleSetId: p.properties?.["attachedVirtualMachineScaleSetId"], + attachedVirtualMachineScaleSetId: + p.properties?.["attachedVirtualMachineScaleSetId"], provisioningState: p.properties?.["provisioningState"], }, }; @@ -529,11 +556,14 @@ export async function _standbyVirtualMachinePoolsListBySubscriptionDeserialize( elasticityProfile: !p.properties?.elasticityProfile ? undefined : { - maxReadyCapacity: p.properties?.elasticityProfile?.["maxReadyCapacity"], - minReadyCapacity: p.properties?.elasticityProfile?.["minReadyCapacity"], + maxReadyCapacity: + p.properties?.elasticityProfile?.["maxReadyCapacity"], + minReadyCapacity: + p.properties?.elasticityProfile?.["minReadyCapacity"], }, virtualMachineState: p.properties?.["virtualMachineState"], - attachedVirtualMachineScaleSetId: p.properties?.["attachedVirtualMachineScaleSetId"], + attachedVirtualMachineScaleSetId: + p.properties?.["attachedVirtualMachineScaleSetId"], provisioningState: p.properties?.["provisioningState"], }, }; @@ -552,7 +582,12 @@ export function standbyVirtualMachinePoolsListBySubscription( ): PagedAsyncIterableIterator { return buildPagedAsyncIterator( context, - () => _standbyVirtualMachinePoolsListBySubscriptionSend(context, subscriptionId, options), + () => + _standbyVirtualMachinePoolsListBySubscriptionSend( + context, + subscriptionId, + options, + ), _standbyVirtualMachinePoolsListBySubscriptionDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" }, diff --git a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachines/index.ts b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachines/index.ts index 3c94a437bb30..259025a42bc1 100644 --- a/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachines/index.ts +++ b/sdk/standbypool/arm-standbypool/src/api/standbyVirtualMachines/index.ts @@ -71,7 +71,8 @@ export async function _standbyVirtualMachinesGetDeserialize( properties: !result.body.properties ? undefined : { - virtualMachineResourceId: result.body.properties?.["virtualMachineResourceId"], + virtualMachineResourceId: + result.body.properties?.["virtualMachineResourceId"], provisioningState: result.body.properties?.["provisioningState"], }, }; @@ -149,7 +150,8 @@ export async function _standbyVirtualMachinesListByStandbyVirtualMachinePoolReso properties: !p.properties ? undefined : { - virtualMachineResourceId: p.properties?.["virtualMachineResourceId"], + virtualMachineResourceId: + p.properties?.["virtualMachineResourceId"], provisioningState: p.properties?.["provisioningState"], }, }; diff --git a/sdk/standbypool/arm-standbypool/src/classic/operations/index.ts b/sdk/standbypool/arm-standbypool/src/classic/operations/index.ts index 889b03a4f5db..388a518cca7f 100644 --- a/sdk/standbypool/arm-standbypool/src/classic/operations/index.ts +++ b/sdk/standbypool/arm-standbypool/src/classic/operations/index.ts @@ -10,16 +10,21 @@ import { OperationsListOptionalParams } from "../../models/options.js"; /** Interface representing a Operations operations. */ export interface OperationsOperations { /** List the operations for the provider */ - list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; + list: ( + options?: OperationsListOptionalParams, + ) => PagedAsyncIterableIterator; } export function getOperations(context: StandbyPoolContext) { return { - list: (options?: OperationsListOptionalParams) => operationsList(context, options), + list: (options?: OperationsListOptionalParams) => + operationsList(context, options), }; } -export function getOperationsOperations(context: StandbyPoolContext): OperationsOperations { +export function getOperationsOperations( + context: StandbyPoolContext, +): OperationsOperations { return { ...getOperations(context), }; diff --git a/sdk/standbypool/arm-standbypool/src/classic/standbyContainerGroupPools/index.ts b/sdk/standbypool/arm-standbypool/src/classic/standbyContainerGroupPools/index.ts index 4c936caff788..0787b98cb12c 100644 --- a/sdk/standbypool/arm-standbypool/src/classic/standbyContainerGroupPools/index.ts +++ b/sdk/standbypool/arm-standbypool/src/classic/standbyContainerGroupPools/index.ts @@ -67,7 +67,10 @@ export interface StandbyContainerGroupPoolsOperations { ) => PagedAsyncIterableIterator; } -export function getStandbyContainerGroupPools(context: StandbyPoolContext, subscriptionId: string) { +export function getStandbyContainerGroupPools( + context: StandbyPoolContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, @@ -131,8 +134,14 @@ export function getStandbyContainerGroupPools(context: StandbyPoolContext, subsc resourceGroupName, options, ), - listBySubscription: (options?: StandbyContainerGroupPoolsListBySubscriptionOptionalParams) => - standbyContainerGroupPoolsListBySubscription(context, subscriptionId, options), + listBySubscription: ( + options?: StandbyContainerGroupPoolsListBySubscriptionOptionalParams, + ) => + standbyContainerGroupPoolsListBySubscription( + context, + subscriptionId, + options, + ), }; } diff --git a/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachinePools/index.ts b/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachinePools/index.ts index 0bc6701cd80b..31f82f21395e 100644 --- a/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachinePools/index.ts +++ b/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachinePools/index.ts @@ -67,7 +67,10 @@ export interface StandbyVirtualMachinePoolsOperations { ) => PagedAsyncIterableIterator; } -export function getStandbyVirtualMachinePools(context: StandbyPoolContext, subscriptionId: string) { +export function getStandbyVirtualMachinePools( + context: StandbyPoolContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, @@ -131,8 +134,14 @@ export function getStandbyVirtualMachinePools(context: StandbyPoolContext, subsc resourceGroupName, options, ), - listBySubscription: (options?: StandbyVirtualMachinePoolsListBySubscriptionOptionalParams) => - standbyVirtualMachinePoolsListBySubscription(context, subscriptionId, options), + listBySubscription: ( + options?: StandbyVirtualMachinePoolsListBySubscriptionOptionalParams, + ) => + standbyVirtualMachinePoolsListBySubscription( + context, + subscriptionId, + options, + ), }; } diff --git a/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachines/index.ts b/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachines/index.ts index de1330f065db..a231f91f97fa 100644 --- a/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachines/index.ts +++ b/sdk/standbypool/arm-standbypool/src/classic/standbyVirtualMachines/index.ts @@ -30,7 +30,10 @@ export interface StandbyVirtualMachinesOperations { ) => PagedAsyncIterableIterator; } -export function getStandbyVirtualMachines(context: StandbyPoolContext, subscriptionId: string) { +export function getStandbyVirtualMachines( + context: StandbyPoolContext, + subscriptionId: string, +) { return { get: ( resourceGroupName: string, diff --git a/sdk/standbypool/arm-standbypool/src/helpers/serializerHelpers.ts b/sdk/standbypool/arm-standbypool/src/helpers/serializerHelpers.ts index 7518a16c2ee9..4baaac77c8be 100644 --- a/sdk/standbypool/arm-standbypool/src/helpers/serializerHelpers.ts +++ b/sdk/standbypool/arm-standbypool/src/helpers/serializerHelpers.ts @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export function serializeRecord( - item: Record, -): Record; +export function serializeRecord< + T extends string | number | boolean | Date | null, + R, +>(item: Record): Record; export function serializeRecord( item: Record, serializer: (item: T) => R, @@ -32,5 +33,8 @@ export function serializeRecord( } function isSupportedRecordType(t: any) { - return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; + return ( + ["number", "string", "boolean", "null"].includes(typeof t) || + t instanceof Date + ); } diff --git a/sdk/standbypool/arm-standbypool/src/index.ts b/sdk/standbypool/arm-standbypool/src/index.ts index 2b8dfd256b02..e41309a3fece 100644 --- a/sdk/standbypool/arm-standbypool/src/index.ts +++ b/sdk/standbypool/arm-standbypool/src/index.ts @@ -22,7 +22,11 @@ export { StandbyContainerGroupPoolRuntimeViewResourceProperties, ContainerGroupInstanceCountSummary, PoolResourceStateCount, - KnownProvisioningState, + KnownResourceProvisioningState, + ResourceProvisioningState, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, TrackedResource, StandbyContainerGroupPoolResource, StandbyContainerGroupPoolResourceProperties, @@ -52,6 +56,7 @@ export { Origin, KnownActionType, ActionType, + Versions, ProvisioningState, OperationsListOptionalParams, StandbyVirtualMachinePoolsGetOptionalParams, diff --git a/sdk/standbypool/arm-standbypool/src/models/index.ts b/sdk/standbypool/arm-standbypool/src/models/index.ts index e00c354f81a6..6310e7b0585a 100644 --- a/sdk/standbypool/arm-standbypool/src/models/index.ts +++ b/sdk/standbypool/arm-standbypool/src/models/index.ts @@ -11,7 +11,11 @@ export { StandbyContainerGroupPoolRuntimeViewResourceProperties, ContainerGroupInstanceCountSummary, PoolResourceStateCount, - KnownProvisioningState, + KnownResourceProvisioningState, + ResourceProvisioningState, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, TrackedResource, StandbyContainerGroupPoolResource, StandbyContainerGroupPoolResourceProperties, @@ -41,6 +45,7 @@ export { Origin, KnownActionType, ActionType, + Versions, ProvisioningState, } from "./models.js"; export { diff --git a/sdk/standbypool/arm-standbypool/src/models/models.ts b/sdk/standbypool/arm-standbypool/src/models/models.ts index d35602ef9362..1374abe1448f 100644 --- a/sdk/standbypool/arm-standbypool/src/models/models.ts +++ b/sdk/standbypool/arm-standbypool/src/models/models.ts @@ -63,7 +63,8 @@ export type CreatedByType = string; export interface ProxyResource extends Resource {} /** Contains information about a standby container group pool as last known by the StandbyPool resource provider. */ -export interface StandbyContainerGroupPoolRuntimeViewResource extends ProxyResource { +export interface StandbyContainerGroupPoolRuntimeViewResource + extends ProxyResource { /** The resource-specific properties for this resource. */ properties?: StandbyContainerGroupPoolRuntimeViewResourceProperties; } @@ -90,6 +91,55 @@ export interface PoolResourceStateCount { count: number; } +/** Known values of {@link ResourceProvisioningState} that the service accepts. */ +export enum KnownResourceProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", +} + +/** + * The provisioning state of a resource type. \ + * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** + */ +export type ResourceProvisioningState = 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; +} + +/** 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[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + /** The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. */ export interface _StandbyContainerGroupPoolRuntimeViewResourceListResult { /** The StandbyContainerGroupPoolRuntimeViewResource items on this page */ @@ -106,7 +156,9 @@ export interface TrackedResource extends Resource { location: string; } -export function trackedResourceSerializer(item: TrackedResource): Record { +export function trackedResourceSerializer( + item: TrackedResource, +): Record { return { tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any), location: item["location"], @@ -145,8 +197,12 @@ export function standbyContainerGroupPoolResourcePropertiesSerializer( item: StandbyContainerGroupPoolResourceProperties, ): Record { return { - elasticityProfile: standbyContainerGroupPoolElasticityProfileSerializer(item.elasticityProfile), - containerGroupProperties: containerGroupPropertiesSerializer(item.containerGroupProperties), + elasticityProfile: standbyContainerGroupPoolElasticityProfileSerializer( + item.elasticityProfile, + ), + containerGroupProperties: containerGroupPropertiesSerializer( + item.containerGroupProperties, + ), }; } @@ -170,7 +226,7 @@ export function standbyContainerGroupPoolElasticityProfileSerializer( /** Known values of {@link RefillPolicy} that the service accepts. */ export enum KnownRefillPolicy { /** always */ - Always = "always", + always = "always", } /** @@ -194,9 +250,13 @@ export function containerGroupPropertiesSerializer( item: ContainerGroupProperties, ): Record { return { - containerGroupProfile: containerGroupProfileSerializer(item.containerGroupProfile), + containerGroupProfile: containerGroupProfileSerializer( + item.containerGroupProfile, + ), subnetIds: - item["subnetIds"] === undefined ? item["subnetIds"] : item["subnetIds"].map(subnetSerializer), + item["subnetIds"] === undefined + ? item["subnetIds"] + : item["subnetIds"].map(subnetSerializer), }; } @@ -244,7 +304,9 @@ export function standbyContainerGroupPoolResourceUpdateSerializer( tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any), properties: !item.properties ? item.properties - : standbyContainerGroupPoolResourceUpdatePropertiesSerializer(item.properties), + : standbyContainerGroupPoolResourceUpdatePropertiesSerializer( + item.properties, + ), }; } @@ -262,7 +324,9 @@ export function standbyContainerGroupPoolResourceUpdatePropertiesSerializer( return { elasticityProfile: !item.elasticityProfile ? item.elasticityProfile - : standbyContainerGroupPoolElasticityProfileSerializer(item.elasticityProfile), + : standbyContainerGroupPoolElasticityProfileSerializer( + item.elasticityProfile, + ), containerGroupProperties: !item.containerGroupProperties ? item.containerGroupProperties : containerGroupPropertiesSerializer(item.containerGroupProperties), @@ -278,7 +342,8 @@ export interface _StandbyContainerGroupPoolResourceListResult { } /** Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. */ -export interface StandbyVirtualMachinePoolRuntimeViewResource extends ProxyResource { +export interface StandbyVirtualMachinePoolRuntimeViewResource + extends ProxyResource { /** The resource-specific properties for this resource. */ properties?: StandbyVirtualMachinePoolRuntimeViewResourceProperties; } @@ -374,7 +439,9 @@ export function standbyVirtualMachinePoolResourcePropertiesSerializer( return { elasticityProfile: !item.elasticityProfile ? item.elasticityProfile - : standbyVirtualMachinePoolElasticityProfileSerializer(item.elasticityProfile), + : standbyVirtualMachinePoolElasticityProfileSerializer( + item.elasticityProfile, + ), virtualMachineState: item["virtualMachineState"], attachedVirtualMachineScaleSetId: item["attachedVirtualMachineScaleSetId"], }; @@ -430,7 +497,9 @@ export function standbyVirtualMachinePoolResourceUpdateSerializer( tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any), properties: !item.properties ? item.properties - : standbyVirtualMachinePoolResourceUpdatePropertiesSerializer(item.properties), + : standbyVirtualMachinePoolResourceUpdatePropertiesSerializer( + item.properties, + ), }; } @@ -450,7 +519,9 @@ export function standbyVirtualMachinePoolResourceUpdatePropertiesSerializer( return { elasticityProfile: !item.elasticityProfile ? item.elasticityProfile - : standbyVirtualMachinePoolElasticityProfileSerializer(item.elasticityProfile), + : standbyVirtualMachinePoolElasticityProfileSerializer( + item.elasticityProfile, + ), virtualMachineState: item["virtualMachineState"], attachedVirtualMachineScaleSetId: item["attachedVirtualMachineScaleSetId"], }; @@ -501,11 +572,11 @@ export interface OperationDisplay { /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** user */ - User = "user", + user = "user", /** system */ - System = "system", + system = "system", /** user,system */ - UserSystem = "user,system", + "user,system" = "user,system", } /** @@ -533,29 +604,10 @@ export enum KnownActionType { * **Internal** */ export type ActionType = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting", -} - -/** - * The provisioning state of a resource type. \ - * {@link KnownProvisioningState} can be used interchangeably with ResourceProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** - */ +/** Supported API Versions for Microsoft.StandbyPool */ +export type Versions = + | "2023-12-01-preview" + | "2024-03-01-preview" + | "2024-03-01"; /** Alias for ProvisioningState */ - -export type ProvisioningState = string; +export type ProvisioningState = string | ResourceProvisioningState | "Deleting"; diff --git a/sdk/standbypool/arm-standbypool/src/models/options.ts b/sdk/standbypool/arm-standbypool/src/models/options.ts index 269357aad774..0452753c87f1 100644 --- a/sdk/standbypool/arm-standbypool/src/models/options.ts +++ b/sdk/standbypool/arm-standbypool/src/models/options.ts @@ -7,22 +7,26 @@ import { OperationOptions } from "@azure-rest/core-client"; export interface OperationsListOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface StandbyVirtualMachinePoolsGetOptionalParams extends OperationOptions {} +export interface StandbyVirtualMachinePoolsGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface StandbyVirtualMachinePoolsCreateOrUpdateOptionalParams extends OperationOptions { +export interface StandbyVirtualMachinePoolsCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface StandbyVirtualMachinePoolsDeleteOptionalParams extends OperationOptions { +export interface StandbyVirtualMachinePoolsDeleteOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface StandbyVirtualMachinePoolsUpdateOptionalParams extends OperationOptions {} +export interface StandbyVirtualMachinePoolsUpdateOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface StandbyVirtualMachinePoolsListByResourceGroupOptionalParams @@ -33,36 +37,42 @@ export interface StandbyVirtualMachinePoolsListBySubscriptionOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface StandbyVirtualMachinesGetOptionalParams extends OperationOptions {} +export interface StandbyVirtualMachinesGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface StandbyVirtualMachinePoolRuntimeViewsGetOptionalParams extends OperationOptions {} +export interface StandbyVirtualMachinePoolRuntimeViewsGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface StandbyContainerGroupPoolsGetOptionalParams extends OperationOptions {} +export interface StandbyContainerGroupPoolsGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ -export interface StandbyContainerGroupPoolsCreateOrUpdateOptionalParams extends OperationOptions { +export interface StandbyContainerGroupPoolsCreateOrUpdateOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface StandbyContainerGroupPoolsDeleteOptionalParams extends OperationOptions { +export interface StandbyContainerGroupPoolsDeleteOptionalParams + extends OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; } /** Optional parameters. */ -export interface StandbyContainerGroupPoolsUpdateOptionalParams extends OperationOptions {} +export interface StandbyContainerGroupPoolsUpdateOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface StandbyContainerGroupPoolsListByResourceGroupOptionalParams @@ -73,7 +83,8 @@ export interface StandbyContainerGroupPoolsListBySubscriptionOptionalParams extends OperationOptions {} /** Optional parameters. */ -export interface StandbyContainerGroupPoolRuntimeViewsGetOptionalParams extends OperationOptions {} +export interface StandbyContainerGroupPoolRuntimeViewsGetOptionalParams + extends OperationOptions {} /** Optional parameters. */ export interface StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolOptionalParams diff --git a/sdk/standbypool/arm-standbypool/src/restorePollerHelpers.ts b/sdk/standbypool/arm-standbypool/src/restorePollerHelpers.ts index 4cbc14d11b8c..6c075fd7d0e1 100644 --- a/sdk/standbypool/arm-standbypool/src/restorePollerHelpers.ts +++ b/sdk/standbypool/arm-standbypool/src/restorePollerHelpers.ts @@ -11,7 +11,10 @@ import { _standbyContainerGroupPoolsDeleteDeserialize, } from "./api/standbyContainerGroupPools/index.js"; import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; -import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { + OperationOptions, + PathUncheckedResponse, +} from "@azure-rest/core-client"; import { AbortSignalLike } from "@azure/abort-controller"; import { PollerLike, @@ -42,7 +45,9 @@ export interface RestorePollerOptions< export function restorePoller( client: StandbyPoolManagementClient, serializedState: string, - sourceOperation: (...args: any[]) => PollerLike, TResult>, + sourceOperation: ( + ...args: any[] + ) => PollerLike, TResult>, options?: RestorePollerOptions, ): PollerLike, TResult> { const pollerConfig = deserializeState(serializedState).config; @@ -131,17 +136,24 @@ function getDeserializationHelper( // 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) { + 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] || "", - ); + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); if (!isMatched) { found = false; diff --git a/sdk/standbypool/arm-standbypool/src/standbyPoolManagementClient.ts b/sdk/standbypool/arm-standbypool/src/standbyPoolManagementClient.ts index 4fdc5db0f672..66ea14a7a366 100644 --- a/sdk/standbypool/arm-standbypool/src/standbyPoolManagementClient.ts +++ b/sdk/standbypool/arm-standbypool/src/standbyPoolManagementClient.ts @@ -3,7 +3,10 @@ import { TokenCredential } from "@azure/core-auth"; import { Pipeline } from "@azure/core-rest-pipeline"; -import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; +import { + getOperationsOperations, + OperationsOperations, +} from "./classic/operations/index.js"; import { getStandbyVirtualMachinePoolsOperations, StandbyVirtualMachinePoolsOperations, @@ -56,19 +59,24 @@ export class StandbyPoolManagementClient { this._client, subscriptionId, ); - this.standbyVirtualMachines = getStandbyVirtualMachinesOperations(this._client, subscriptionId); - this.standbyVirtualMachinePoolRuntimeViews = getStandbyVirtualMachinePoolRuntimeViewsOperations( + this.standbyVirtualMachines = getStandbyVirtualMachinesOperations( this._client, subscriptionId, ); + this.standbyVirtualMachinePoolRuntimeViews = + getStandbyVirtualMachinePoolRuntimeViewsOperations( + this._client, + subscriptionId, + ); this.standbyContainerGroupPools = getStandbyContainerGroupPoolsOperations( this._client, subscriptionId, ); - this.standbyContainerGroupPoolRuntimeViews = getStandbyContainerGroupPoolRuntimeViewsOperations( - this._client, - subscriptionId, - ); + this.standbyContainerGroupPoolRuntimeViews = + getStandbyContainerGroupPoolRuntimeViewsOperations( + this._client, + subscriptionId, + ); } /** The operation groups for Operations */ diff --git a/sdk/standbypool/arm-standbypool/src/static-helpers/pagingHelpers.ts b/sdk/standbypool/arm-standbypool/src/static-helpers/pagingHelpers.ts index bff1376fd432..dc35b0af242d 100644 --- a/sdk/standbypool/arm-standbypool/src/static-helpers/pagingHelpers.ts +++ b/sdk/standbypool/arm-standbypool/src/static-helpers/pagingHelpers.ts @@ -4,7 +4,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { + Client, + createRestError, + PathUncheckedResponse, +} from "@azure-rest/core-client"; import { RestError } from "@azure/core-rest-pipeline"; /** @@ -42,11 +46,17 @@ export interface PagedAsyncIterableIterator< /** * The connection to the async iterator, part of the iteration protocol */ - [Symbol.asyncIterator](): PagedAsyncIterableIterator; + [Symbol.asyncIterator](): PagedAsyncIterableIterator< + TElement, + TPage, + TPageSettings + >; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + byPage: ( + settings?: TPageSettings, + ) => AsyncIterableIterator>; } /** @@ -64,11 +74,15 @@ export interface PagedResult< /** * A method that returns a page of results. */ - getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + 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>; + byPage?: ( + settings?: TPageSettings, + ) => AsyncIterableIterator>; /** * A function to extract elements from a page. @@ -141,7 +155,9 @@ function getPagedAsyncIterator< >( pagedResult: PagedResult, ): PagedAsyncIterableIterator { - const iter = getItemAsyncIterator(pagedResult); + const iter = getItemAsyncIterator( + pagedResult, + ); return { next() { return iter.next(); @@ -160,7 +176,11 @@ function getPagedAsyncIterator< }; } -async function* getItemAsyncIterator( +async function* getItemAsyncIterator< + TElement, + TPage, + TPageSettings extends PageSettings, +>( pagedResult: PagedResult, ): AsyncIterableIterator { const pages = getPageAsyncIterator(pagedResult); @@ -169,14 +189,20 @@ async function* getItemAsyncIterator( +async function* getPageAsyncIterator< + TElement, + TPage, + TPageSettings extends PageSettings, +>( pagedResult: PagedResult, options: { pageLink?: string; } = {}, ): AsyncIterableIterator> { const { pageLink } = options; - let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + let response = await pagedResult.getPage( + pageLink ?? pagedResult.firstPageLink, + ); if (!response) { return; } @@ -204,7 +230,11 @@ function getNextLink(body: unknown, nextLinkName?: string): string | undefined { const nextLink = (body as Record)[nextLinkName]; - if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + 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}`, ); @@ -234,7 +264,10 @@ function getElements(body: unknown, itemName: string): T[] { /** * Checks if a request failed */ -function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { +function checkPagingRequest( + response: PathUncheckedResponse, + expectedStatuses: string[], +): void { if (!expectedStatuses.includes(response.status)) { throw createRestError( `Pagination failed with unexpected statusCode ${response.status}`, diff --git a/sdk/standbypool/arm-standbypool/src/static-helpers/pollingHelpers.ts b/sdk/standbypool/arm-standbypool/src/static-helpers/pollingHelpers.ts index 42df16073822..87a63b1fc5d1 100644 --- a/sdk/standbypool/arm-standbypool/src/static-helpers/pollingHelpers.ts +++ b/sdk/standbypool/arm-standbypool/src/static-helpers/pollingHelpers.ts @@ -13,7 +13,11 @@ import { OperationResponse, } from "@azure/core-lro"; -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { + Client, + PathUncheckedResponse, + createRestError, +} from "@azure-rest/core-client"; import { AbortSignalLike } from "@azure/abort-controller"; export interface GetLongRunningPollerOptions { @@ -41,7 +45,10 @@ export interface GetLongRunningPollerOptions { */ getInitialResponse?: () => PromiseLike; } -export function getLongRunningPoller( +export function getLongRunningPoller< + TResponse extends PathUncheckedResponse, + TResult = void, +>( client: Client, processResponseBody: (result: TResponse) => Promise, expectedStatuses: string[], @@ -49,14 +56,18 @@ export function getLongRunningPoller, TResult> { const { restoreFrom, getInitialResponse } = options; if (!restoreFrom && !getInitialResponse) { - throw new Error("Either restoreFrom or getInitialResponse must be specified"); + 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"); + throw new Error( + "getInitialResponse is required when initializing a new poller", + ); } initialResponse = await getInitialResponse(); return getLroResponse(initialResponse, expectedStatuses); diff --git a/sdk/standbypool/arm-standbypool/test/public/sampleTest.spec.ts b/sdk/standbypool/arm-standbypool/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..d4919ac91ac5 --- /dev/null +++ b/sdk/standbypool/arm-standbypool/test/public/sampleTest.spec.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createRecorder } from "./utils/recordedClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async function () { + // recorder = await createRecorder(this); + }); + + afterEach(async function () { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/standbypool/arm-standbypool/test/public/standbypool_operations_test.spec.ts b/sdk/standbypool/arm-standbypool/test/public/standbypool_operations_test.spec.ts deleted file mode 100644 index 18df27a349b6..000000000000 --- a/sdk/standbypool/arm-standbypool/test/public/standbypool_operations_test.spec.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 { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, beforeEach, afterEach, it, describe } from "vitest"; -import { createRecorder } from "./utils/recordedClient.js"; -import { StandbyPoolManagementClient } from "../../src/standbyPoolManagementClient.js"; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("StandbyPool test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: StandbyPoolManagementClient; - - beforeEach(async (context) => { - process.env.SystemRoot = process.env.SystemRoot || "C:\\Windows"; - recorder = await createRecorder(context); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new StandbyPoolManagementClient( - credential, - subscriptionId, - recorder.configureClientOptions({}), - ); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/standbypool/arm-standbypool/test/public/utils/recordedClient.ts b/sdk/standbypool/arm-standbypool/test/public/utils/recordedClient.ts index 527ccc9dee86..6e425fdcfdf9 100644 --- a/sdk/standbypool/arm-standbypool/test/public/utils/recordedClient.ts +++ b/sdk/standbypool/arm-standbypool/test/public/utils/recordedClient.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; +import { + Recorder, + RecorderStartOptions, + VitestTestContext, +} from "@azure-tools/test-recorder"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "azure_subscription_id", @@ -9,10 +13,6 @@ const replaceableVariables: Record = { const recorderEnvSetup: 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 - ], }; /** @@ -20,7 +20,9 @@ const recorderEnvSetup: RecorderStartOptions = { * 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 { +export async function createRecorder( + context: VitestTestContext, +): Promise { const recorder = new Recorder(context); await recorder.start(recorderEnvSetup); return recorder; diff --git a/sdk/standbypool/arm-standbypool/tsconfig.json b/sdk/standbypool/arm-standbypool/tsconfig.json index 5e07b197f280..8c962911295c 100644 --- a/sdk/standbypool/arm-standbypool/tsconfig.json +++ b/sdk/standbypool/arm-standbypool/tsconfig.json @@ -4,9 +4,6 @@ "module": "NodeNext", "moduleResolution": "NodeNext", "rootDir": ".", - "paths": { - "@azure/arm-mongocluster": ["./src/index"] - }, "skipLibCheck": true }, "include": [ @@ -14,7 +11,6 @@ "./src/**/*.mts", "./src/**/*.cts", "test/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ] } diff --git a/sdk/standbypool/arm-standbypool/tsp-location.yaml b/sdk/standbypool/arm-standbypool/tsp-location.yaml index 5b2b24a1a7e6..b5a593f043c9 100644 --- a/sdk/standbypool/arm-standbypool/tsp-location.yaml +++ b/sdk/standbypool/arm-standbypool/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/standbypool/StandbyPool.Management -commit: 3519c80fe510a268f6e59a29ccac8a53fdec15b6 -repo: Azure/azure-rest-api-specs -additionalDirectories: +commit: 65171caa921a67914855465095f912fb17445d7e +repo: ../azure-rest-api-specs +additionalDirectories: diff --git a/sdk/standbypool/arm-standbypool/vitest.browser.config.ts b/sdk/standbypool/arm-standbypool/vitest.browser.config.ts index 93f3735b960c..5e0dc418cfa2 100644 --- a/sdk/standbypool/arm-standbypool/vitest.browser.config.ts +++ b/sdk/standbypool/arm-standbypool/vitest.browser.config.ts @@ -33,6 +33,5 @@ export default defineConfig({ reportsDirectory: "coverage-browser", }, testTimeout: 1200000, - hookTimeout: 1200000 }, }); diff --git a/sdk/standbypool/arm-standbypool/vitest.config.ts b/sdk/standbypool/arm-standbypool/vitest.config.ts index 11fcb98a3ab4..f8ab2a758bf9 100644 --- a/sdk/standbypool/arm-standbypool/vitest.config.ts +++ b/sdk/standbypool/arm-standbypool/vitest.config.ts @@ -29,6 +29,5 @@ export default defineConfig({ reportsDirectory: "coverage", }, testTimeout: 1200000, - hookTimeout: 1200000 }, }); diff --git a/sdk/standbypool/ci.mgmt.yml b/sdk/standbypool/ci.mgmt.yml index 8f3f6c90c288..0dda7968ab42 100644 --- a/sdk/standbypool/ci.mgmt.yml +++ b/sdk/standbypool/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -13,7 +13,6 @@ trigger: include: - sdk/standbypool/arm-standbypool - sdk/standbypool/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/standbypool/arm-standbypool - sdk/standbypool/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: @@ -35,4 +33,3 @@ extends: Artifacts: - name: azure-arm-standbypool safeName: azurearmstandbypool - \ No newline at end of file