diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 22839169c4be..c866e7bb91be 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -152,6 +152,7 @@ specifiers: '@rush-temp/arm-storage-profile-2020-09-01-hybrid': file:./projects/arm-storage-profile-2020-09-01-hybrid.tgz '@rush-temp/arm-storagecache': file:./projects/arm-storagecache.tgz '@rush-temp/arm-storageimportexport': file:./projects/arm-storageimportexport.tgz + '@rush-temp/arm-storagepool': file:./projects/arm-storagepool.tgz '@rush-temp/arm-storagesync': file:./projects/arm-storagesync.tgz '@rush-temp/arm-storsimple1200series': file:./projects/arm-storsimple1200series.tgz '@rush-temp/arm-storsimple8000series': file:./projects/arm-storsimple8000series.tgz @@ -423,6 +424,7 @@ dependencies: '@rush-temp/arm-storage-profile-2020-09-01-hybrid': file:projects/arm-storage-profile-2020-09-01-hybrid.tgz '@rush-temp/arm-storagecache': file:projects/arm-storagecache.tgz '@rush-temp/arm-storageimportexport': file:projects/arm-storageimportexport.tgz + '@rush-temp/arm-storagepool': file:projects/arm-storagepool.tgz '@rush-temp/arm-storagesync': file:projects/arm-storagesync.tgz '@rush-temp/arm-storsimple1200series': file:projects/arm-storsimple1200series.tgz '@rush-temp/arm-storsimple8000series': file:projects/arm-storsimple8000series.tgz @@ -953,7 +955,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.3 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.3 @@ -2213,7 +2215,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/chai-as-promised/7.1.5: @@ -2239,14 +2241,14 @@ packages: /@types/concurrently/6.4.0: resolution: {integrity: sha512-CYU1eyFHsIa2IZIsb8gfUOdiewfnZcyM2Hg1Zaq95xnmB0Ix/bTRM8SttqZ2Cjy6JGPZLttHjZewVsDg1yvnJg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 chalk: 4.1.2 dev: false /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/cookie/0.4.1: @@ -2281,7 +2283,7 @@ packages: /@types/express-serve-static-core/4.17.28: resolution: {integrity: sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2298,26 +2300,26 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/json-schema/7.0.9: @@ -2331,13 +2333,13 @@ packages: /@types/jsonwebtoken/8.5.8: resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/long/4.0.1: @@ -2381,13 +2383,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/ms/0.7.31: @@ -2401,7 +2403,7 @@ packages: /@types/node-fetch/2.6.1: resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 form-data: 3.0.1 dev: false @@ -2451,7 +2453,7 @@ packages: resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} dependencies: '@types/mime': 1.3.2 - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/sinon/10.0.11: @@ -2473,7 +2475,7 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/tough-cookie/4.0.1: @@ -2483,13 +2485,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/underscore/1.11.4: @@ -2507,26 +2509,26 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/xml2js/0.4.9: resolution: {integrity: sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false /@types/yauzl/2.9.2: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.21 dev: false optional: true @@ -3495,7 +3497,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3688,7 +3690,7 @@ packages: dependencies: semver: 7.3.5 shelljs: 0.8.5 - typescript: 4.2.4 + typescript: 4.5.5 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3741,7 +3743,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.47 + '@types/node': 17.0.21 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4582,7 +4584,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -8360,7 +8362,7 @@ packages: /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: - string-width: 1.0.2 + string-width: 4.2.3 dev: false /word-wrap/1.2.3: @@ -12891,6 +12893,33 @@ packages: - supports-color dev: false + file:projects/arm-storagepool.tgz: + resolution: {integrity: sha512-wAyYJS6NiQmCIXZnZp/z/TjRXisU+RAd7Zs2kDj9Do3k9Yv0FLlQfsm44lezVmoN/O/K6u/OlhR3SsqGhnG5og==, tarball: file:projects/arm-storagepool.tgz} + name: '@rush-temp/arm-storagepool' + version: 0.0.0 + dependencies: + '@azure-tools/test-recorder': 1.0.2 + '@azure/identity': 2.0.4 + '@microsoft/api-extractor': 7.19.4 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.15.3 + transitivePeerDependencies: + - debug + - encoding + - supports-color + dev: false + file:projects/arm-storagesync.tgz: resolution: {integrity: sha512-xooRmN9xw5b7VZeINpvylrsIWihMf6uvKapffopks4m/K6wlz6Edt9wt7WMU5n20CtsvGWJZ7dzdZ085BwaZHQ==, tarball: file:projects/arm-storagesync.tgz} name: '@rush-temp/arm-storagesync' diff --git a/rush.json b/rush.json index 2458663d66ec..103ffdb54b47 100644 --- a/rush.json +++ b/rush.json @@ -1664,6 +1664,11 @@ "packageName": "@azure/arm-appservice-profile-2020-09-01-hybrid", "projectFolder": "sdk/appservice/arm-appservice-profile-2020-09-01-hybrid", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-storagepool", + "projectFolder": "sdk/storagepool/arm-storagepool", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/storagepool/arm-storagepool/CHANGELOG.md b/sdk/storagepool/arm-storagepool/CHANGELOG.md new file mode 100644 index 000000000000..b4f5a704c28b --- /dev/null +++ b/sdk/storagepool/arm-storagepool/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0 (2022-03-15) + +The package of @azure/arm-storagepool is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/storagepool/arm-storagepool/LICENSE b/sdk/storagepool/arm-storagepool/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/storagepool/arm-storagepool/README.md b/sdk/storagepool/arm-storagepool/README.md new file mode 100644 index 000000000000..2f3b50f0f779 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/README.md @@ -0,0 +1,98 @@ +# Azure Service client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagepool/arm-storagepool) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-storagepool) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-storagepool) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-storagepool` package + +Install the Azure Service client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-storagepool +``` + +### Create and authenticate a `StoragePoolManagement` + +To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Service 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). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { StoragePoolManagement } = require("@azure/arm-storagepool"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new StoragePoolManagement(new DefaultAzureCredential(), subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### StoragePoolManagement + +`StoragePoolManagement` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstoragepool%2Farm-storagepool%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/storagepool/arm-storagepool/_meta.json b/sdk/storagepool/arm-storagepool/_meta.json new file mode 100644 index 000000000000..12471fa45ce5 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "b40341c7d30f5dab01b117e525f78e35d23a0423", + "readme": "specification/storagepool/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/storagepool/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.1.1", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" +} \ No newline at end of file diff --git a/sdk/storagepool/arm-storagepool/api-extractor.json b/sdk/storagepool/arm-storagepool/api-extractor.json new file mode 100644 index 000000000000..fc1e35fedd8c --- /dev/null +++ b/sdk/storagepool/arm-storagepool/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-storagepool.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/storagepool/arm-storagepool/package.json b/sdk/storagepool/arm-storagepool/package.json new file mode 100644 index 000000000000..33dacdce8a3a --- /dev/null +++ b/sdk/storagepool/arm-storagepool/package.json @@ -0,0 +1,102 @@ +{ + "name": "@azure/arm-storagepool", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for StoragePoolManagement.", + "version": "1.0.0", + "engines": { + "node": ">=12.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-storagepool.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagepool/arm-storagepool", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/storagepool/arm-storagepool/review/arm-storagepool.api.md b/sdk/storagepool/arm-storagepool/review/arm-storagepool.api.md new file mode 100644 index 000000000000..8c53fd21c351 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/review/arm-storagepool.api.md @@ -0,0 +1,626 @@ +## API Report File for "@azure/arm-storagepool" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export interface Acl { + initiatorIqn: string; + mappedLuns: string[]; +} + +// @public +export type CreatedByType = string; + +// @public +export interface Disk { + id: string; +} + +// @public +export type DiskPool = TrackedResource & { + readonly managedBy?: string; + readonly managedByExtended?: string[]; + readonly systemData?: SystemMetadata; + readonly provisioningState: ProvisioningStates; + availabilityZones: string[]; + status: OperationalStatus; + disks?: Disk[]; + subnetId: string; + additionalCapabilities?: string[]; + nameSkuName?: string; + tier?: string; +}; + +// @public +export interface DiskPoolCreate { + additionalCapabilities?: string[]; + availabilityZones?: string[]; + disks?: Disk[]; + readonly id?: string; + location: string; + managedBy?: string; + managedByExtended?: string[]; + readonly name?: string; + sku: Sku; + subnetId: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface DiskPoolListResult { + readonly nextLink?: string; + value: DiskPool[]; +} + +// @public +export interface DiskPools { + beginCreateOrUpdate(resourceGroupName: string, diskPoolName: string, diskPoolCreatePayload: DiskPoolCreate, options?: DiskPoolsCreateOrUpdateOptionalParams): Promise, DiskPoolsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, diskPoolName: string, diskPoolCreatePayload: DiskPoolCreate, options?: DiskPoolsCreateOrUpdateOptionalParams): Promise; + beginDeallocate(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsDeallocateOptionalParams): Promise, void>>; + beginDeallocateAndWait(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsDeallocateOptionalParams): Promise; + beginDelete(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsStartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, diskPoolName: string, diskPoolUpdatePayload: DiskPoolUpdate, options?: DiskPoolsUpdateOptionalParams): Promise, DiskPoolsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, diskPoolName: string, diskPoolUpdatePayload: DiskPoolUpdate, options?: DiskPoolsUpdateOptionalParams): Promise; + beginUpgrade(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsUpgradeOptionalParams): Promise, void>>; + beginUpgradeAndWait(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsUpgradeOptionalParams): Promise; + get(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: DiskPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: DiskPoolsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, diskPoolName: string, options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiskPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskPoolsCreateOrUpdateResponse = DiskPool; + +// @public +export interface DiskPoolsDeallocateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskPoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsGetResponse = DiskPool; + +// @public +export interface DiskPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListByResourceGroupNextResponse = DiskPoolListResult; + +// @public +export interface DiskPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListByResourceGroupResponse = DiskPoolListResult; + +// @public +export interface DiskPoolsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListBySubscriptionNextResponse = DiskPoolListResult; + +// @public +export interface DiskPoolsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListBySubscriptionResponse = DiskPoolListResult; + +// @public +export interface DiskPoolsListOutboundNetworkDependenciesEndpointsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointList; + +// @public +export interface DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolsListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointList; + +// @public +export interface DiskPoolsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskPoolsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskPoolsUpdateResponse = DiskPool; + +// @public +export interface DiskPoolsUpgradeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskPoolTier = string; + +// @public +export interface DiskPoolUpdate { + disks?: Disk[]; + managedBy?: string; + managedByExtended?: string[]; + sku?: Sku; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface DiskPoolZoneInfo { + readonly additionalCapabilities?: string[]; + readonly availabilityZones?: string[]; + readonly sku?: Sku; +} + +// @public +export interface DiskPoolZoneListResult { + readonly nextLink?: string; + readonly value?: DiskPoolZoneInfo[]; +} + +// @public +export interface DiskPoolZones { + list(location: string, options?: DiskPoolZonesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiskPoolZonesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolZonesListNextResponse = DiskPoolZoneListResult; + +// @public +export interface DiskPoolZonesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskPoolZonesListResponse = DiskPoolZoneListResult; + +// @public +export interface EndpointDependency { + domainName?: string; + endpointDetails?: EndpointDetail[]; +} + +// @public +export interface EndpointDetail { + ipAddress?: string; + isAccessible?: boolean; + latency?: number; + port?: number; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorModel { + error?: ErrorResponse; +} + +// @public +export interface ErrorResponse { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorResponse[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface IscsiLun { + readonly lun?: number; + managedDiskAzureResourceId: string; + name: string; +} + +// @public +export type IscsiTarget = ProxyResource & { + readonly systemData?: SystemMetadata; + readonly managedBy?: string; + readonly managedByExtended?: string[]; + aclMode: IscsiTargetAclMode; + staticAcls?: Acl[]; + luns?: IscsiLun[]; + targetIqn: string; + readonly provisioningState: ProvisioningStates; + status: OperationalStatus; + endpoints?: string[]; + port?: number; + readonly sessions?: string[]; +}; + +// @public +export type IscsiTargetAclMode = string; + +// @public +export type IscsiTargetCreate = ProxyResource & { + managedBy?: string; + managedByExtended?: string[]; + aclMode: IscsiTargetAclMode; + targetIqn?: string; + staticAcls?: Acl[]; + luns?: IscsiLun[]; +}; + +// @public +export interface IscsiTargetList { + readonly nextLink?: string; + value: IscsiTarget[]; +} + +// @public +export interface IscsiTargets { + beginCreateOrUpdate(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, iscsiTargetCreatePayload: IscsiTargetCreate, options?: IscsiTargetsCreateOrUpdateOptionalParams): Promise, IscsiTargetsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, iscsiTargetCreatePayload: IscsiTargetCreate, options?: IscsiTargetsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, options?: IscsiTargetsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, options?: IscsiTargetsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, iscsiTargetUpdatePayload: IscsiTargetUpdate, options?: IscsiTargetsUpdateOptionalParams): Promise, IscsiTargetsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, iscsiTargetUpdatePayload: IscsiTargetUpdate, options?: IscsiTargetsUpdateOptionalParams): Promise; + get(resourceGroupName: string, diskPoolName: string, iscsiTargetName: string, options?: IscsiTargetsGetOptionalParams): Promise; + listByDiskPool(resourceGroupName: string, diskPoolName: string, options?: IscsiTargetsListByDiskPoolOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface IscsiTargetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IscsiTargetsCreateOrUpdateResponse = IscsiTarget; + +// @public +export interface IscsiTargetsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface IscsiTargetsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IscsiTargetsGetResponse = IscsiTarget; + +// @public +export interface IscsiTargetsListByDiskPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IscsiTargetsListByDiskPoolNextResponse = IscsiTargetList; + +// @public +export interface IscsiTargetsListByDiskPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IscsiTargetsListByDiskPoolResponse = IscsiTargetList; + +// @public +export interface IscsiTargetsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IscsiTargetsUpdateResponse = IscsiTarget; + +// @public +export type IscsiTargetUpdate = ProxyResource & { + managedBy?: string; + managedByExtended?: string[]; + staticAcls?: Acl[]; + luns?: IscsiLun[]; +}; + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownDiskPoolTier { + // (undocumented) + Basic = "Basic", + // (undocumented) + Premium = "Premium", + // (undocumented) + Standard = "Standard" +} + +// @public +export enum KnownIscsiTargetAclMode { + // (undocumented) + Dynamic = "Dynamic", + // (undocumented) + Static = "Static" +} + +// @public +export enum KnownOperationalStatus { + // (undocumented) + Healthy = "Healthy", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Running = "Running", + // (undocumented) + Stopped = "Stopped", + // (undocumented) + StoppedDeallocated = "Stopped (deallocated)", + // (undocumented) + Unhealthy = "Unhealthy", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownProvisioningStates { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Pending = "Pending", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export type OperationalStatus = string; + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = StoragePoolOperationListResult; + +// @public +export interface OutboundEnvironmentEndpoint { + category?: string; + endpoints?: EndpointDependency[]; +} + +// @public +export interface OutboundEnvironmentEndpointList { + readonly nextLink?: string; + value: OutboundEnvironmentEndpoint[]; +} + +// @public +export type ProvisioningStates = string; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ResourceSkuCapability { + readonly name?: string; + readonly value?: string; +} + +// @public +export interface ResourceSkuInfo { + readonly apiVersion?: string; + readonly capabilities?: ResourceSkuCapability[]; + readonly locationInfo?: ResourceSkuLocationInfo; + readonly name?: string; + readonly resourceType?: string; + readonly restrictions?: ResourceSkuRestrictions[]; + readonly tier?: string; +} + +// @public +export interface ResourceSkuListResult { + nextLink?: string; + value?: ResourceSkuInfo[]; +} + +// @public +export interface ResourceSkuLocationInfo { + readonly location?: string; + readonly zoneDetails?: ResourceSkuZoneDetails[]; + readonly zones?: string[]; +} + +// @public +export interface ResourceSkuRestrictionInfo { + readonly locations?: string[]; + readonly zones?: string[]; +} + +// @public +export interface ResourceSkuRestrictions { + readonly reasonCode?: ResourceSkuRestrictionsReasonCode; + readonly restrictionInfo?: ResourceSkuRestrictionInfo; + readonly type?: ResourceSkuRestrictionsType; + readonly values?: string[]; +} + +// @public +export type ResourceSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; + +// @public +export type ResourceSkuRestrictionsType = "Location" | "Zone"; + +// @public +export interface ResourceSkus { + list(location: string, options?: ResourceSkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ResourceSkusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ResourceSkusListNextResponse = ResourceSkuListResult; + +// @public +export interface ResourceSkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ResourceSkusListResponse = ResourceSkuListResult; + +// @public +export interface ResourceSkuZoneDetails { + readonly capabilities?: ResourceSkuCapability[]; + readonly name?: string[]; +} + +// @public +export interface Sku { + name: string; + tier?: string; +} + +// @public (undocumented) +export class StoragePoolManagement extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: StoragePoolManagementOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + diskPools: DiskPools; + // (undocumented) + diskPoolZones: DiskPoolZones; + // (undocumented) + iscsiTargets: IscsiTargets; + // (undocumented) + operations: Operations; + // (undocumented) + resourceSkus: ResourceSkus; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface StoragePoolManagementOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface StoragePoolOperationDisplay { + description: string; + operation: string; + provider: string; + resource: string; +} + +// @public +export interface StoragePoolOperationListResult { + nextLink?: string; + value: StoragePoolRPOperation[]; +} + +// @public +export interface StoragePoolRPOperation { + actionType?: string; + display: StoragePoolOperationDisplay; + isDataAction: boolean; + name: string; + origin?: string; +} + +// @public +export interface SystemMetadata { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/storagepool/arm-storagepool/rollup.config.js b/sdk/storagepool/arm-storagepool/rollup.config.js new file mode 100644 index 000000000000..9be1955eb7f1 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/rollup.config.js @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/storagepool/arm-storagepool/src/index.ts b/sdk/storagepool/arm-storagepool/src/index.ts new file mode 100644 index 000000000000..2453ea81da1d --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { StoragePoolManagement } from "./storagePoolManagement"; +export * from "./operationsInterfaces"; diff --git a/sdk/storagepool/arm-storagepool/src/lroImpl.ts b/sdk/storagepool/arm-storagepool/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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 { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/storagepool/arm-storagepool/src/models/index.ts b/sdk/storagepool/arm-storagepool/src/models/index.ts new file mode 100644 index 000000000000..1483ad01ac0a --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/models/index.ts @@ -0,0 +1,884 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** List of operations supported by the RP. */ +export interface StoragePoolOperationListResult { + /** An array of operations supported by the StoragePool RP. */ + value: StoragePoolRPOperation[]; + /** URI to fetch the next section of the paginated response. */ + nextLink?: string; +} + +/** Description of a StoragePool RP Operation */ +export interface StoragePoolRPOperation { + /** The name of the operation being performed on this particular object */ + name: string; + /** Indicates whether the operation applies to data-plane. */ + isDataAction: boolean; + /** Indicates the action type. */ + actionType?: string; + /** Additional metadata about RP operation. */ + display: StoragePoolOperationDisplay; + /** The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. */ + origin?: string; +} + +/** Metadata about an operation. */ +export interface StoragePoolOperationDisplay { + /** Localized friendly form of the resource provider name. */ + provider: string; + /** Localized friendly form of the resource type related to this action/operation. */ + resource: string; + /** Localized friendly name for the operation, as it should be shown to the user. */ + operation: string; + /** Localized friendly description for the operation, as it should be shown to the user. */ + description: string; +} + +/** The resource management error response. */ +export interface ErrorModel { + /** RP error response. */ + error?: ErrorResponse; +} + +/** The resource management error response. */ +export interface ErrorResponse { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** List of Disk Pools */ +export interface DiskPoolListResult { + /** An array of Disk pool objects. */ + value: DiskPool[]; + /** + * URI to fetch the next section of the paginated response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Sku for ARM resource */ +export interface Sku { + /** Sku name */ + name: string; + /** Sku tier */ + tier?: string; +} + +/** Azure Managed Disk to attach to the Disk Pool. */ +export interface Disk { + /** Unique Azure Resource ID of the Managed Disk. */ + id: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemMetadata { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The type of identity that last modified the resource. */ + lastModifiedAt?: Date; +} + +/** ARM resource model definition. */ +export interface Resource { + /** + * Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Request payload for create or update Disk Pool request. */ +export interface DiskPoolCreate { + /** Determines the SKU of the Disk Pool */ + sku: Sku; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives. */ + location: string; + /** + * Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Azure resource id. Indicates if this resource is managed by another Azure resource. */ + managedBy?: string; + /** List of Azure resource ids that manage this resource. */ + managedByExtended?: string[]; + /** Logical zone for Disk Pool resource; example: ["1"]. */ + availabilityZones?: string[]; + /** List of Azure Managed Disks to attach to a Disk Pool. */ + disks?: Disk[]; + /** Azure Resource ID of a Subnet for the Disk Pool. */ + subnetId: string; + /** List of additional capabilities for a Disk Pool. */ + additionalCapabilities?: string[]; +} + +/** Request payload for Update Disk Pool request. */ +export interface DiskPoolUpdate { + /** Azure resource id. Indicates if this resource is managed by another Azure resource. */ + managedBy?: string; + /** List of Azure resource ids that manage this resource. */ + managedByExtended?: string[]; + /** Determines the SKU of the Disk Pool */ + sku?: Sku; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** List of Azure Managed Disks to attach to a Disk Pool. */ + disks?: Disk[]; +} + +/** List Disk Pool skus operation response. */ +export interface DiskPoolZoneListResult { + /** + * The list of Disk Pool Skus. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DiskPoolZoneInfo[]; + /** + * URI to fetch the next section of the paginated response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Disk Pool SKU Details */ +export interface DiskPoolZoneInfo { + /** + * Logical zone for Disk Pool resource; example: ["1"]. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly availabilityZones?: string[]; + /** + * List of additional capabilities for Disk Pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalCapabilities?: string[]; + /** + * Determines the SKU of VM deployed for Disk Pool + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sku?: Sku; +} + +/** List Disk Pool skus operation response. */ +export interface ResourceSkuListResult { + /** The list of StoragePool resource skus. */ + value?: ResourceSkuInfo[]; + /** URI to fetch the next section of the paginated response. */ + nextLink?: string; +} + +/** Resource SKU Details */ +export interface ResourceSkuInfo { + /** + * StoragePool RP API version + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiVersion?: string; + /** + * StoragePool resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * List of additional capabilities for StoragePool resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ResourceSkuCapability[]; + /** + * Zones and zone capabilities in those locations where the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locationInfo?: ResourceSkuLocationInfo; + /** + * Sku name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Sku tier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tier?: string; + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictions?: ResourceSkuRestrictions[]; +} + +/** Capability a resource SKU has. */ +export interface ResourceSkuCapability { + /** + * Capability name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Capability value + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; +} + +/** Zone and capability info for resource sku */ +export interface ResourceSkuLocationInfo { + /** + * Location of the SKU + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * List of availability zones where the SKU is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; + /** + * Details of capabilities available to a SKU in specific zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zoneDetails?: ResourceSkuZoneDetails[]; +} + +/** Describes The zonal capabilities of a SKU. */ +export interface ResourceSkuZoneDetails { + /** + * The set of zones that the SKU is available in with the specified capabilities. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string[]; + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ResourceSkuCapability[]; +} + +/** Describes scaling information of a SKU. */ +export interface ResourceSkuRestrictions { + /** + * The type of restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: ResourceSkuRestrictionsType; + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly values?: string[]; + /** + * The information about the restriction where the SKU cannot be used. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictionInfo?: ResourceSkuRestrictionInfo; + /** + * The reason for restriction. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reasonCode?: ResourceSkuRestrictionsReasonCode; +} + +/** Describes an available Compute SKU Restriction Information. */ +export interface ResourceSkuRestrictionInfo { + /** + * Locations where the SKU is restricted + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: string[]; + /** + * List of availability zones where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; +} + +/** Collection of Outbound Environment Endpoints */ +export interface OutboundEnvironmentEndpointList { + /** Collection of resources. */ + value: OutboundEnvironmentEndpoint[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Endpoints accessed for a common purpose that the App Service Environment requires outbound network access to. */ +export interface OutboundEnvironmentEndpoint { + /** The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ + category?: string; + /** The endpoints that the App Service Environment reaches the service at. */ + endpoints?: EndpointDependency[]; +} + +/** A domain name that a service is reached at, including details of the current connection status. */ +export interface EndpointDependency { + /** The domain name of the dependency. */ + domainName?: string; + /** The IP Addresses and Ports used when connecting to DomainName. */ + endpointDetails?: EndpointDetail[]; +} + +/** Current TCP connectivity information from the App Service Environment to a single endpoint. */ +export interface EndpointDetail { + /** An IP Address that Domain Name currently resolves to. */ + ipAddress?: string; + /** The port an endpoint is connected to. */ + port?: number; + /** The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. */ + latency?: number; + /** Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. */ + isAccessible?: boolean; +} + +/** List of iSCSI Targets. */ +export interface IscsiTargetList { + /** An array of iSCSI Targets in a Disk Pool. */ + value: IscsiTarget[]; + /** + * URI to fetch the next section of the paginated response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Access Control List (ACL) for an iSCSI Target; defines LUN masking policy */ +export interface Acl { + /** iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client". */ + initiatorIqn: string; + /** List of LUN names mapped to the ACL. */ + mappedLuns: string[]; +} + +/** LUN to expose the Azure Managed Disk. */ +export interface IscsiLun { + /** User defined name for iSCSI LUN; example: "lun0" */ + name: string; + /** Azure Resource ID of the Managed Disk. */ + managedDiskAzureResourceId: string; + /** + * Specifies the Logical Unit Number of the iSCSI LUN. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lun?: number; +} + +/** The resource model definition for a ARM tracked top level resource. */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives. */ + location: string; +}; + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +export type ProxyResource = Resource & {}; + +/** Response for Disk Pool request. */ +export type DiskPool = TrackedResource & { + /** + * Azure resource id. Indicates if this resource is managed by another Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedBy?: string; + /** + * List of Azure resource ids that manage this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedByExtended?: string[]; + /** + * Resource metadata required by ARM RPC + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemMetadata; + /** + * State of the operation on the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState: ProvisioningStates; + /** Logical zone for Disk Pool resource; example: ["1"]. */ + availabilityZones: string[]; + /** Operational status of the Disk Pool. */ + status: OperationalStatus; + /** List of Azure Managed Disks to attach to a Disk Pool. */ + disks?: Disk[]; + /** Azure Resource ID of a Subnet for the Disk Pool. */ + subnetId: string; + /** List of additional capabilities for Disk Pool. */ + additionalCapabilities?: string[]; + /** Sku name */ + nameSkuName?: string; + /** Sku tier */ + tier?: string; +}; + +/** Response for iSCSI Target requests. */ +export type IscsiTarget = ProxyResource & { + /** + * Resource metadata required by ARM RPC + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemMetadata; + /** + * Azure resource id. Indicates if this resource is managed by another Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedBy?: string; + /** + * List of Azure resource ids that manage this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedByExtended?: string[]; + /** Mode for Target connectivity. */ + aclMode: IscsiTargetAclMode; + /** Access Control List (ACL) for an iSCSI Target; defines LUN masking policy */ + staticAcls?: Acl[]; + /** List of LUNs to be exposed through iSCSI Target. */ + luns?: IscsiLun[]; + /** iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server". */ + targetIqn: string; + /** + * State of the operation on the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState: ProvisioningStates; + /** Operational status of the iSCSI Target. */ + status: OperationalStatus; + /** List of private IPv4 addresses to connect to the iSCSI Target. */ + endpoints?: string[]; + /** The port used by iSCSI Target portal group. */ + port?: number; + /** + * List of identifiers for active sessions on the iSCSI target + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sessions?: string[]; +}; + +/** Payload for iSCSI Target create or update requests. */ +export type IscsiTargetCreate = ProxyResource & { + /** Azure resource id. Indicates if this resource is managed by another Azure resource. */ + managedBy?: string; + /** List of Azure resource ids that manage this resource. */ + managedByExtended?: string[]; + /** Mode for Target connectivity. */ + aclMode: IscsiTargetAclMode; + /** iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server". */ + targetIqn?: string; + /** Access Control List (ACL) for an iSCSI Target; defines LUN masking policy */ + staticAcls?: Acl[]; + /** List of LUNs to be exposed through iSCSI Target. */ + luns?: IscsiLun[]; +}; + +/** Payload for iSCSI Target update requests. */ +export type IscsiTargetUpdate = ProxyResource & { + /** Azure resource id. Indicates if this resource is managed by another Azure resource. */ + managedBy?: string; + /** List of Azure resource ids that manage this resource. */ + managedByExtended?: string[]; + /** Access Control List (ACL) for an iSCSI Target; defines LUN masking policy */ + staticAcls?: Acl[]; + /** List of LUNs to be exposed through iSCSI Target. */ + luns?: IscsiLun[]; +}; + +/** Known values of {@link ProvisioningStates} that the service accepts. */ +export enum KnownProvisioningStates { + Invalid = "Invalid", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Pending = "Pending", + Creating = "Creating", + Updating = "Updating", + Deleting = "Deleting" +} + +/** + * Defines values for ProvisioningStates. \ + * {@link KnownProvisioningStates} can be used interchangeably with ProvisioningStates, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Pending** \ + * **Creating** \ + * **Updating** \ + * **Deleting** + */ +export type ProvisioningStates = string; + +/** Known values of {@link OperationalStatus} that the service accepts. */ +export enum KnownOperationalStatus { + Invalid = "Invalid", + Unknown = "Unknown", + Healthy = "Healthy", + Unhealthy = "Unhealthy", + Updating = "Updating", + Running = "Running", + Stopped = "Stopped", + StoppedDeallocated = "Stopped (deallocated)" +} + +/** + * Defines values for OperationalStatus. \ + * {@link KnownOperationalStatus} can be used interchangeably with OperationalStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Unknown** \ + * **Healthy** \ + * **Unhealthy** \ + * **Updating** \ + * **Running** \ + * **Stopped** \ + * **Stopped (deallocated)** + */ +export type OperationalStatus = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link IscsiTargetAclMode} that the service accepts. */ +export enum KnownIscsiTargetAclMode { + Dynamic = "Dynamic", + Static = "Static" +} + +/** + * Defines values for IscsiTargetAclMode. \ + * {@link KnownIscsiTargetAclMode} can be used interchangeably with IscsiTargetAclMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dynamic** \ + * **Static** + */ +export type IscsiTargetAclMode = string; + +/** Known values of {@link DiskPoolTier} that the service accepts. */ +export enum KnownDiskPoolTier { + Basic = "Basic", + Standard = "Standard", + Premium = "Premium" +} + +/** + * Defines values for DiskPoolTier. \ + * {@link KnownDiskPoolTier} can be used interchangeably with DiskPoolTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic** \ + * **Standard** \ + * **Premium** + */ +export type DiskPoolTier = string; +/** Defines values for ResourceSkuRestrictionsType. */ +export type ResourceSkuRestrictionsType = "Location" | "Zone"; +/** Defines values for ResourceSkuRestrictionsReasonCode. */ +export type ResourceSkuRestrictionsReasonCode = + | "QuotaId" + | "NotAvailableForSubscription"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = StoragePoolOperationListResult; + +/** Optional parameters. */ +export interface DiskPoolsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type DiskPoolsListBySubscriptionResponse = DiskPoolListResult; + +/** Optional parameters. */ +export interface DiskPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type DiskPoolsListByResourceGroupResponse = DiskPoolListResult; + +/** Optional parameters. */ +export interface DiskPoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DiskPoolsCreateOrUpdateResponse = DiskPool; + +/** Optional parameters. */ +export interface DiskPoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DiskPoolsUpdateResponse = DiskPool; + +/** Optional parameters. */ +export interface DiskPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DiskPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DiskPoolsGetResponse = DiskPool; + +/** Optional parameters. */ +export interface DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOutboundNetworkDependenciesEndpoints operation. */ +export type DiskPoolsListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointList; + +/** Optional parameters. */ +export interface DiskPoolsStartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DiskPoolsDeallocateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DiskPoolsUpgradeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DiskPoolsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type DiskPoolsListBySubscriptionNextResponse = DiskPoolListResult; + +/** Optional parameters. */ +export interface DiskPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type DiskPoolsListByResourceGroupNextResponse = DiskPoolListResult; + +/** Optional parameters. */ +export interface DiskPoolsListOutboundNetworkDependenciesEndpointsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOutboundNetworkDependenciesEndpointsNext operation. */ +export type DiskPoolsListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointList; + +/** Optional parameters. */ +export interface DiskPoolZonesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DiskPoolZonesListResponse = DiskPoolZoneListResult; + +/** Optional parameters. */ +export interface DiskPoolZonesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DiskPoolZonesListNextResponse = DiskPoolZoneListResult; + +/** Optional parameters. */ +export interface ResourceSkusListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ResourceSkusListResponse = ResourceSkuListResult; + +/** Optional parameters. */ +export interface ResourceSkusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ResourceSkusListNextResponse = ResourceSkuListResult; + +/** Optional parameters. */ +export interface IscsiTargetsListByDiskPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDiskPool operation. */ +export type IscsiTargetsListByDiskPoolResponse = IscsiTargetList; + +/** Optional parameters. */ +export interface IscsiTargetsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type IscsiTargetsCreateOrUpdateResponse = IscsiTarget; + +/** Optional parameters. */ +export interface IscsiTargetsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type IscsiTargetsUpdateResponse = IscsiTarget; + +/** Optional parameters. */ +export interface IscsiTargetsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface IscsiTargetsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type IscsiTargetsGetResponse = IscsiTarget; + +/** Optional parameters. */ +export interface IscsiTargetsListByDiskPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDiskPoolNext operation. */ +export type IscsiTargetsListByDiskPoolNextResponse = IscsiTargetList; + +/** Optional parameters. */ +export interface StoragePoolManagementOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/storagepool/arm-storagepool/src/models/mappers.ts b/sdk/storagepool/arm-storagepool/src/models/mappers.ts new file mode 100644 index 000000000000..319eca42db62 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/models/mappers.ts @@ -0,0 +1,1431 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const StoragePoolOperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StoragePoolOperationListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StoragePoolRPOperation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StoragePoolRPOperation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StoragePoolRPOperation", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + required: true, + type: { + name: "Boolean" + } + }, + actionType: { + serializedName: "actionType", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "StoragePoolOperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + } + } + } +}; + +export const StoragePoolOperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StoragePoolOperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + required: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + required: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const DiskPoolListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPoolListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Sku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const Disk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Disk", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SystemMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemMetadata", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiskPoolCreate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPoolCreate", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + availabilityZones: { + serializedName: "properties.availabilityZones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disks: { + serializedName: "properties.disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Disk" + } + } + } + }, + subnetId: { + serializedName: "properties.subnetId", + required: true, + type: { + name: "String" + } + }, + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DiskPoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPoolUpdate", + modelProperties: { + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + disks: { + serializedName: "properties.disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Disk" + } + } + } + } + } + } +}; + +export const DiskPoolZoneListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPoolZoneListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskPoolZoneInfo" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiskPoolZoneInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPoolZoneInfo", + modelProperties: { + availabilityZones: { + serializedName: "availabilityZones", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + additionalCapabilities: { + serializedName: "additionalCapabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + +export const ResourceSkuListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuInfo" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuInfo", + modelProperties: { + apiVersion: { + serializedName: "apiVersion", + readOnly: true, + type: { + name: "String" + } + }, + resourceType: { + serializedName: "resourceType", + readOnly: true, + type: { + name: "String" + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCapability" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + type: { + name: "Composite", + className: "ResourceSkuLocationInfo" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + readOnly: true, + type: { + name: "String" + } + }, + restrictions: { + serializedName: "restrictions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuRestrictions" + } + } + } + } + } + } +}; + +export const ResourceSkuCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuCapability", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuLocationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuLocationInfo", + modelProperties: { + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zoneDetails: { + serializedName: "zoneDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuZoneDetails" + } + } + } + } + } + } +}; + +export const ResourceSkuZoneDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuZoneDetails", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCapability" + } + } + } + } + } + } +}; + +export const ResourceSkuRestrictions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuRestrictions", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Location", "Zone"] + } + }, + values: { + serializedName: "values", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + restrictionInfo: { + serializedName: "restrictionInfo", + type: { + name: "Composite", + className: "ResourceSkuRestrictionInfo" + } + }, + reasonCode: { + serializedName: "reasonCode", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["QuotaId", "NotAvailableForSubscription"] + } + } + } + } +}; + +export const ResourceSkuRestrictionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuRestrictionInfo", + modelProperties: { + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zones: { + serializedName: "zones", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OutboundEnvironmentEndpointList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + +export const EndpointDependency: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const EndpointDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + latency: { + serializedName: "latency", + type: { + name: "Number" + } + }, + isAccessible: { + serializedName: "isAccessible", + type: { + name: "Boolean" + } + } + } + } +}; + +export const IscsiTargetList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IscsiTargetList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IscsiTarget" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Acl: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Acl", + modelProperties: { + initiatorIqn: { + serializedName: "initiatorIqn", + required: true, + type: { + name: "String" + } + }, + mappedLuns: { + serializedName: "mappedLuns", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IscsiLun: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IscsiLun", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + managedDiskAzureResourceId: { + serializedName: "managedDiskAzureResourceId", + required: true, + type: { + name: "String" + } + }, + lun: { + serializedName: "lun", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const DiskPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskPool", + modelProperties: { + ...TrackedResource.type.modelProperties, + managedBy: { + serializedName: "managedBy", + readOnly: true, + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemMetadata" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + required: true, + readOnly: true, + type: { + name: "String" + } + }, + availabilityZones: { + serializedName: "properties.availabilityZones", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + status: { + serializedName: "properties.status", + required: true, + type: { + name: "String" + } + }, + disks: { + serializedName: "properties.disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Disk" + } + } + } + }, + subnetId: { + serializedName: "properties.subnetId", + required: true, + type: { + name: "String" + } + }, + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nameSkuName: { + serializedName: "sku.name", + type: { + name: "String" + } + }, + tier: { + serializedName: "sku.tier", + type: { + name: "String" + } + } + } + } +}; + +export const IscsiTarget: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IscsiTarget", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemMetadata" + } + }, + managedBy: { + serializedName: "managedBy", + readOnly: true, + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + aclMode: { + serializedName: "properties.aclMode", + required: true, + type: { + name: "String" + } + }, + staticAcls: { + serializedName: "properties.staticAcls", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Acl" + } + } + } + }, + luns: { + serializedName: "properties.luns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IscsiLun" + } + } + } + }, + targetIqn: { + serializedName: "properties.targetIqn", + required: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + required: true, + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + required: true, + type: { + name: "String" + } + }, + endpoints: { + serializedName: "properties.endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + port: { + serializedName: "properties.port", + type: { + name: "Number" + } + }, + sessions: { + serializedName: "properties.sessions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IscsiTargetCreate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IscsiTargetCreate", + modelProperties: { + ...ProxyResource.type.modelProperties, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + aclMode: { + serializedName: "properties.aclMode", + required: true, + type: { + name: "String" + } + }, + targetIqn: { + serializedName: "properties.targetIqn", + type: { + name: "String" + } + }, + staticAcls: { + serializedName: "properties.staticAcls", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Acl" + } + } + } + }, + luns: { + serializedName: "properties.luns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IscsiLun" + } + } + } + } + } + } +}; + +export const IscsiTargetUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IscsiTargetUpdate", + modelProperties: { + ...ProxyResource.type.modelProperties, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + managedByExtended: { + serializedName: "managedByExtended", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + staticAcls: { + serializedName: "properties.staticAcls", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Acl" + } + } + } + }, + luns: { + serializedName: "properties.luns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IscsiLun" + } + } + } + } + } + } +}; diff --git a/sdk/storagepool/arm-storagepool/src/models/parameters.ts b/sdk/storagepool/arm-storagepool/src/models/parameters.ts new file mode 100644 index 000000000000..22c6ebfb997e --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/models/parameters.ts @@ -0,0 +1,162 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + DiskPoolCreate as DiskPoolCreateMapper, + DiskPoolUpdate as DiskPoolUpdateMapper, + IscsiTargetCreate as IscsiTargetCreateMapper, + IscsiTargetUpdate as IscsiTargetUpdateMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-08-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._]*[0-9A-Za-z]$"), + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const diskPoolCreatePayload: OperationParameter = { + parameterPath: "diskPoolCreatePayload", + mapper: DiskPoolCreateMapper +}; + +export const diskPoolName: OperationURLParameter = { + parameterPath: "diskPoolName", + mapper: { + serializedName: "diskPoolName", + required: true, + type: { + name: "String" + } + } +}; + +export const diskPoolUpdatePayload: OperationParameter = { + parameterPath: "diskPoolUpdatePayload", + mapper: DiskPoolUpdateMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const iscsiTargetCreatePayload: OperationParameter = { + parameterPath: "iscsiTargetCreatePayload", + mapper: IscsiTargetCreateMapper +}; + +export const iscsiTargetName: OperationURLParameter = { + parameterPath: "iscsiTargetName", + mapper: { + serializedName: "iscsiTargetName", + required: true, + type: { + name: "String" + } + } +}; + +export const iscsiTargetUpdatePayload: OperationParameter = { + parameterPath: "iscsiTargetUpdatePayload", + mapper: IscsiTargetUpdateMapper +}; diff --git a/sdk/storagepool/arm-storagepool/src/operations/diskPoolZones.ts b/sdk/storagepool/arm-storagepool/src/operations/diskPoolZones.ts new file mode 100644 index 000000000000..07eb8415ec53 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/diskPoolZones.ts @@ -0,0 +1,158 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskPoolZones } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { StoragePoolManagement } from "../storagePoolManagement"; +import { + DiskPoolZoneInfo, + DiskPoolZonesListNextOptionalParams, + DiskPoolZonesListOptionalParams, + DiskPoolZonesListResponse, + DiskPoolZonesListNextResponse +} from "../models"; + +/// +/** Class containing DiskPoolZones operations. */ +export class DiskPoolZonesImpl implements DiskPoolZones { + private readonly client: StoragePoolManagement; + + /** + * Initialize a new instance of the class DiskPoolZones class. + * @param client Reference to the service client + */ + constructor(client: StoragePoolManagement) { + this.client = client; + } + + /** + * Lists available Disk Pool Skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + public list( + location: string, + options?: DiskPoolZonesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: DiskPoolZonesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: DiskPoolZonesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * Lists available Disk Pool Skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + private _list( + location: string, + options?: DiskPoolZonesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param location The location of the resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: DiskPoolZonesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/locations/{location}/diskPoolZones", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolZoneListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolZoneListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagepool/arm-storagepool/src/operations/diskPools.ts b/sdk/storagepool/arm-storagepool/src/operations/diskPools.ts new file mode 100644 index 000000000000..9c58fc717d63 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/diskPools.ts @@ -0,0 +1,1162 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { StoragePoolManagement } from "../storagePoolManagement"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DiskPool, + DiskPoolsListBySubscriptionNextOptionalParams, + DiskPoolsListBySubscriptionOptionalParams, + DiskPoolsListByResourceGroupNextOptionalParams, + DiskPoolsListByResourceGroupOptionalParams, + OutboundEnvironmentEndpoint, + DiskPoolsListOutboundNetworkDependenciesEndpointsNextOptionalParams, + DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams, + DiskPoolsListBySubscriptionResponse, + DiskPoolsListByResourceGroupResponse, + DiskPoolCreate, + DiskPoolsCreateOrUpdateOptionalParams, + DiskPoolsCreateOrUpdateResponse, + DiskPoolUpdate, + DiskPoolsUpdateOptionalParams, + DiskPoolsUpdateResponse, + DiskPoolsDeleteOptionalParams, + DiskPoolsGetOptionalParams, + DiskPoolsGetResponse, + DiskPoolsListOutboundNetworkDependenciesEndpointsResponse, + DiskPoolsStartOptionalParams, + DiskPoolsDeallocateOptionalParams, + DiskPoolsUpgradeOptionalParams, + DiskPoolsListBySubscriptionNextResponse, + DiskPoolsListByResourceGroupNextResponse, + DiskPoolsListOutboundNetworkDependenciesEndpointsNextResponse +} from "../models"; + +/// +/** Class containing DiskPools operations. */ +export class DiskPoolsImpl implements DiskPools { + private readonly client: StoragePoolManagement; + + /** + * Initialize a new instance of the class DiskPools class. + * @param client Reference to the service client + */ + constructor(client: StoragePoolManagement) { + this.client = client; + } + + /** + * Gets a list of Disk Pools in a subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: DiskPoolsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: DiskPoolsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: DiskPoolsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of DiskPools in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: DiskPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: DiskPoolsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DiskPoolsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets the network endpoints of all outbound dependencies of a Disk Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + public listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listOutboundNetworkDependenciesEndpointsPagingAll( + resourceGroupName, + diskPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName, + diskPoolName, + options + ); + } + }; + } + + private async *listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + ): AsyncIterableIterator { + let result = await this._listOutboundNetworkDependenciesEndpoints( + resourceGroupName, + diskPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listOutboundNetworkDependenciesEndpointsNext( + resourceGroupName, + diskPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listOutboundNetworkDependenciesEndpointsPagingAll( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName, + diskPoolName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of Disk Pools in a subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: DiskPoolsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Gets a list of DiskPools in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: DiskPoolsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Create or Update Disk pool. This create or update operation can take 15 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolCreatePayload Request payload for Disk Pool create operation + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + diskPoolName: string, + diskPoolCreatePayload: DiskPoolCreate, + options?: DiskPoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskPoolsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, diskPoolCreatePayload, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Create or Update Disk pool. This create or update operation can take 15 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolCreatePayload Request payload for Disk Pool create operation + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + diskPoolCreatePayload: DiskPoolCreate, + options?: DiskPoolsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + diskPoolName, + diskPoolCreatePayload, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolUpdatePayload Request payload for Disk Pool update operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + diskPoolName: string, + diskPoolUpdatePayload: DiskPoolUpdate, + options?: DiskPoolsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskPoolsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, diskPoolUpdatePayload, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Update a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolUpdatePayload Request payload for Disk Pool update operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + diskPoolUpdatePayload: DiskPoolUpdate, + options?: DiskPoolsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + diskPoolName, + diskPoolUpdatePayload, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to + * complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to + * complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + diskPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, options }, + getOperationSpec + ); + } + + /** + * Gets the network endpoints of all outbound dependencies of a Disk Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + private _listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, options }, + listOutboundNetworkDependenciesEndpointsOperationSpec + ); + } + + /** + * The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsStartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, options }, + startOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + diskPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute + * resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected + * service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginDeallocate( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeallocateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, options }, + deallocateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute + * resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected + * service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginDeallocateAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeallocateOptionalParams + ): Promise { + const poller = await this.beginDeallocate( + resourceGroupName, + diskPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 + * minutes to complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginUpgrade( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsUpgradeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, options }, + upgradeOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 + * minutes to complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + async beginUpgradeAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsUpgradeOptionalParams + ): Promise { + const poller = await this.beginUpgrade( + resourceGroupName, + diskPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: DiskPoolsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: DiskPoolsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListOutboundNetworkDependenciesEndpointsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param nextLink The nextLink from the previous successful call to the + * ListOutboundNetworkDependenciesEndpoints method. + * @param options The options parameters. + */ + private _listOutboundNetworkDependenciesEndpointsNext( + resourceGroupName: string, + diskPoolName: string, + nextLink: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, nextLink, options }, + listOutboundNetworkDependenciesEndpointsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/diskPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiskPool + }, + 201: { + bodyMapper: Mappers.DiskPool + }, + 202: { + bodyMapper: Mappers.DiskPool + }, + 204: { + bodyMapper: Mappers.DiskPool + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + requestBody: Parameters.diskPoolCreatePayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DiskPool + }, + 201: { + bodyMapper: Mappers.DiskPool + }, + 202: { + bodyMapper: Mappers.DiskPool + }, + 204: { + bodyMapper: Mappers.DiskPool + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + requestBody: Parameters.diskPoolUpdatePayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPool + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointList + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/start", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deallocateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/deallocate", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const upgradeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointList + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagepool/arm-storagepool/src/operations/index.ts b/sdk/storagepool/arm-storagepool/src/operations/index.ts new file mode 100644 index 000000000000..6a66223d1e84 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./diskPools"; +export * from "./diskPoolZones"; +export * from "./resourceSkus"; +export * from "./iscsiTargets"; diff --git a/sdk/storagepool/arm-storagepool/src/operations/iscsiTargets.ts b/sdk/storagepool/arm-storagepool/src/operations/iscsiTargets.ts new file mode 100644 index 000000000000..10a3c14d069d --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/iscsiTargets.ts @@ -0,0 +1,624 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { IscsiTargets } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { StoragePoolManagement } from "../storagePoolManagement"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + IscsiTarget, + IscsiTargetsListByDiskPoolNextOptionalParams, + IscsiTargetsListByDiskPoolOptionalParams, + IscsiTargetsListByDiskPoolResponse, + IscsiTargetCreate, + IscsiTargetsCreateOrUpdateOptionalParams, + IscsiTargetsCreateOrUpdateResponse, + IscsiTargetUpdate, + IscsiTargetsUpdateOptionalParams, + IscsiTargetsUpdateResponse, + IscsiTargetsDeleteOptionalParams, + IscsiTargetsGetOptionalParams, + IscsiTargetsGetResponse, + IscsiTargetsListByDiskPoolNextResponse +} from "../models"; + +/// +/** Class containing IscsiTargets operations. */ +export class IscsiTargetsImpl implements IscsiTargets { + private readonly client: StoragePoolManagement; + + /** + * Initialize a new instance of the class IscsiTargets class. + * @param client Reference to the service client + */ + constructor(client: StoragePoolManagement) { + this.client = client; + } + + /** + * Get iSCSI Targets in a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + public listByDiskPool( + resourceGroupName: string, + diskPoolName: string, + options?: IscsiTargetsListByDiskPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDiskPoolPagingAll( + resourceGroupName, + diskPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDiskPoolPagingPage( + resourceGroupName, + diskPoolName, + options + ); + } + }; + } + + private async *listByDiskPoolPagingPage( + resourceGroupName: string, + diskPoolName: string, + options?: IscsiTargetsListByDiskPoolOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDiskPool( + resourceGroupName, + diskPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDiskPoolNext( + resourceGroupName, + diskPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDiskPoolPagingAll( + resourceGroupName: string, + diskPoolName: string, + options?: IscsiTargetsListByDiskPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDiskPoolPagingPage( + resourceGroupName, + diskPoolName, + options + )) { + yield* page; + } + } + + /** + * Get iSCSI Targets in a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + private _listByDiskPool( + resourceGroupName: string, + diskPoolName: string, + options?: IscsiTargetsListByDiskPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, options }, + listByDiskPoolOperationSpec + ); + } + + /** + * Create or Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetCreatePayload: IscsiTargetCreate, + options?: IscsiTargetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + IscsiTargetsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + diskPoolName, + iscsiTargetName, + iscsiTargetCreatePayload, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Create or Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetCreatePayload: IscsiTargetCreate, + options?: IscsiTargetsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + diskPoolName, + iscsiTargetName, + iscsiTargetCreatePayload, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetUpdatePayload: IscsiTargetUpdate, + options?: IscsiTargetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + IscsiTargetsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + diskPoolName, + iscsiTargetName, + iscsiTargetUpdatePayload, + options + }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetUpdatePayload: IscsiTargetUpdate, + options?: IscsiTargetsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + diskPoolName, + iscsiTargetName, + iscsiTargetUpdatePayload, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, diskPoolName, iscsiTargetName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Delete an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + diskPoolName, + iscsiTargetName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, iscsiTargetName, options }, + getOperationSpec + ); + } + + /** + * ListByDiskPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param nextLink The nextLink from the previous successful call to the ListByDiskPool method. + * @param options The options parameters. + */ + private _listByDiskPoolNext( + resourceGroupName: string, + diskPoolName: string, + nextLink: string, + options?: IscsiTargetsListByDiskPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskPoolName, nextLink, options }, + listByDiskPoolNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDiskPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/iscsiTargets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IscsiTargetList + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IscsiTarget + }, + 201: { + bodyMapper: Mappers.IscsiTarget + }, + 202: { + bodyMapper: Mappers.IscsiTarget + }, + 204: { + bodyMapper: Mappers.IscsiTarget + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + requestBody: Parameters.iscsiTargetCreatePayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.iscsiTargetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IscsiTarget + }, + 201: { + bodyMapper: Mappers.IscsiTarget + }, + 202: { + bodyMapper: Mappers.IscsiTarget + }, + 204: { + bodyMapper: Mappers.IscsiTarget + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + requestBody: Parameters.iscsiTargetUpdatePayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.iscsiTargetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.iscsiTargetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IscsiTarget + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.iscsiTargetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDiskPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IscsiTargetList + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.diskPoolName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagepool/arm-storagepool/src/operations/operations.ts b/sdk/storagepool/arm-storagepool/src/operations/operations.ts new file mode 100644 index 000000000000..937f3eb1b4d8 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/operations.ts @@ -0,0 +1,98 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { StoragePoolManagement } from "../storagePoolManagement"; +import { + StoragePoolRPOperation, + OperationsListOptionalParams, + OperationsListResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: StoragePoolManagement; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: StoragePoolManagement) { + this.client = client; + } + + /** + * Gets a list of StoragePool operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of StoragePool operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.StoragePool/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StoragePoolOperationListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagepool/arm-storagepool/src/operations/resourceSkus.ts b/sdk/storagepool/arm-storagepool/src/operations/resourceSkus.ts new file mode 100644 index 000000000000..0eb3898ca1c6 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operations/resourceSkus.ts @@ -0,0 +1,158 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ResourceSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { StoragePoolManagement } from "../storagePoolManagement"; +import { + ResourceSkuInfo, + ResourceSkusListNextOptionalParams, + ResourceSkusListOptionalParams, + ResourceSkusListResponse, + ResourceSkusListNextResponse +} from "../models"; + +/// +/** Class containing ResourceSkus operations. */ +export class ResourceSkusImpl implements ResourceSkus { + private readonly client: StoragePoolManagement; + + /** + * Initialize a new instance of the class ResourceSkus class. + * @param client Reference to the service client + */ + constructor(client: StoragePoolManagement) { + this.client = client; + } + + /** + * Lists available StoragePool resources and skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + public list( + location: string, + options?: ResourceSkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: ResourceSkusListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: ResourceSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * Lists available StoragePool resources and skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + private _list( + location: string, + options?: ResourceSkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param location The location of the resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: ResourceSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/locations/{location}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPoolZones.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPoolZones.ts new file mode 100644 index 000000000000..7b0ab0cd9f09 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPoolZones.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskPoolZoneInfo, DiskPoolZonesListOptionalParams } from "../models"; + +/// +/** Interface representing a DiskPoolZones. */ +export interface DiskPoolZones { + /** + * Lists available Disk Pool Skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + list( + location: string, + options?: DiskPoolZonesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPools.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPools.ts new file mode 100644 index 000000000000..747fd89baa0d --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/diskPools.ts @@ -0,0 +1,234 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DiskPool, + DiskPoolsListBySubscriptionOptionalParams, + DiskPoolsListByResourceGroupOptionalParams, + OutboundEnvironmentEndpoint, + DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams, + DiskPoolCreate, + DiskPoolsCreateOrUpdateOptionalParams, + DiskPoolsCreateOrUpdateResponse, + DiskPoolUpdate, + DiskPoolsUpdateOptionalParams, + DiskPoolsUpdateResponse, + DiskPoolsDeleteOptionalParams, + DiskPoolsGetOptionalParams, + DiskPoolsGetResponse, + DiskPoolsStartOptionalParams, + DiskPoolsDeallocateOptionalParams, + DiskPoolsUpgradeOptionalParams +} from "../models"; + +/// +/** Interface representing a DiskPools. */ +export interface DiskPools { + /** + * Gets a list of Disk Pools in a subscription + * @param options The options parameters. + */ + listBySubscription( + options?: DiskPoolsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of DiskPools in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DiskPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the network endpoints of all outbound dependencies of a Disk Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsListOutboundNetworkDependenciesEndpointsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or Update Disk pool. This create or update operation can take 15 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolCreatePayload Request payload for Disk Pool create operation + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + diskPoolName: string, + diskPoolCreatePayload: DiskPoolCreate, + options?: DiskPoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskPoolsCreateOrUpdateResponse + > + >; + /** + * Create or Update Disk pool. This create or update operation can take 15 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolCreatePayload Request payload for Disk Pool create operation + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + diskPoolCreatePayload: DiskPoolCreate, + options?: DiskPoolsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolUpdatePayload Request payload for Disk Pool update operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + diskPoolName: string, + diskPoolUpdatePayload: DiskPoolUpdate, + options?: DiskPoolsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskPoolsUpdateResponse + > + >; + /** + * Update a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param diskPoolUpdatePayload Request payload for Disk Pool update operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + diskPoolUpdatePayload: DiskPoolUpdate, + options?: DiskPoolsUpdateOptionalParams + ): Promise; + /** + * Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to + * complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to + * complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeleteOptionalParams + ): Promise; + /** + * Get a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsGetOptionalParams + ): Promise; + /** + * The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsStartOptionalParams + ): Promise, void>>; + /** + * The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is + * expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsStartOptionalParams + ): Promise; + /** + * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute + * resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected + * service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginDeallocate( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeallocateOptionalParams + ): Promise, void>>; + /** + * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute + * resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected + * service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginDeallocateAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsDeallocateOptionalParams + ): Promise; + /** + * Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 + * minutes to complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginUpgrade( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsUpgradeOptionalParams + ): Promise, void>>; + /** + * Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 + * minutes to complete. This is expected service behavior. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + beginUpgradeAndWait( + resourceGroupName: string, + diskPoolName: string, + options?: DiskPoolsUpgradeOptionalParams + ): Promise; +} diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/index.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..6a66223d1e84 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./diskPools"; +export * from "./diskPoolZones"; +export * from "./resourceSkus"; +export * from "./iscsiTargets"; diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/iscsiTargets.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/iscsiTargets.ts new file mode 100644 index 000000000000..01c53a166999 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/iscsiTargets.ts @@ -0,0 +1,148 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + IscsiTarget, + IscsiTargetsListByDiskPoolOptionalParams, + IscsiTargetCreate, + IscsiTargetsCreateOrUpdateOptionalParams, + IscsiTargetsCreateOrUpdateResponse, + IscsiTargetUpdate, + IscsiTargetsUpdateOptionalParams, + IscsiTargetsUpdateResponse, + IscsiTargetsDeleteOptionalParams, + IscsiTargetsGetOptionalParams, + IscsiTargetsGetResponse +} from "../models"; + +/// +/** Interface representing a IscsiTargets. */ +export interface IscsiTargets { + /** + * Get iSCSI Targets in a Disk pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param options The options parameters. + */ + listByDiskPool( + resourceGroupName: string, + diskPoolName: string, + options?: IscsiTargetsListByDiskPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetCreatePayload: IscsiTargetCreate, + options?: IscsiTargetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + IscsiTargetsCreateOrUpdateResponse + > + >; + /** + * Create or Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetCreatePayload: IscsiTargetCreate, + options?: IscsiTargetsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetUpdatePayload: IscsiTargetUpdate, + options?: IscsiTargetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + IscsiTargetsUpdateResponse + > + >; + /** + * Update an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + iscsiTargetUpdatePayload: IscsiTargetUpdate, + options?: IscsiTargetsUpdateOptionalParams + ): Promise; + /** + * Delete an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsDeleteOptionalParams + ): Promise; + /** + * Get an iSCSI Target. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param diskPoolName The name of the Disk Pool. + * @param iscsiTargetName The name of the iSCSI Target. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskPoolName: string, + iscsiTargetName: string, + options?: IscsiTargetsGetOptionalParams + ): Promise; +} diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/operations.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..d6593fd9febd --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/operations.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + StoragePoolRPOperation, + OperationsListOptionalParams +} from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Gets a list of StoragePool operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/storagepool/arm-storagepool/src/operationsInterfaces/resourceSkus.ts b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/resourceSkus.ts new file mode 100644 index 000000000000..58501f78c6cd --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/operationsInterfaces/resourceSkus.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ResourceSkuInfo, ResourceSkusListOptionalParams } from "../models"; + +/// +/** Interface representing a ResourceSkus. */ +export interface ResourceSkus { + /** + * Lists available StoragePool resources and skus in an Azure location. + * @param location The location of the resource. + * @param options The options parameters. + */ + list( + location: string, + options?: ResourceSkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/storagepool/arm-storagepool/src/storagePoolManagement.ts b/sdk/storagepool/arm-storagepool/src/storagePoolManagement.ts new file mode 100644 index 000000000000..588ed5288cd6 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/src/storagePoolManagement.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + DiskPoolsImpl, + DiskPoolZonesImpl, + ResourceSkusImpl, + IscsiTargetsImpl +} from "./operations"; +import { + Operations, + DiskPools, + DiskPoolZones, + ResourceSkus, + IscsiTargets +} from "./operationsInterfaces"; +import { StoragePoolManagementOptionalParams } from "./models"; + +export class StoragePoolManagement extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the StoragePoolManagement class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: StoragePoolManagementOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: StoragePoolManagementOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-storagepool/1.0.0`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-08-01"; + this.operations = new OperationsImpl(this); + this.diskPools = new DiskPoolsImpl(this); + this.diskPoolZones = new DiskPoolZonesImpl(this); + this.resourceSkus = new ResourceSkusImpl(this); + this.iscsiTargets = new IscsiTargetsImpl(this); + } + + operations: Operations; + diskPools: DiskPools; + diskPoolZones: DiskPoolZones; + resourceSkus: ResourceSkus; + iscsiTargets: IscsiTargets; +} diff --git a/sdk/storagepool/arm-storagepool/test/sampleTest.ts b/sdk/storagepool/arm-storagepool/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/storagepool/arm-storagepool/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/storagepool/arm-storagepool/tsconfig.json b/sdk/storagepool/arm-storagepool/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/storagepool/arm-storagepool/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/storagepool/ci.mgmt.yml b/sdk/storagepool/ci.mgmt.yml new file mode 100644 index 000000000000..8626f4a87ebb --- /dev/null +++ b/sdk/storagepool/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/storagepool/arm-storagepool + - sdk/storagepool/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/storagepool/arm-storagepool + - sdk/storagepool/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: storagepool + Artifacts: + - name: azure-arm-storagepool + safeName: azurearmstoragepool + \ No newline at end of file