From e4180547c9d692a01ee3555c2df1ec3c35ff6828 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Apr 2022 14:24:59 +0000 Subject: [PATCH] CodeGen from PR 18516 in Azure/azure-rest-api-specs Merge 77e7ac959fd580aa463d059b45302fcbfdfc90a5 into 49f003bd7b06f60a7be792d6b38a20678c7610cc --- common/config/rush/pnpm-lock.yaml | 73 +- sdk/netapp/arm-netapp/CHANGELOG.md | 59 +- sdk/netapp/arm-netapp/README.md | 11 - sdk/netapp/arm-netapp/_meta.json | 7 +- sdk/netapp/arm-netapp/package.json | 34 +- .../arm-netapp/review/arm-netapp.api.md | 179 +++++ sdk/netapp/arm-netapp/rollup.config.js | 78 ++- sdk/netapp/arm-netapp/src/models/index.ts | 250 +++++++ sdk/netapp/arm-netapp/src/models/mappers.ts | 265 +++++++- .../arm-netapp/src/models/parameters.ts | 25 +- .../arm-netapp/src/netAppManagementClient.ts | 8 +- sdk/netapp/arm-netapp/src/operations/index.ts | 1 + .../src/operations/netAppResource.ts | 38 +- .../arm-netapp/src/operations/subvolumes.ts | 4 +- .../arm-netapp/src/operations/volumeGroups.ts | 2 +- .../src/operations/volumeQuotaRules.ts | 633 ++++++++++++++++++ .../arm-netapp/src/operations/volumes.ts | 475 +++++++++++++ .../src/operationsInterfaces/index.ts | 1 + .../operationsInterfaces/netAppResource.ts | 13 +- .../operationsInterfaces/volumeQuotaRules.ts | 178 +++++ .../src/operationsInterfaces/volumes.ts | 145 +++- sdk/netapp/arm-netapp/tsconfig.json | 10 +- 22 files changed, 2374 insertions(+), 115 deletions(-) create mode 100644 sdk/netapp/arm-netapp/src/operations/volumeQuotaRules.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/volumeQuotaRules.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7de863365c2a..cf691dba27fd 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -950,7 +950,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.4 @@ -2211,7 +2211,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/chai-as-promised/7.1.5: @@ -2237,14 +2237,14 @@ packages: /@types/concurrently/6.4.0: resolution: {integrity: sha512-CYU1eyFHsIa2IZIsb8gfUOdiewfnZcyM2Hg1Zaq95xnmB0Ix/bTRM8SttqZ2Cjy6JGPZLttHjZewVsDg1yvnJg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 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.23 dev: false /@types/cookie/0.4.1: @@ -2279,7 +2279,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.23 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2296,26 +2296,26 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 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.23 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.23 dev: false /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/json-schema/7.0.11: @@ -2329,13 +2329,13 @@ packages: /@types/jsonwebtoken/8.5.8: resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 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.23 dev: false /@types/long/4.0.1: @@ -2379,13 +2379,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 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.23 dev: false /@types/ms/0.7.31: @@ -2399,7 +2399,7 @@ packages: /@types/node-fetch/2.6.1: resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 form-data: 3.0.1 dev: false @@ -2449,7 +2449,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.23 dev: false /@types/sinon/10.0.11: @@ -2471,7 +2471,7 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/tough-cookie/4.0.1: @@ -2481,13 +2481,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/underscore/1.11.4: @@ -2505,26 +2505,26 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/xml2js/0.4.9: resolution: {integrity: sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 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.23 dev: false optional: true @@ -3480,7 +3480,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: @@ -3673,7 +3673,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: @@ -3726,7 +3726,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.47 + '@types/node': 17.0.23 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4567,7 +4567,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 @@ -8352,7 +8352,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: @@ -11672,28 +11672,27 @@ packages: dev: false file:projects/arm-netapp.tgz: - resolution: {integrity: sha512-BxqmyPJTZGmcXiuya10kSyUifo4nWfNo6MiuleBAIEzMHzb4/9hXmv7h/n4y8AAE7lRRGDWrYGJaIBZyjb2gyw==, tarball: file:projects/arm-netapp.tgz} + resolution: {integrity: sha512-ovCe7gK7PTpM+0vh0odxrCi8yCeEAS3DHjkyeG9VryTXs3PlWdAjdxCR1L+Je0veUslcb2DIxv4B6dekCPCFvg==, tarball: file:projects/arm-netapp.tgz} name: '@rush-temp/arm-netapp' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.20.0 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.1 + '@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: 2.70.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1 + 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: - - '@types/node' - debug - encoding - supports-color @@ -13885,7 +13884,7 @@ packages: dev: false file:projects/container-registry.tgz: - resolution: {integrity: sha512-U8TB+c/MH1S02t4Txr9nTwOwPhMbb0FF+NN3u6OygxUxqQ1qlAMHzsftThJ5dV3NaxDY0C/IK+sByjpdA+JW2g==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-Yy25dpy6b7M310M6r89FOmCXXSQbMbigkeycE7KINWRRUV3mhfwHuSQ/zC2AXcDw/0h2L8eP31jPBmDVjvJGQw==, tarball: file:projects/container-registry.tgz} name: '@rush-temp/container-registry' version: 0.0.0 dependencies: @@ -15787,7 +15786,7 @@ packages: dev: false file:projects/perf-container-registry.tgz: - resolution: {integrity: sha512-f1d8SgAGyCMLwSSjvnmuGhxOk8DeXWh9DHBU/8T2V/IIld5Mpn9h4+52Ntqk+YV2aTHgCpU7bYUtxRdNV7Scbw==, tarball: file:projects/perf-container-registry.tgz} + resolution: {integrity: sha512-gkB506Dy2h2Vykbvr0dCeqPjI3RmPR4CqJw1vtjZpzh7LiQhrNT088dJ88HhLq5hkJk+7343NqxOexTTAU205g==, tarball: file:projects/perf-container-registry.tgz} name: '@rush-temp/perf-container-registry' version: 0.0.0 dependencies: diff --git a/sdk/netapp/arm-netapp/CHANGELOG.md b/sdk/netapp/arm-netapp/CHANGELOG.md index 698f45a5b1bc..36582ba450a1 100644 --- a/sdk/netapp/arm-netapp/CHANGELOG.md +++ b/sdk/netapp/arm-netapp/CHANGELOG.md @@ -1,15 +1,54 @@ # Release History + +## 15.2.0 (2022-04-04) + +**Features** -## 15.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group VolumeQuotaRules + - Added operation NetAppResource.queryRegionInfo + - Added operation Volumes.beginFinalizeRelocation + - Added operation Volumes.beginFinalizeRelocationAndWait + - Added operation Volumes.beginRelocate + - Added operation Volumes.beginRelocateAndWait + - Added operation Volumes.beginResetCifsPassword + - Added operation Volumes.beginResetCifsPasswordAndWait + - Added operation Volumes.beginRevertRelocation + - Added operation Volumes.beginRevertRelocationAndWait + - Added operation Volumes.listReplications + - Added Interface ListReplications + - Added Interface NetAppResourceQueryRegionInfoOptionalParams + - Added Interface RegionInfo + - Added Interface RegionInfoAvailabilityZoneMappingsItem + - Added Interface Replication + - Added Interface VolumeQuotaRule + - Added Interface VolumeQuotaRulesCreateOptionalParams + - Added Interface VolumeQuotaRulesDeleteOptionalParams + - Added Interface VolumeQuotaRulesGetOptionalParams + - Added Interface VolumeQuotaRulesList + - Added Interface VolumeQuotaRulesListByVolumeOptionalParams + - Added Interface VolumeQuotaRulesUpdateOptionalParams + - Added Interface VolumeRelocationProperties + - Added Interface VolumesFinalizeRelocationOptionalParams + - Added Interface VolumesListReplicationsOptionalParams + - Added Interface VolumesRelocateOptionalParams + - Added Interface VolumesResetCifsPasswordOptionalParams + - Added Interface VolumesRevertRelocationOptionalParams + - Added Type Alias NetAppResourceQueryRegionInfoResponse + - Added Type Alias RegionStorageToNetworkProximity + - Added Type Alias Type + - Added Type Alias VolumeQuotaRulesCreateResponse + - Added Type Alias VolumeQuotaRulesGetResponse + - Added Type Alias VolumeQuotaRulesListByVolumeResponse + - Added Type Alias VolumeQuotaRulesUpdateResponse + - Added Type Alias VolumesListReplicationsResponse + - Interface Volume has a new optional parameter encrypted + - Interface Volume has a new optional parameter zones + - Interface VolumeGroupVolumeProperties has a new optional parameter encrypted + - Class NetAppManagementClient has a new parameter volumeQuotaRules + - Added Enum KnownRegionStorageToNetworkProximity + - Added Enum KnownType + + ## 15.1.0 (2022-03-02) **Features** diff --git a/sdk/netapp/arm-netapp/README.md b/sdk/netapp/arm-netapp/README.md index 7cd680ea18e0..2d9c2f1ee4ef 100644 --- a/sdk/netapp/arm-netapp/README.md +++ b/sdk/netapp/arm-netapp/README.md @@ -16,8 +16,6 @@ Microsoft NetApp Files Azure Resource Provider specification - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { NetAppManagementClient } = require("@azure/arm-netapp"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetAppManagementClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new NetAppManagementClient(credential, subscriptionId); ``` diff --git a/sdk/netapp/arm-netapp/_meta.json b/sdk/netapp/arm-netapp/_meta.json index 65edcc8c1236..8e07e0600e78 100644 --- a/sdk/netapp/arm-netapp/_meta.json +++ b/sdk/netapp/arm-netapp/_meta.json @@ -1,7 +1,8 @@ { - "commit": "4042a47cff72c950d35dd72149895b044ed79713", + "commit": "8e3bb03c4761ede2e9ca8380914d446c9c4ee52f", "readme": "specification/netapp/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=D:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\netapp\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/netapp/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", - "use": "@autorest/typescript@6.0.0-beta.16" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.3", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/package.json b/sdk/netapp/arm-netapp/package.json index c6aa28bcc876..113ae9425618 100644 --- a/sdk/netapp/arm-netapp/package.json +++ b/sdk/netapp/arm-netapp/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetAppManagementClient.", - "version": "15.1.1", + "version": "15.2.0", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-netapp.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@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": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/netAppManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-netapp?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/review/arm-netapp.api.md b/sdk/netapp/arm-netapp/review/arm-netapp.api.md index c780220e6668..41efb538aff3 100644 --- a/sdk/netapp/arm-netapp/review/arm-netapp.api.md +++ b/sdk/netapp/arm-netapp/review/arm-netapp.api.md @@ -650,6 +650,14 @@ export enum KnownQosType { Manual = "Manual" } +// @public +export enum KnownRegionStorageToNetworkProximity { + Default = "Default", + T1 = "T1", + T1AndT2 = "T1AndT2", + T2 = "T2" +} + // @public export enum KnownRelationshipStatus { // (undocumented) @@ -684,6 +692,14 @@ export enum KnownServiceLevel { Ultra = "Ultra" } +// @public +export enum KnownType { + DefaultGroupQuota = "DefaultGroupQuota", + DefaultUserQuota = "DefaultUserQuota", + IndividualGroupQuota = "IndividualGroupQuota", + IndividualUserQuota = "IndividualUserQuota" +} + // @public export enum KnownVolumeStorageToNetworkProximity { Default = "Default", @@ -698,6 +714,11 @@ export interface LdapSearchScopeOpt { userDN?: string; } +// @public +export interface ListReplications { + value?: Replication[]; +} + // @public export interface LogSpecification { displayName?: string; @@ -834,6 +855,8 @@ export class NetAppManagementClient extends coreClient.ServiceClient { // (undocumented) volumeGroups: VolumeGroups; // (undocumented) + volumeQuotaRules: VolumeQuotaRules; + // (undocumented) volumes: Volumes; } @@ -849,6 +872,7 @@ export interface NetAppResource { checkFilePathAvailability(location: string, name: string, subnetId: string, options?: NetAppResourceCheckFilePathAvailabilityOptionalParams): Promise; checkNameAvailability(location: string, name: string, resourceGroup: string, typeParam: CheckNameResourceTypes, options?: NetAppResourceCheckNameAvailabilityOptionalParams): Promise; checkQuotaAvailability(location: string, name: string, resourceGroup: string, typeParam: CheckQuotaNameResourceTypes, options?: NetAppResourceCheckQuotaAvailabilityOptionalParams): Promise; + queryRegionInfo(location: string, options?: NetAppResourceQueryRegionInfoOptionalParams): Promise; } // @public @@ -872,6 +896,13 @@ export interface NetAppResourceCheckQuotaAvailabilityOptionalParams extends core // @public export type NetAppResourceCheckQuotaAvailabilityResponse = CheckAvailabilityResponse; +// @public +export interface NetAppResourceQueryRegionInfoOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceQueryRegionInfoResponse = RegionInfo; + // @public export interface NetAppResourceQuotaLimits { get(location: string, quotaLimitName: string, options?: NetAppResourceQuotaLimitsGetOptionalParams): Promise; @@ -1009,9 +1040,32 @@ export interface QuotaAvailabilityRequest { type: CheckQuotaNameResourceTypes; } +// @public +export interface RegionInfo { + availabilityZoneMappings?: RegionInfoAvailabilityZoneMappingsItem[]; + storageToNetworkProximity?: RegionStorageToNetworkProximity; +} + +// @public (undocumented) +export interface RegionInfoAvailabilityZoneMappingsItem { + availabilityZone?: string; + isAvailable?: boolean; +} + +// @public +export type RegionStorageToNetworkProximity = string; + // @public export type RelationshipStatus = string; +// @public +export interface Replication { + endpointType?: EndpointType; + remoteVolumeRegion?: string; + remoteVolumeResourceId: string; + replicationSchedule?: ReplicationSchedule; +} + // @public export interface ReplicationObject { endpointType?: EndpointType; @@ -1402,6 +1456,9 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export type Type = string; + // @public export interface Vault { readonly id?: string; @@ -1442,6 +1499,7 @@ export interface Volume { defaultGroupQuotaInKiBs?: number; defaultUserQuotaInKiBs?: number; enableSubvolumes?: EnableSubvolumes; + readonly encrypted?: boolean; encryptionKeySource?: string; readonly etag?: string; exportPolicy?: VolumePropertiesExportPolicy; @@ -1481,6 +1539,7 @@ export interface Volume { readonly volumeGroupName?: string; volumeSpecName?: string; volumeType?: string; + zones?: string[]; } // @public @@ -1593,6 +1652,7 @@ export interface VolumeGroupVolumeProperties { defaultGroupQuotaInKiBs?: number; defaultUserQuotaInKiBs?: number; enableSubvolumes?: EnableSubvolumes; + readonly encrypted?: boolean; encryptionKeySource?: string; exportPolicy?: VolumePropertiesExportPolicy; readonly fileSystemId?: string; @@ -1680,6 +1740,85 @@ export interface VolumePropertiesExportPolicy { rules?: ExportPolicyRule[]; } +// @public +export interface VolumeQuotaRule { + readonly etag?: string; + readonly id?: string; + location?: string; + readonly name?: string; + readonly provisioningState?: string; + quotaSizeInKiBs?: number; + quotaTarget?: string; + quotaType?: Type; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface VolumeQuotaRules { + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, body: VolumeQuotaRule, options?: VolumeQuotaRulesCreateOptionalParams): Promise, VolumeQuotaRulesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, body: VolumeQuotaRule, options?: VolumeQuotaRulesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, options?: VolumeQuotaRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, options?: VolumeQuotaRulesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, body: VolumeQuotaRule, options?: VolumeQuotaRulesUpdateOptionalParams): Promise, VolumeQuotaRulesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, body: VolumeQuotaRule, options?: VolumeQuotaRulesUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, volumeQuotaRuleName: string, options?: VolumeQuotaRulesGetOptionalParams): Promise; + listByVolume(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumeQuotaRulesListByVolumeOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VolumeQuotaRulesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumeQuotaRulesCreateResponse = VolumeQuotaRule; + +// @public +export interface VolumeQuotaRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumeQuotaRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumeQuotaRulesGetResponse = VolumeQuotaRule; + +// @public +export interface VolumeQuotaRulesList { + value?: VolumeQuotaRule[]; +} + +// @public +export interface VolumeQuotaRulesListByVolumeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumeQuotaRulesListByVolumeResponse = VolumeQuotaRulesList; + +// @public +export interface VolumeQuotaRulesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumeQuotaRulesUpdateResponse = VolumeQuotaRule; + +// @public +export interface VolumeRelocationProperties { + oldBareMetalTenantId?: string; + oldVolumeId?: string; + relocationRequested?: boolean; +} + // @public export interface VolumeRevert { snapshotId?: string; @@ -1697,18 +1836,27 @@ export interface Volumes { beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise; beginDeleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteReplicationOptionalParams): Promise, void>>; beginDeleteReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteReplicationOptionalParams): Promise; + beginFinalizeRelocation(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesFinalizeRelocationOptionalParams): Promise, void>>; + beginFinalizeRelocationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesFinalizeRelocationOptionalParams): Promise; beginPoolChange(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: PoolChangeRequest, options?: VolumesPoolChangeOptionalParams): Promise, void>>; beginPoolChangeAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: PoolChangeRequest, options?: VolumesPoolChangeOptionalParams): Promise; beginReInitializeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReInitializeReplicationOptionalParams): Promise, void>>; beginReInitializeReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReInitializeReplicationOptionalParams): Promise; + beginRelocate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesRelocateOptionalParams): Promise, void>>; + beginRelocateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesRelocateOptionalParams): Promise; + beginResetCifsPassword(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResetCifsPasswordOptionalParams): Promise, void>>; + beginResetCifsPasswordAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResetCifsPasswordOptionalParams): Promise; beginResyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResyncReplicationOptionalParams): Promise, void>>; beginResyncReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResyncReplicationOptionalParams): Promise; beginRevert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumeRevert, options?: VolumesRevertOptionalParams): Promise, void>>; beginRevertAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumeRevert, options?: VolumesRevertOptionalParams): Promise; + beginRevertRelocation(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesRevertRelocationOptionalParams): Promise, void>>; + beginRevertRelocationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesRevertRelocationOptionalParams): Promise; beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumePatch, options?: VolumesUpdateOptionalParams): Promise, VolumesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumePatch, options?: VolumesUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, poolName: string, options?: VolumesListOptionalParams): PagedAsyncIterableIterator; + listReplications(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesListReplicationsOptionalParams): Promise; replicationStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReplicationStatusOptionalParams): Promise; } @@ -1747,6 +1895,12 @@ export interface VolumesDeleteReplicationOptionalParams extends coreClient.Opera updateIntervalInMs?: number; } +// @public +export interface VolumesFinalizeRelocationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface VolumesGetOptionalParams extends coreClient.OperationOptions { } @@ -1765,6 +1919,13 @@ export type VolumesListNextResponse = VolumeList; export interface VolumesListOptionalParams extends coreClient.OperationOptions { } +// @public +export interface VolumesListReplicationsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumesListReplicationsResponse = ListReplications; + // @public export type VolumesListResponse = VolumeList; @@ -1785,6 +1946,12 @@ export interface VolumesReInitializeReplicationOptionalParams extends coreClient updateIntervalInMs?: number; } +// @public +export interface VolumesRelocateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface VolumesReplicationStatusOptionalParams extends coreClient.OperationOptions { } @@ -1792,6 +1959,12 @@ export interface VolumesReplicationStatusOptionalParams extends coreClient.Opera // @public export type VolumesReplicationStatusResponse = ReplicationStatus; +// @public +export interface VolumesResetCifsPasswordOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface VolumesResyncReplicationOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1804,6 +1977,12 @@ export interface VolumesRevertOptionalParams extends coreClient.OperationOptions updateIntervalInMs?: number; } +// @public +export interface VolumesRevertRelocationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export type VolumeStorageToNetworkProximity = string; diff --git a/sdk/netapp/arm-netapp/rollup.config.js b/sdk/netapp/arm-netapp/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/netapp/arm-netapp/rollup.config.js +++ b/sdk/netapp/arm-netapp/rollup.config.js @@ -14,14 +14,62 @@ 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 rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + 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 }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index 2d7d17e641a1..2717f312b8a1 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -177,6 +177,21 @@ export interface Resource { readonly type?: string; } +/** Provides region specific information. */ +export interface RegionInfo { + /** Provides storage to network proximity information in the region. */ + storageToNetworkProximity?: RegionStorageToNetworkProximity; + /** Provides logical availability zone mappings for the subscription for a region. */ + availabilityZoneMappings?: RegionInfoAvailabilityZoneMappingsItem[]; +} + +export interface RegionInfoAvailabilityZoneMappingsItem { + /** Logical availability zone. */ + availabilityZone?: string; + /** Available availability zone */ + isAvailable?: boolean; +} + /** List of NetApp account resources */ export interface NetAppAccountList { /** Multiple NetApp accounts */ @@ -475,6 +490,8 @@ export interface Volume { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; + /** Availability Zone */ + zones?: string[]; /** * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -590,6 +607,11 @@ export interface Volume { readonly t2Network?: string; /** Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log */ volumeSpecName?: string; + /** + * Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly encrypted?: boolean; /** Application specific placement rules for the particular volume */ placementRules?: PlacementKeyValuePairs[]; /** Flag indicating whether subvolume operations are enabled on the volume */ @@ -785,6 +807,24 @@ export interface ReplicationStatus { errorMessage?: string; } +/** List Replications */ +export interface ListReplications { + /** A list of replications */ + value?: Replication[]; +} + +/** Replication properties */ +export interface Replication { + /** Indicates whether the local volume is the source or destination for the Volume Replication */ + endpointType?: EndpointType; + /** Schedule */ + replicationSchedule?: ReplicationSchedule; + /** The resource ID of the remote volume. */ + remoteVolumeResourceId: string; + /** The remote region for the other end of the Volume Replication. */ + remoteVolumeRegion?: string; +} + /** Authorize request */ export interface AuthorizeRequest { /** Resource id of the remote volume */ @@ -1312,6 +1352,56 @@ export interface BackupPolicyPatch { readonly volumeBackups?: VolumeBackups[]; } +/** List of Volume Quota Rules */ +export interface VolumeQuotaRulesList { + /** A list of Volume Quota Rules */ + value?: VolumeQuotaRule[]; +} + +/** Quota Rule of a Volume */ +export interface VolumeQuotaRule { + /** Resource location */ + location?: string; + /** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Size of quota */ + quotaSizeInKiBs?: number; + /** Type of quota */ + quotaType?: Type; + /** UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running */ + quotaTarget?: string; +} + /** List of Vaults */ export interface VaultList { /** A list of vaults */ @@ -1554,6 +1644,11 @@ export interface VolumeGroupVolumeProperties { readonly t2Network?: string; /** Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log */ volumeSpecName?: string; + /** + * Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly encrypted?: boolean; /** Application specific placement rules for the particular volume */ placementRules?: PlacementKeyValuePairs[]; /** Flag indicating whether subvolume operations are enabled on the volume */ @@ -1631,6 +1726,16 @@ export interface ResourceIdentity { type?: string; } +/** Volume relocation properties */ +export interface VolumeRelocationProperties { + /** The id of the old volume that is being relocated */ + oldVolumeId?: string; + /** The id of the bare metal tenant owned by the existing volume */ + oldBareMetalTenantId?: string; + /** Has relocation been requested for this volume */ + relocationRequested?: boolean; +} + /** Mount Target */ export interface MountTarget { /** Resource location */ @@ -1889,6 +1994,30 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link RegionStorageToNetworkProximity} that the service accepts. */ +export enum KnownRegionStorageToNetworkProximity { + /** Basic network connectivity. */ + Default = "Default", + /** Standard T1 network connectivity. */ + T1 = "T1", + /** Standard T2 network connectivity. */ + T2 = "T2", + /** Standard T1 and T2 network connectivity. */ + T1AndT2 = "T1AndT2" +} + +/** + * Defines values for RegionStorageToNetworkProximity. \ + * {@link KnownRegionStorageToNetworkProximity} can be used interchangeably with RegionStorageToNetworkProximity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Basic network connectivity. \ + * **T1**: Standard T1 network connectivity. \ + * **T2**: Standard T2 network connectivity. \ + * **T1AndT2**: Standard T1 and T2 network connectivity. + */ +export type RegionStorageToNetworkProximity = string; + /** Known values of {@link ActiveDirectoryStatus} that the service accepts. */ export enum KnownActiveDirectoryStatus { /** Active Directory created but not in use */ @@ -2169,6 +2298,30 @@ export enum KnownBackupType { */ export type BackupType = string; +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + /** Default user quota */ + DefaultUserQuota = "DefaultUserQuota", + /** Default group quota */ + DefaultGroupQuota = "DefaultGroupQuota", + /** Individual user quota */ + IndividualUserQuota = "IndividualUserQuota", + /** Individual group quota */ + IndividualGroupQuota = "IndividualGroupQuota" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DefaultUserQuota**: Default user quota \ + * **DefaultGroupQuota**: Default group quota \ + * **IndividualUserQuota**: Individual user quota \ + * **IndividualGroupQuota**: Individual group quota + */ +export type Type = string; + /** Known values of {@link ApplicationType} that the service accepts. */ export enum KnownApplicationType { SAPHana = "SAP-HANA" @@ -2211,6 +2364,13 @@ export interface NetAppResourceCheckQuotaAvailabilityOptionalParams /** Contains response data for the checkQuotaAvailability operation. */ export type NetAppResourceCheckQuotaAvailabilityResponse = CheckAvailabilityResponse; +/** Optional parameters. */ +export interface NetAppResourceQueryRegionInfoOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the queryRegionInfo operation. */ +export type NetAppResourceQueryRegionInfoResponse = RegionInfo; + /** Optional parameters. */ export interface NetAppResourceQuotaLimitsListOptionalParams extends coreClient.OperationOptions {} @@ -2400,6 +2560,15 @@ export interface VolumesRevertOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface VolumesResetCifsPasswordOptionalParams + 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 VolumesBreakReplicationOptionalParams extends coreClient.OperationOptions { @@ -2418,6 +2587,13 @@ export interface VolumesReplicationStatusOptionalParams /** Contains response data for the replicationStatus operation. */ export type VolumesReplicationStatusResponse = ReplicationStatus; +/** Optional parameters. */ +export interface VolumesListReplicationsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listReplications operation. */ +export type VolumesListReplicationsResponse = ListReplications; + /** Optional parameters. */ export interface VolumesResyncReplicationOptionalParams extends coreClient.OperationOptions { @@ -2463,6 +2639,33 @@ export interface VolumesPoolChangeOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface VolumesRelocateOptionalParams + 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 VolumesFinalizeRelocationOptionalParams + 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 VolumesRevertRelocationOptionalParams + 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 VolumesListNextOptionalParams extends coreClient.OperationOptions {} @@ -2707,6 +2910,53 @@ export interface BackupPoliciesDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface VolumeQuotaRulesListByVolumeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVolume operation. */ +export type VolumeQuotaRulesListByVolumeResponse = VolumeQuotaRulesList; + +/** Optional parameters. */ +export interface VolumeQuotaRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VolumeQuotaRulesGetResponse = VolumeQuotaRule; + +/** Optional parameters. */ +export interface VolumeQuotaRulesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type VolumeQuotaRulesCreateResponse = VolumeQuotaRule; + +/** Optional parameters. */ +export interface VolumeQuotaRulesUpdateOptionalParams + 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 VolumeQuotaRulesUpdateResponse = VolumeQuotaRule; + +/** Optional parameters. */ +export interface VolumeQuotaRulesDeleteOptionalParams + 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 VaultsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/netapp/arm-netapp/src/models/mappers.ts b/sdk/netapp/arm-netapp/src/models/mappers.ts index 0616182ef74d..a2ae5a5f6ed4 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -499,6 +499,54 @@ export const Resource: coreClient.CompositeMapper = { } }; +export const RegionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionInfo", + modelProperties: { + storageToNetworkProximity: { + serializedName: "storageToNetworkProximity", + type: { + name: "String" + } + }, + availabilityZoneMappings: { + serializedName: "availabilityZoneMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionInfoAvailabilityZoneMappingsItem" + } + } + } + } + } + } +}; + +export const RegionInfoAvailabilityZoneMappingsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionInfoAvailabilityZoneMappingsItem", + modelProperties: { + availabilityZone: { + serializedName: "availabilityZone", + type: { + name: "String" + } + }, + isAvailable: { + serializedName: "isAvailable", + type: { + name: "Boolean" + } + } + } + } +}; + export const NetAppAccountList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1245,6 +1293,21 @@ export const Volume: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + zones: { + serializedName: "zones", + type: { + name: "Sequence", + element: { + constraints: { + MaxLength: 255, + MinLength: 1 + }, + type: { + name: "String" + } + } + } + }, systemData: { serializedName: "systemData", type: { @@ -1460,7 +1523,6 @@ export const Volume: coreClient.CompositeMapper = { } }, throughputMibps: { - defaultValue: 0, serializedName: "properties.throughputMibps", type: { name: "Number" @@ -1583,6 +1645,13 @@ export const Volume: coreClient.CompositeMapper = { name: "String" } }, + encrypted: { + serializedName: "properties.encrypted", + readOnly: true, + type: { + name: "Boolean" + } + }, placementRules: { serializedName: "properties.placementRules", type: { @@ -1990,7 +2059,6 @@ export const VolumePatch: coreClient.CompositeMapper = { } }, throughputMibps: { - defaultValue: 0, serializedName: "properties.throughputMibps", type: { name: "Number" @@ -2152,6 +2220,61 @@ export const ReplicationStatus: coreClient.CompositeMapper = { } }; +export const ListReplications: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListReplications", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replication" + } + } + } + } + } + } +}; + +export const Replication: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Replication", + modelProperties: { + endpointType: { + serializedName: "endpointType", + type: { + name: "String" + } + }, + replicationSchedule: { + serializedName: "replicationSchedule", + type: { + name: "String" + } + }, + remoteVolumeResourceId: { + serializedName: "remoteVolumeResourceId", + required: true, + type: { + name: "String" + } + }, + remoteVolumeRegion: { + serializedName: "remoteVolumeRegion", + type: { + name: "String" + } + } + } + } +}; + export const AuthorizeRequest: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3260,6 +3383,109 @@ export const BackupPolicyPatch: coreClient.CompositeMapper = { } }; +export const VolumeQuotaRulesList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeQuotaRulesList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeQuotaRule" + } + } + } + } + } + } +}; + +export const VolumeQuotaRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeQuotaRule", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + quotaSizeInKiBs: { + serializedName: "properties.quotaSizeInKiBs", + type: { + name: "Number" + } + }, + quotaType: { + serializedName: "properties.quotaType", + type: { + name: "String" + } + }, + quotaTarget: { + serializedName: "properties.quotaTarget", + type: { + name: "String" + } + } + } + } +}; + export const VaultList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3763,7 +3989,6 @@ export const VolumeGroupVolumeProperties: coreClient.CompositeMapper = { } }, throughputMibps: { - defaultValue: 0, serializedName: "properties.throughputMibps", type: { name: "Number" @@ -3886,6 +4111,13 @@ export const VolumeGroupVolumeProperties: coreClient.CompositeMapper = { name: "String" } }, + encrypted: { + serializedName: "properties.encrypted", + readOnly: true, + type: { + name: "Boolean" + } + }, placementRules: { serializedName: "properties.placementRules", type: { @@ -4077,6 +4309,33 @@ export const ResourceIdentity: coreClient.CompositeMapper = { } }; +export const VolumeRelocationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeRelocationProperties", + modelProperties: { + oldVolumeId: { + serializedName: "oldVolumeId", + type: { + name: "String" + } + }, + oldBareMetalTenantId: { + serializedName: "oldBareMetalTenantId", + type: { + name: "String" + } + }, + relocationRequested: { + serializedName: "relocationRequested", + type: { + name: "Boolean" + } + } + } + } +}; + export const MountTarget: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index c56539b94245..0ffa8db0c316 100644 --- a/sdk/netapp/arm-netapp/src/models/parameters.ts +++ b/sdk/netapp/arm-netapp/src/models/parameters.ts @@ -33,6 +33,7 @@ import { BackupPatch as BackupPatchMapper, BackupPolicy as BackupPolicyMapper, BackupPolicyPatch as BackupPolicyPatchMapper, + VolumeQuotaRule as VolumeQuotaRuleMapper, VolumeGroupDetails as VolumeGroupDetailsMapper, SubvolumeInfo as SubvolumeInfoMapper, SubvolumePatchRequest as SubvolumePatchRequestMapper @@ -65,7 +66,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-10-01", + defaultValue: "2022-01-01", isConstant: true, serializedName: "api-version", type: { @@ -386,6 +387,22 @@ export const body21: OperationParameter = { mapper: BackupPolicyPatchMapper }; +export const volumeQuotaRuleName: OperationURLParameter = { + parameterPath: "volumeQuotaRuleName", + mapper: { + serializedName: "volumeQuotaRuleName", + required: true, + type: { + name: "String" + } + } +}; + +export const body22: OperationParameter = { + parameterPath: "body", + mapper: VolumeQuotaRuleMapper +}; + export const volumeGroupName: OperationURLParameter = { parameterPath: "volumeGroupName", mapper: { @@ -402,7 +419,7 @@ export const volumeGroupName: OperationURLParameter = { } }; -export const body22: OperationParameter = { +export const body23: OperationParameter = { parameterPath: "body", mapper: VolumeGroupDetailsMapper }; @@ -423,12 +440,12 @@ export const subvolumeName: OperationURLParameter = { } }; -export const body23: OperationParameter = { +export const body24: OperationParameter = { parameterPath: "body", mapper: SubvolumeInfoMapper }; -export const body24: OperationParameter = { +export const body25: OperationParameter = { parameterPath: "body", mapper: SubvolumePatchRequestMapper }; diff --git a/sdk/netapp/arm-netapp/src/netAppManagementClient.ts b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts index 3ec63e5350ac..607d3c6dc8d3 100644 --- a/sdk/netapp/arm-netapp/src/netAppManagementClient.ts +++ b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts @@ -20,6 +20,7 @@ import { BackupsImpl, AccountBackupsImpl, BackupPoliciesImpl, + VolumeQuotaRulesImpl, VaultsImpl, VolumeGroupsImpl, SubvolumesImpl @@ -36,6 +37,7 @@ import { Backups, AccountBackups, BackupPolicies, + VolumeQuotaRules, Vaults, VolumeGroups, Subvolumes @@ -75,7 +77,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-netapp/15.1.1`; + const packageDetails = `azsdk-js-arm-netapp/15.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -98,7 +100,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-10-01"; + this.apiVersion = options.apiVersion || "2022-01-01"; this.operations = new OperationsImpl(this); this.netAppResource = new NetAppResourceImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsImpl(this); @@ -110,6 +112,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { this.backups = new BackupsImpl(this); this.accountBackups = new AccountBackupsImpl(this); this.backupPolicies = new BackupPoliciesImpl(this); + this.volumeQuotaRules = new VolumeQuotaRulesImpl(this); this.vaults = new VaultsImpl(this); this.volumeGroups = new VolumeGroupsImpl(this); this.subvolumes = new SubvolumesImpl(this); @@ -126,6 +129,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { backups: Backups; accountBackups: AccountBackups; backupPolicies: BackupPolicies; + volumeQuotaRules: VolumeQuotaRules; vaults: Vaults; volumeGroups: VolumeGroups; subvolumes: Subvolumes; diff --git a/sdk/netapp/arm-netapp/src/operations/index.ts b/sdk/netapp/arm-netapp/src/operations/index.ts index cec2cd1de8a7..f5a72741af4e 100644 --- a/sdk/netapp/arm-netapp/src/operations/index.ts +++ b/sdk/netapp/arm-netapp/src/operations/index.ts @@ -17,6 +17,7 @@ export * from "./snapshotPolicies"; export * from "./backups"; export * from "./accountBackups"; export * from "./backupPolicies"; +export * from "./volumeQuotaRules"; export * from "./vaults"; export * from "./volumeGroups"; export * from "./subvolumes"; diff --git a/sdk/netapp/arm-netapp/src/operations/netAppResource.ts b/sdk/netapp/arm-netapp/src/operations/netAppResource.ts index 770dfb59b84b..a871345467d4 100644 --- a/sdk/netapp/arm-netapp/src/operations/netAppResource.ts +++ b/sdk/netapp/arm-netapp/src/operations/netAppResource.ts @@ -19,7 +19,9 @@ import { NetAppResourceCheckFilePathAvailabilityResponse, CheckQuotaNameResourceTypes, NetAppResourceCheckQuotaAvailabilityOptionalParams, - NetAppResourceCheckQuotaAvailabilityResponse + NetAppResourceCheckQuotaAvailabilityResponse, + NetAppResourceQueryRegionInfoOptionalParams, + NetAppResourceQueryRegionInfoResponse } from "../models"; /** Class containing NetAppResource operations. */ @@ -95,6 +97,21 @@ export class NetAppResourceImpl implements NetAppResource { checkQuotaAvailabilityOperationSpec ); } + + /** + * Provides storage to network proximity and logical zone mapping information. + * @param location The location + * @param options The options parameters. + */ + queryRegionInfo( + location: string, + options?: NetAppResourceQueryRegionInfoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + queryRegionInfoOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -179,3 +196,22 @@ const checkQuotaAvailabilityOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const queryRegionInfoOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionInfo + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/subvolumes.ts b/sdk/netapp/arm-netapp/src/operations/subvolumes.ts index 35f945013464..4f61fed4d87d 100644 --- a/sdk/netapp/arm-netapp/src/operations/subvolumes.ts +++ b/sdk/netapp/arm-netapp/src/operations/subvolumes.ts @@ -721,7 +721,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body23, + requestBody: Parameters.body24, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -755,7 +755,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body24, + requestBody: Parameters.body25, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts index 223227815f61..79ea59a04d41 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts @@ -378,7 +378,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body22, + requestBody: Parameters.body23, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/volumeQuotaRules.ts b/sdk/netapp/arm-netapp/src/operations/volumeQuotaRules.ts new file mode 100644 index 000000000000..be3e9a934419 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operations/volumeQuotaRules.ts @@ -0,0 +1,633 @@ +/* + * 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 { VolumeQuotaRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + VolumeQuotaRule, + VolumeQuotaRulesListByVolumeOptionalParams, + VolumeQuotaRulesListByVolumeResponse, + VolumeQuotaRulesGetOptionalParams, + VolumeQuotaRulesGetResponse, + VolumeQuotaRulesCreateOptionalParams, + VolumeQuotaRulesCreateResponse, + VolumeQuotaRulesUpdateOptionalParams, + VolumeQuotaRulesUpdateResponse, + VolumeQuotaRulesDeleteOptionalParams +} from "../models"; + +/// +/** Class containing VolumeQuotaRules operations. */ +export class VolumeQuotaRulesImpl implements VolumeQuotaRules { + private readonly client: NetAppManagementClient; + + /** + * Initialize a new instance of the class VolumeQuotaRules class. + * @param client Reference to the service client + */ + constructor(client: NetAppManagementClient) { + this.client = client; + } + + /** + * List all quota rules associated with the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + public listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumeQuotaRulesListByVolumeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByVolumePagingAll( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByVolumePagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + } + }; + } + + private async *listByVolumePagingPage( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumeQuotaRulesListByVolumeOptionalParams + ): AsyncIterableIterator { + let result = await this._listByVolume( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + yield result.value || []; + } + + private async *listByVolumePagingAll( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumeQuotaRulesListByVolumeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByVolumePagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + )) { + yield* page; + } + } + + /** + * List all quota rules associated with the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + private _listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumeQuotaRulesListByVolumeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + listByVolumeOperationSpec + ); + } + + /** + * Get details of the specified quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + options + }, + getOperationSpec + ); + } + + /** + * Create the specified quota rule within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeQuotaRulesCreateResponse + > + > { + 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + body, + options + }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create the specified quota rule within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patch a quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeQuotaRulesUpdateResponse + > + > { + 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + body, + options + }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Patch a quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesDeleteOptionalParams + ): 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByVolumeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VolumeQuotaRulesList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VolumeQuotaRule + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.volumeQuotaRuleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 201: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 202: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 204: { + bodyMapper: Mappers.VolumeQuotaRule + }, + default: {} + }, + requestBody: Parameters.body22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.volumeQuotaRuleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 201: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 202: { + bodyMapper: Mappers.VolumeQuotaRule + }, + 204: { + bodyMapper: Mappers.VolumeQuotaRule + }, + default: {} + }, + requestBody: Parameters.body22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.volumeQuotaRuleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.volumeQuotaRuleName + ], + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/volumes.ts b/sdk/netapp/arm-netapp/src/operations/volumes.ts index c5f79c3d846b..ae073ebc90a0 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumes.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumes.ts @@ -29,9 +29,12 @@ import { VolumesDeleteOptionalParams, VolumeRevert, VolumesRevertOptionalParams, + VolumesResetCifsPasswordOptionalParams, VolumesBreakReplicationOptionalParams, VolumesReplicationStatusOptionalParams, VolumesReplicationStatusResponse, + VolumesListReplicationsOptionalParams, + VolumesListReplicationsResponse, VolumesResyncReplicationOptionalParams, VolumesDeleteReplicationOptionalParams, AuthorizeRequest, @@ -39,6 +42,9 @@ import { VolumesReInitializeReplicationOptionalParams, PoolChangeRequest, VolumesPoolChangeOptionalParams, + VolumesRelocateOptionalParams, + VolumesFinalizeRelocationOptionalParams, + VolumesRevertRelocationOptionalParams, VolumesListNextResponse } from "../models"; @@ -561,6 +567,96 @@ export class VolumesImpl implements Volumes { return poller.pollUntilDone(); } + /** + * Reset cifs password from volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginResetCifsPassword( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResetCifsPasswordOptionalParams + ): 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, accountName, poolName, volumeName, options }, + resetCifsPasswordOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Reset cifs password from volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginResetCifsPasswordAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResetCifsPasswordOptionalParams + ): Promise { + const poller = await this.beginResetCifsPassword( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); + } + /** * Break the replication connection on the destination volume * @param resourceGroupName The name of the resource group. @@ -673,6 +769,27 @@ export class VolumesImpl implements Volumes { ); } + /** + * List all replications for a specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + listReplications( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesListReplicationsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + listReplicationsOperationSpec + ); + } + /** * Resync the connection on the destination volume. If the operation is ran on the source volume it * will reverse-resync the connection and sync from destination to source. @@ -1142,6 +1259,278 @@ export class VolumesImpl implements Volumes { return poller.pollUntilDone(); } + /** + * Relocates volume to a new stamp + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginRelocate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRelocateOptionalParams + ): 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, accountName, poolName, volumeName, options }, + relocateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Relocates volume to a new stamp + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginRelocateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRelocateOptionalParams + ): Promise { + const poller = await this.beginRelocate( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginFinalizeRelocation( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesFinalizeRelocationOptionalParams + ): 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, accountName, poolName, volumeName, options }, + finalizeRelocationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginFinalizeRelocationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesFinalizeRelocationOptionalParams + ): Promise { + const poller = await this.beginFinalizeRelocation( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing + * volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginRevertRelocation( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRevertRelocationOptionalParams + ): 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, accountName, poolName, volumeName, options }, + revertRelocationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing + * volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + async beginRevertRelocationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRevertRelocationOptionalParams + ): Promise { + const poller = await this.beginRevertRelocation( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); + } + /** * ListNext * @param resourceGroupName The name of the resource group. @@ -1312,6 +1701,22 @@ const revertOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const resetCifsPasswordOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + serializer +}; const breakReplicationOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", @@ -1353,6 +1758,28 @@ const replicationStatusOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listReplicationsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listReplications", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListReplications + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + headerParameters: [Parameters.accept], + serializer +}; const resyncReplicationOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", @@ -1439,6 +1866,54 @@ const poolChangeOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const relocateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + serializer +}; +const finalizeRelocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + serializer +}; +const revertRelocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts index cec2cd1de8a7..f5a72741af4e 100644 --- a/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts @@ -17,6 +17,7 @@ export * from "./snapshotPolicies"; export * from "./backups"; export * from "./accountBackups"; export * from "./backupPolicies"; +export * from "./volumeQuotaRules"; export * from "./vaults"; export * from "./volumeGroups"; export * from "./subvolumes"; diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts index 64b6993303bf..4bf44f7316df 100644 --- a/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts @@ -14,7 +14,9 @@ import { NetAppResourceCheckFilePathAvailabilityResponse, CheckQuotaNameResourceTypes, NetAppResourceCheckQuotaAvailabilityOptionalParams, - NetAppResourceCheckQuotaAvailabilityResponse + NetAppResourceCheckQuotaAvailabilityResponse, + NetAppResourceQueryRegionInfoOptionalParams, + NetAppResourceQueryRegionInfoResponse } from "../models"; /** Interface representing a NetAppResource. */ @@ -63,4 +65,13 @@ export interface NetAppResource { typeParam: CheckQuotaNameResourceTypes, options?: NetAppResourceCheckQuotaAvailabilityOptionalParams ): Promise; + /** + * Provides storage to network proximity and logical zone mapping information. + * @param location The location + * @param options The options parameters. + */ + queryRegionInfo( + location: string, + options?: NetAppResourceQueryRegionInfoOptionalParams + ): Promise; } diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeQuotaRules.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeQuotaRules.ts new file mode 100644 index 000000000000..490b9fcc6975 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeQuotaRules.ts @@ -0,0 +1,178 @@ +/* + * 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 { + VolumeQuotaRule, + VolumeQuotaRulesListByVolumeOptionalParams, + VolumeQuotaRulesGetOptionalParams, + VolumeQuotaRulesGetResponse, + VolumeQuotaRulesCreateOptionalParams, + VolumeQuotaRulesCreateResponse, + VolumeQuotaRulesUpdateOptionalParams, + VolumeQuotaRulesUpdateResponse, + VolumeQuotaRulesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a VolumeQuotaRules. */ +export interface VolumeQuotaRules { + /** + * List all quota rules associated with the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumeQuotaRulesListByVolumeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get details of the specified quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesGetOptionalParams + ): Promise; + /** + * Create the specified quota rule within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeQuotaRulesCreateResponse + > + >; + /** + * Create the specified quota rule within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesCreateOptionalParams + ): Promise; + /** + * Patch a quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeQuotaRulesUpdateResponse + > + >; + /** + * Patch a quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param body Quota rule object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + body: VolumeQuotaRule, + options?: VolumeQuotaRulesUpdateOptionalParams + ): Promise; + /** + * Delete quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete quota rule + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param volumeQuotaRuleName The name of volume quota rule + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + volumeQuotaRuleName: string, + options?: VolumeQuotaRulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts index ac6e3a4a0781..810dc3309c75 100644 --- a/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts @@ -21,16 +21,22 @@ import { VolumesDeleteOptionalParams, VolumeRevert, VolumesRevertOptionalParams, + VolumesResetCifsPasswordOptionalParams, VolumesBreakReplicationOptionalParams, VolumesReplicationStatusOptionalParams, VolumesReplicationStatusResponse, + VolumesListReplicationsOptionalParams, + VolumesListReplicationsResponse, VolumesResyncReplicationOptionalParams, VolumesDeleteReplicationOptionalParams, AuthorizeRequest, VolumesAuthorizeReplicationOptionalParams, VolumesReInitializeReplicationOptionalParams, PoolChangeRequest, - VolumesPoolChangeOptionalParams + VolumesPoolChangeOptionalParams, + VolumesRelocateOptionalParams, + VolumesFinalizeRelocationOptionalParams, + VolumesRevertRelocationOptionalParams } from "../models"; /// @@ -203,6 +209,36 @@ export interface Volumes { body: VolumeRevert, options?: VolumesRevertOptionalParams ): Promise; + /** + * Reset cifs password from volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginResetCifsPassword( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResetCifsPasswordOptionalParams + ): Promise, void>>; + /** + * Reset cifs password from volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginResetCifsPasswordAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResetCifsPasswordOptionalParams + ): Promise; /** * Break the replication connection on the destination volume * @param resourceGroupName The name of the resource group. @@ -248,6 +284,21 @@ export interface Volumes { volumeName: string, options?: VolumesReplicationStatusOptionalParams ): Promise; + /** + * List all replications for a specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + listReplications( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesListReplicationsOptionalParams + ): Promise; /** * Resync the connection on the destination volume. If the operation is ran on the source volume it * will reverse-resync the connection and sync from destination to source. @@ -410,4 +461,96 @@ export interface Volumes { body: PoolChangeRequest, options?: VolumesPoolChangeOptionalParams ): Promise; + /** + * Relocates volume to a new stamp + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginRelocate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRelocateOptionalParams + ): Promise, void>>; + /** + * Relocates volume to a new stamp + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginRelocateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRelocateOptionalParams + ): Promise; + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginFinalizeRelocation( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesFinalizeRelocationOptionalParams + ): Promise, void>>; + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginFinalizeRelocationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesFinalizeRelocationOptionalParams + ): Promise; + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing + * volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginRevertRelocation( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRevertRelocationOptionalParams + ): Promise, void>>; + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing + * volume. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginRevertRelocationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesRevertRelocationOptionalParams + ): Promise; } diff --git a/sdk/netapp/arm-netapp/tsconfig.json b/sdk/netapp/arm-netapp/tsconfig.json index 1772b5822344..3e6ae96443f3 100644 --- a/sdk/netapp/arm-netapp/tsconfig.json +++ b/sdk/netapp/arm-netapp/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-netapp": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"