From cfde18748bc1a987870aecdded6ede907812a91d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 09:03:56 +0000 Subject: [PATCH] CodeGen from PR 17055 in Azure/azure-rest-api-specs Add `x-ms-enum` extension to keyvault (#17055) * fix * make these two sealed enums --- common/config/rush/pnpm-lock.yaml | 113 +++++----- sdk/keyvault/arm-keyvault/CHANGELOG.md | 27 +-- sdk/keyvault/arm-keyvault/LICENSE | 2 +- sdk/keyvault/arm-keyvault/README.md | 14 +- sdk/keyvault/arm-keyvault/_meta.json | 6 +- sdk/keyvault/arm-keyvault/api-extractor.json | 2 +- sdk/keyvault/arm-keyvault/package.json | 45 ++-- .../arm-keyvault/review/arm-keyvault.api.md | 34 ++- sdk/keyvault/arm-keyvault/src/index.ts | 1 - .../src/keyVaultManagementClient.ts | 49 ++++- .../src/keyVaultManagementClientContext.ts | 71 ------ sdk/keyvault/arm-keyvault/src/models/index.ts | 139 +++++++----- .../arm-keyvault/src/models/mappers.ts | 205 +++++++++++------- .../arm-keyvault/src/operations/keys.ts | 9 +- .../src/operations/managedHsms.ts | 9 +- .../mhsmPrivateEndpointConnections.ts | 9 +- .../operations/mhsmPrivateLinkResources.ts | 8 +- .../arm-keyvault/src/operations/operations.ts | 9 +- .../operations/privateEndpointConnections.ts | 9 +- .../src/operations/privateLinkResources.ts | 8 +- .../arm-keyvault/src/operations/secrets.ts | 9 +- .../arm-keyvault/src/operations/vaults.ts | 17 +- .../src/operationsInterfaces/keys.ts | 1 - .../src/operationsInterfaces/managedHsms.ts | 1 - .../mhsmPrivateEndpointConnections.ts | 1 - .../src/operationsInterfaces/operations.ts | 1 - .../privateEndpointConnections.ts | 1 - .../src/operationsInterfaces/secrets.ts | 1 - .../src/operationsInterfaces/vaults.ts | 1 - sdk/keyvault/arm-keyvault/test/sampleTest.ts | 48 ++++ sdk/keyvault/arm-keyvault/tsconfig.json | 2 +- 31 files changed, 452 insertions(+), 400 deletions(-) delete mode 100644 sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts create mode 100644 sdk/keyvault/arm-keyvault/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..ad0269ef4fe4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -6977,7 +6977,7 @@ packages: hasBin: true dev: false - /ts-node/10.4.0_276ff2ad8f60608417677a4691c0f835: + /ts-node/10.4.0_28670484a221c7e896c5d6b821a5cbb7: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7003,11 +7003,11 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.2.4 + typescript: 4.4.4 yn: 3.1.1 dev: false - /ts-node/10.4.0_54d7f9b57c83a5c5120be11b085b9de6: + /ts-node/10.4.0_f9f9f28f986ed7ad377c75abc9f416f4: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7033,7 +7033,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.4.4 + typescript: 4.2.4 yn: 3.1.1 dev: false @@ -7629,7 +7629,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7857,7 +7857,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7908,7 +7908,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7965,7 +7965,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -8626,7 +8626,7 @@ packages: dev: false file:projects/arm-keyvault.tgz: - resolution: {integrity: sha512-FnvWshHbYbXqHFfanHE8YzqznZBDWFIDY3Cud0PNTTds8esvpH3gRYEuZWYMcLGXymShlYeLdYaUcxMEk1/eCA==, tarball: file:projects/arm-keyvault.tgz} + resolution: {integrity: sha512-pmOX9urK0XP4ENQRqn2ZCxfuKSnO8/3d+jzjmv3J0/Pgqw3rR+nWusSMFqN1s0bYOEUUYGv0IxnAEa6HU6ktww==, tarball: file:projects/arm-keyvault.tgz} name: '@rush-temp/arm-keyvault' version: 0.0.0 dependencies: @@ -8635,7 +8635,10 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-node-resolve: 3.4.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 @@ -9487,7 +9490,7 @@ packages: rollup: 1.32.1 safe-buffer: 5.2.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -9982,7 +9985,7 @@ packages: dev: false file:projects/core-amqp.tgz: - resolution: {integrity: sha512-jmyXvDp5FyZIlqp1zATESQp6qO2NqjKSfY5o9ojPsKN/g9WJ45RL4jfy+cD5u8C2t9jSDTsCoL+jbiLptpkDLA==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-nAZlMW/WFVSloK1iVzoSJNx9CHjvMl4/kJrnq1s5Okn96/AQX19SYkqfdvmew1Oy3bxfDC2g3n3e1CFLrlSyEg==, tarball: file:projects/core-amqp.tgz} name: '@rush-temp/core-amqp' version: 0.0.0 dependencies: @@ -10025,7 +10028,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 url: 0.11.0 @@ -10111,7 +10114,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10342,7 +10345,7 @@ packages: shx: 0.3.3 sinon: 9.2.4 tough-cookie: 4.0.0 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 tunnel: 0.0.6 typescript: 4.2.4 @@ -10390,7 +10393,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -10657,7 +10660,7 @@ packages: sinon: 9.2.4 snap-shot-it: 7.9.6 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 universal-user-agent: 6.0.0 @@ -10714,7 +10717,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10760,7 +10763,7 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 - ts-node: 10.4.0_54d7f9b57c83a5c5120be11b085b9de6 + ts-node: 10.4.0_28670484a221c7e896c5d6b821a5cbb7 tslib: 2.3.1 typescript: 4.4.4 yaml: 1.10.2 @@ -10917,7 +10920,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -10979,7 +10982,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11034,7 +11037,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11087,7 +11090,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11289,7 +11292,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11553,7 +11556,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11702,7 +11705,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11774,7 +11777,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11794,7 +11797,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11814,7 +11817,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11834,7 +11837,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11873,7 +11876,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11894,7 +11897,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11917,7 +11920,7 @@ packages: moment: 2.29.1 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11937,7 +11940,7 @@ packages: eslint: 7.32.0 prettier: 1.19.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11957,7 +11960,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11978,7 +11981,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12000,7 +12003,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12021,7 +12024,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12041,7 +12044,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12060,7 +12063,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12081,7 +12084,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12104,7 +12107,7 @@ packages: node-fetch: 2.6.6 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12125,7 +12128,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12146,7 +12149,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12167,7 +12170,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12539,7 +12542,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12608,7 +12611,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 ws: 8.3.0 @@ -12671,7 +12674,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12734,7 +12737,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12797,7 +12800,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12858,7 +12861,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12916,7 +12919,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12976,7 +12979,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -13028,7 +13031,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13082,7 +13085,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13135,7 +13138,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 diff --git a/sdk/keyvault/arm-keyvault/CHANGELOG.md b/sdk/keyvault/arm-keyvault/CHANGELOG.md index f524dc92c3eb..6f2815144355 100644 --- a/sdk/keyvault/arm-keyvault/CHANGELOG.md +++ b/sdk/keyvault/arm-keyvault/CHANGELOG.md @@ -1,26 +1,11 @@ # Release History + +## 2.0.0-beta.2 (2022-01-05) -## 2.0.0-beta.2 (Unreleased) +The package of @azure/arm-keyvault is using our next generation design principles since version 2.0.0-beta.2, which contains breaking changes. -### Features Added +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). -### Breaking Changes +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.1 (2021-10-09) - -This is the first preview for the new version of the `@azure/arm-keyvault` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services. - -While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/). - -Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies. - -**Noteworthy changes and features** -- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice. -- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead. -- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page. -- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`. -- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6. +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/keyvault/arm-keyvault/LICENSE b/sdk/keyvault/arm-keyvault/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/keyvault/arm-keyvault/LICENSE +++ b/sdk/keyvault/arm-keyvault/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/keyvault/arm-keyvault/README.md b/sdk/keyvault/arm-keyvault/README.md index 93223e59416b..9471ca0b8a94 100644 --- a/sdk/keyvault/arm-keyvault/README.md +++ b/sdk/keyvault/arm-keyvault/README.md @@ -2,13 +2,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure KeyVaultManagement client. -You can also follow this [link](https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/keyvault/arm-keyvault) to see the previous stable versions for this package. Note that they might not implement the guidelines(https://azure.github.io/azure-sdk/typescript_introduction.html) or have the same feature set as the new releases. - The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-keyvault) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-keyvault) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-keyvault?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -35,9 +33,9 @@ npm install @azure/arm-keyvault To create a client object to access the Azure KeyVaultManagement API, you will need the `endpoint` of your Azure KeyVaultManagement resource and a `credential`. The Azure KeyVaultManagement client can use Azure Active Directory credentials to authenticate. You can find the endpoint for your Azure KeyVaultManagement resource in the [Azure Portal][azure_portal]. -#### Using an Azure Active Directory Credential +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). -You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: ```bash npm install @azure/identity @@ -55,6 +53,10 @@ const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new KeyVaultManagementClient(new DefaultAzureCredential(), subscriptionId); ``` + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + ## Key concepts ### KeyVaultManagementClient @@ -68,7 +70,7 @@ const client = new KeyVaultManagementClient(new DefaultAzureCredential(), subscr Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: ```javascript -import { setLogLevel } from "@azure/logger"; +const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); ``` diff --git a/sdk/keyvault/arm-keyvault/_meta.json b/sdk/keyvault/arm-keyvault/_meta.json index 3f185f218540..8f93d4be836c 100644 --- a/sdk/keyvault/arm-keyvault/_meta.json +++ b/sdk/keyvault/arm-keyvault/_meta.json @@ -1,7 +1,7 @@ { - "commit": "bb530add3bb77c84e4e042b7e094b15cad91442a", + "commit": "b8fa43756c72adab0cb47380d59d82f7c53034ec", "readme": "specification/keyvault/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/keyvault/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.8.20210810.1", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/keyvault/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.8.20210810.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" } \ No newline at end of file diff --git a/sdk/keyvault/arm-keyvault/api-extractor.json b/sdk/keyvault/arm-keyvault/api-extractor.json index de60f665274e..b86a521f474c 100644 --- a/sdk/keyvault/arm-keyvault/api-extractor.json +++ b/sdk/keyvault/arm-keyvault/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/index.d.ts", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", "docModel": { "enabled": true }, "apiReport": { "enabled": true, "reportFolder": "./review" }, "dtsRollup": { diff --git a/sdk/keyvault/arm-keyvault/package.json b/sdk/keyvault/arm-keyvault/package.json index ca0da163298e..2f0ce2336695 100644 --- a/sdk/keyvault/arm-keyvault/package.json +++ b/sdk/keyvault/arm-keyvault/package.json @@ -4,28 +4,20 @@ "author": "Microsoft Corporation", "description": "A generated SDK for KeyVaultManagementClient.", "version": "2.0.0-beta.2", - "engines": { - "node": ">=12.0.0" - }, + "engines": { "node": ">=12.0.0" }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", - "@azure/core-paging": "^1.1.1", + "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", "main": "./dist/index.js", - "module": "./dist-esm/index.js", + "module": "./dist-esm/src/index.js", "types": "./types/arm-keyvault.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", @@ -36,18 +28,20 @@ "mkdirp": "^1.0.4", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-node-resolve": "^3.4.0", "typescript": "~4.2.0", - "uglify-js": "^3.4.9" + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -64,17 +58,17 @@ "tsconfig.json", "review/*", "CHANGELOG.md", - "types" + "types/*" ], "scripts": { - "build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "prepack": "npm run build", "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -82,16 +76,15 @@ "check-format": "echo skipped", "execute:samples": "echo skipped", "format": "echo skipped", - "test": "echo skipped", - "prebuild": "echo skipped", + "test": "npm run integration-test", "test:node": "echo skipped", "test:browser": "echo skipped", - "unit-test": "echo skipped", - "unit-test:node": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "echo skipped", "docs": "echo skipped" }, "sideEffects": false, diff --git a/sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md b/sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md index 0906eb95be75..6af065138042 100644 --- a/sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md +++ b/sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md @@ -158,6 +158,7 @@ export type Key = Resource & { readonly keyUri?: string; readonly keyUriWithVersion?: string; rotationPolicy?: RotationPolicy; + releasePolicy?: KeyReleasePolicy; }; // @public @@ -165,6 +166,7 @@ export interface KeyAttributes { readonly created?: number; enabled?: boolean; expires?: number; + exportable?: boolean; notBefore?: number; readonly recoveryLevel?: DeletionRecoveryLevel; readonly updated?: number; @@ -197,9 +199,16 @@ export interface KeyProperties { readonly keyUri?: string; readonly keyUriWithVersion?: string; kty?: JsonWebKeyType; + releasePolicy?: KeyReleasePolicy; rotationPolicy?: RotationPolicy; } +// @public (undocumented) +export interface KeyReleasePolicy { + contentType?: string; + data?: Uint8Array; +} + // @public export type KeyRotationPolicyActionType = "rotate" | "notify"; @@ -269,9 +278,13 @@ export interface KeysListVersionsOptionalParams extends coreClient.OperationOpti export type KeysListVersionsResponse = KeyListResult; // @public (undocumented) -export class KeyVaultManagementClient extends KeyVaultManagementClientContext { +export class KeyVaultManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: KeyVaultManagementClientOptionalParams); // (undocumented) + apiVersion: string; + // (undocumented) keys: Keys; // (undocumented) managedHsms: ManagedHsms; @@ -288,18 +301,9 @@ export class KeyVaultManagementClient extends KeyVaultManagementClientContext { // (undocumented) secrets: Secrets; // (undocumented) - vaults: Vaults; -} - -// @public (undocumented) -export class KeyVaultManagementClientContext extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: KeyVaultManagementClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) subscriptionId: string; + // (undocumented) + vaults: Vaults; } // @public @@ -398,6 +402,8 @@ export enum KnownJsonWebKeyOperation { // (undocumented) Import = "import", // (undocumented) + Release = "release", + // (undocumented) Sign = "sign", // (undocumented) UnwrapKey = "unwrapKey", @@ -436,6 +442,8 @@ export enum KnownKeyPermissions { // (undocumented) Get = "get", // (undocumented) + Getrotationpolicy = "getrotationpolicy", + // (undocumented) Import = "import", // (undocumented) List = "list", @@ -450,6 +458,8 @@ export enum KnownKeyPermissions { // (undocumented) Rotate = "rotate", // (undocumented) + Setrotationpolicy = "setrotationpolicy", + // (undocumented) Sign = "sign", // (undocumented) UnwrapKey = "unwrapKey", diff --git a/sdk/keyvault/arm-keyvault/src/index.ts b/sdk/keyvault/arm-keyvault/src/index.ts index 76a73dbc1818..e1cbf8f3b647 100644 --- a/sdk/keyvault/arm-keyvault/src/index.ts +++ b/sdk/keyvault/arm-keyvault/src/index.ts @@ -9,5 +9,4 @@ /// export * from "./models"; export { KeyVaultManagementClient } from "./keyVaultManagementClient"; -export { KeyVaultManagementClientContext } from "./keyVaultManagementClientContext"; export * from "./operationsInterfaces"; diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts index 1f33d2b72b1d..a7e358f9339b 100644 --- a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts +++ b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { KeysImpl, @@ -29,10 +30,13 @@ import { Operations, Secrets } from "./operationsInterfaces"; -import { KeyVaultManagementClientContext } from "./keyVaultManagementClientContext"; import { KeyVaultManagementClientOptionalParams } from "./models"; -export class KeyVaultManagementClient extends KeyVaultManagementClientContext { +export class KeyVaultManagementClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + /** * Initializes a new instance of the KeyVaultManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. @@ -45,7 +49,46 @@ export class KeyVaultManagementClient extends KeyVaultManagementClientContext { subscriptionId: string, options?: KeyVaultManagementClientOptionalParams ) { - super(credentials, subscriptionId, options); + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: KeyVaultManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-keyvault/2.0.0-beta.2`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-06-01-preview"; this.keys = new KeysImpl(this); this.vaults = new VaultsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts deleted file mode 100644 index 3ba2efbe75b5..000000000000 --- a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import * as coreAuth from "@azure/core-auth"; -import { KeyVaultManagementClientOptionalParams } from "./models"; - -export class KeyVaultManagementClientContext extends coreClient.ServiceClient { - $host: string; - subscriptionId: string; - apiVersion: string; - - /** - * Initializes a new instance of the KeyVaultManagementClientContext class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. - * The subscription ID forms part of the URI for every service call. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: KeyVaultManagementClientOptionalParams - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: KeyVaultManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; - - const packageDetails = `azsdk-js-arm-keyvault/2.0.0-beta.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - baseUri: options.endpoint || "https://management.azure.com" - }; - super(optionsWithDefaults); - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01-preview"; - } -} diff --git a/sdk/keyvault/arm-keyvault/src/models/index.ts b/sdk/keyvault/arm-keyvault/src/models/index.ts index ad40ec862cac..ad6298a44987 100644 --- a/sdk/keyvault/arm-keyvault/src/models/index.ts +++ b/sdk/keyvault/arm-keyvault/src/models/index.ts @@ -39,6 +39,8 @@ export interface KeyProperties { readonly keyUriWithVersion?: string; /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */ rotationPolicy?: RotationPolicy; + /** Key release policy in response. It will be used for both output and input. Omitted if empty */ + releasePolicy?: KeyReleasePolicy; } /** The object attributes managed by the Azure Key Vault service. */ @@ -64,6 +66,8 @@ export interface KeyAttributes { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly recoveryLevel?: DeletionRecoveryLevel; + /** Indicates if the private key can be exported. */ + exportable?: boolean; } export interface RotationPolicy { @@ -96,9 +100,9 @@ export interface LifetimeAction { } export interface Trigger { - /** The time duration after key creation to rotate the key. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. */ + /** The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */ timeAfterCreate?: string; - /** The time duration before key expiring to rotate the key. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. */ + /** The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */ timeBeforeExpiry?: string; } @@ -107,6 +111,13 @@ export interface Action { type?: KeyRotationPolicyActionType; } +export interface KeyReleasePolicy { + /** Content type and version of key release policy */ + contentType?: string; + /** Blob encoding the policy rules under which the key can be released. */ + data?: Uint8Array; +} + /** Key Vault resource */ export interface Resource { /** @@ -539,44 +550,6 @@ export interface PrivateLinkResourceListResult { value?: PrivateLinkResource[]; } -/** Managed HSM resource */ -export interface ManagedHsmResource { - /** - * The Azure Resource Manager resource ID for the managed HSM Pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the managed HSM Pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The resource type of the managed HSM Pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The supported Azure location where the managed HSM Pool should be created. */ - location?: string; - /** SKU details */ - sku?: ManagedHsmSku; - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** - * Metadata pertaining to creation and last modification of the key vault resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** SKU details */ -export interface ManagedHsmSku { - /** SKU Family of the managed HSM Pool */ - family: ManagedHsmSkuFamily; - /** SKU of the managed HSM Pool */ - name: ManagedHsmSkuName; -} - /** Properties of the managed HSM Pool */ export interface ManagedHsmProperties { /** The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool. */ @@ -675,6 +648,44 @@ export interface MhsmPrivateLinkServiceConnectionState { actionsRequired?: ActionsRequired; } +/** Managed HSM resource */ +export interface ManagedHsmResource { + /** + * The Azure Resource Manager resource ID for the managed HSM Pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the managed HSM Pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The resource type of the managed HSM Pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The supported Azure location where the managed HSM Pool should be created. */ + location?: string; + /** SKU details */ + sku?: ManagedHsmSku; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** + * Metadata pertaining to creation and last modification of the key vault resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** SKU details */ +export interface ManagedHsmSku { + /** SKU Family of the managed HSM Pool */ + family: ManagedHsmSkuFamily; + /** SKU of the managed HSM Pool */ + name: ManagedHsmSkuName; +} + /** The error exception. */ export interface ManagedHsmError { /** @@ -972,6 +983,8 @@ export type Key = Resource & { readonly keyUriWithVersion?: string; /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */ rotationPolicy?: RotationPolicy; + /** Key release policy in response. It will be used for both output and input. Omitted if empty */ + releasePolicy?: KeyReleasePolicy; }; /** Private endpoint connection resource. */ @@ -1125,7 +1138,8 @@ export enum KnownJsonWebKeyOperation { Verify = "verify", WrapKey = "wrapKey", UnwrapKey = "unwrapKey", - Import = "import" + Import = "import", + Release = "release" } /** @@ -1139,7 +1153,8 @@ export enum KnownJsonWebKeyOperation { * **verify** \ * **wrapKey** \ * **unwrapKey** \ - * **import** + * **import** \ + * **release** */ export type JsonWebKeyOperation = string; @@ -1196,8 +1211,10 @@ export enum KnownKeyPermissions { Restore = "restore", Recover = "recover", Purge = "purge", - Release = "release", - Rotate = "rotate" + Rotate = "rotate", + Getrotationpolicy = "getrotationpolicy", + Setrotationpolicy = "setrotationpolicy", + Release = "release" } /** @@ -1222,8 +1239,10 @@ export enum KnownKeyPermissions { * **restore** \ * **recover** \ * **purge** \ - * **release** \ - * **rotate** + * **rotate** \ + * **getrotationpolicy** \ + * **setrotationpolicy** \ + * **release** */ export type KeyPermissions = string; @@ -1471,20 +1490,6 @@ export enum KnownIdentityType { */ export type IdentityType = string; -/** Known values of {@link ManagedHsmSkuFamily} that the service accepts. */ -export enum KnownManagedHsmSkuFamily { - B = "B" -} - -/** - * Defines values for ManagedHsmSkuFamily. \ - * {@link KnownManagedHsmSkuFamily} can be used interchangeably with ManagedHsmSkuFamily, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **B** - */ -export type ManagedHsmSkuFamily = string; - /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { /** The managed HSM Pool has been full provisioned. */ @@ -1536,6 +1541,20 @@ export enum KnownPublicNetworkAccess { * **Disabled** */ export type PublicNetworkAccess = string; + +/** Known values of {@link ManagedHsmSkuFamily} that the service accepts. */ +export enum KnownManagedHsmSkuFamily { + B = "B" +} + +/** + * Defines values for ManagedHsmSkuFamily. \ + * {@link KnownManagedHsmSkuFamily} can be used interchangeably with ManagedHsmSkuFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **B** + */ +export type ManagedHsmSkuFamily = string; /** Defines values for KeyRotationPolicyActionType. */ export type KeyRotationPolicyActionType = "rotate" | "notify"; /** Defines values for SkuName. */ diff --git a/sdk/keyvault/arm-keyvault/src/models/mappers.ts b/sdk/keyvault/arm-keyvault/src/models/mappers.ts index 1ecdce030cbe..7aaf9c270466 100644 --- a/sdk/keyvault/arm-keyvault/src/models/mappers.ts +++ b/sdk/keyvault/arm-keyvault/src/models/mappers.ts @@ -92,6 +92,13 @@ export const KeyProperties: coreClient.CompositeMapper = { name: "Composite", className: "RotationPolicy" } + }, + releasePolicy: { + serializedName: "release_policy", + type: { + name: "Composite", + className: "KeyReleasePolicy" + } } } } @@ -140,6 +147,12 @@ export const KeyAttributes: coreClient.CompositeMapper = { type: { name: "String" } + }, + exportable: { + serializedName: "exportable", + type: { + name: "Boolean" + } } } } @@ -262,6 +275,28 @@ export const Action: coreClient.CompositeMapper = { } }; +export const KeyReleasePolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyReleasePolicy", + modelProperties: { + contentType: { + defaultValue: "application/json; charset=utf-8", + serializedName: "contentType", + type: { + name: "String" + } + }, + data: { + serializedName: "data", + type: { + name: "Base64Url" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -478,6 +513,7 @@ export const VaultProperties: coreClient.CompositeMapper = { } }, enableRbacAuthorization: { + defaultValue: false, serializedName: "enableRbacAuthorization", type: { name: "Boolean" @@ -1373,87 +1409,6 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { } }; -export const ManagedHsmResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedHsmResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ManagedHsmSku" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const ManagedHsmSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedHsmSku", - modelProperties: { - family: { - serializedName: "family", - required: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - required: true, - type: { - name: "Enum", - allowedValues: ["Standard_B1", "Custom_B32"] - } - } - } - } -}; - export const ManagedHsmProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1711,6 +1666,87 @@ export const MhsmPrivateLinkServiceConnectionState: coreClient.CompositeMapper = } }; +export const ManagedHsmResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedHsmResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ManagedHsmSku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ManagedHsmSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedHsmSku", + modelProperties: { + family: { + serializedName: "family", + required: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "Enum", + allowedValues: ["Standard_B1", "Custom_B32"] + } + } + } + } +}; + export const ManagedHsmError: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2473,6 +2509,13 @@ export const Key: coreClient.CompositeMapper = { name: "Composite", className: "RotationPolicy" } + }, + releasePolicy: { + serializedName: "properties.release_policy", + type: { + name: "Composite", + className: "KeyReleasePolicy" + } } } } diff --git a/sdk/keyvault/arm-keyvault/src/operations/keys.ts b/sdk/keyvault/arm-keyvault/src/operations/keys.ts index fbbaea4ccd72..de453bf221c8 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/keys.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/keys.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Keys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { Key, KeysListNextOptionalParams, @@ -33,15 +32,15 @@ import { } from "../models"; /// -/** Class representing a Keys. */ +/** Class containing Keys operations. */ export class KeysImpl implements Keys { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class Keys class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts index 04eee94aad20..c0c3d156628d 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { ManagedHsms } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { @@ -43,15 +42,15 @@ import { } from "../models"; /// -/** Class representing a ManagedHsms. */ +/** Class containing ManagedHsms operations. */ export class ManagedHsmsImpl implements ManagedHsms { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class ManagedHsms class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateEndpointConnections.ts index 8d3f3e8bece2..91cfed2337a4 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateEndpointConnections.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateEndpointConnections.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { MhsmPrivateEndpointConnections } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { @@ -30,16 +29,16 @@ import { } from "../models"; /// -/** Class representing a MhsmPrivateEndpointConnections. */ +/** Class containing MhsmPrivateEndpointConnections operations. */ export class MhsmPrivateEndpointConnectionsImpl implements MhsmPrivateEndpointConnections { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class MhsmPrivateEndpointConnections class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateLinkResources.ts index a736f1be190e..4badfbc5ff96 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateLinkResources.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/mhsmPrivateLinkResources.ts @@ -10,21 +10,21 @@ import { MhsmPrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { MhsmPrivateLinkResourcesListByMhsmResourceOptionalParams, MhsmPrivateLinkResourcesListByMhsmResourceResponse } from "../models"; -/** Class representing a MhsmPrivateLinkResources. */ +/** Class containing MhsmPrivateLinkResources operations. */ export class MhsmPrivateLinkResourcesImpl implements MhsmPrivateLinkResources { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class MhsmPrivateLinkResources class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/operations.ts b/sdk/keyvault/arm-keyvault/src/operations/operations.ts index 84a4f070d3ab..b4dbdc4fe09e 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/operations.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/operations.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { Operation, OperationsListNextOptionalParams, @@ -22,15 +21,15 @@ import { } from "../models"; /// -/** Class representing a Operations. */ +/** Class containing Operations operations. */ export class OperationsImpl implements Operations { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class Operations class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts index 3dbf3af62d0d..98c5e9d98ae6 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PrivateEndpointConnections } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { @@ -30,16 +29,16 @@ import { } from "../models"; /// -/** Class representing a PrivateEndpointConnections. */ +/** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class PrivateEndpointConnections class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts index cc4c9289f90e..58ef249629f6 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts @@ -10,21 +10,21 @@ import { PrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { PrivateLinkResourcesListByVaultOptionalParams, PrivateLinkResourcesListByVaultResponse } from "../models"; -/** Class representing a PrivateLinkResources. */ +/** Class containing PrivateLinkResources operations. */ export class PrivateLinkResourcesImpl implements PrivateLinkResources { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class PrivateLinkResources class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/secrets.ts b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts index 8cd07ccacc05..cce299f21172 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/secrets.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Secrets } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { Secret, SecretsListNextOptionalParams, @@ -30,15 +29,15 @@ import { } from "../models"; /// -/** Class representing a Secrets. */ +/** Class containing Secrets operations. */ export class SecretsImpl implements Secrets { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class Secrets class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } diff --git a/sdk/keyvault/arm-keyvault/src/operations/vaults.ts b/sdk/keyvault/arm-keyvault/src/operations/vaults.ts index 6fd29f29ee6d..3b8b99339ded 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/vaults.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/vaults.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Vaults } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; +import { KeyVaultManagementClient } from "../keyVaultManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { @@ -57,15 +56,15 @@ import { } from "../models"; /// -/** Class representing a Vaults. */ +/** Class containing Vaults operations. */ export class VaultsImpl implements Vaults { - private readonly client: KeyVaultManagementClientContext; + private readonly client: KeyVaultManagementClient; /** * Initialize a new instance of the class Vaults class. * @param client Reference to the service client */ - constructor(client: KeyVaultManagementClientContext) { + constructor(client: KeyVaultManagementClient) { this.client = client; } @@ -752,10 +751,6 @@ const updateAccessPolicyOperationSpec: coreClient.OperationSpec = { 201: { bodyMapper: Mappers.VaultAccessPolicyParameters }, - 404: { - bodyMapper: Mappers.CloudError, - isError: true - }, default: { bodyMapper: Mappers.CloudError } @@ -858,10 +853,6 @@ const purgeDeletedOperationSpec: coreClient.OperationSpec = { 201: {}, 202: {}, 204: {}, - 404: { - bodyMapper: Mappers.CloudError, - isError: true - }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/keys.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/keys.ts index 065a21cfd427..13d909c3b9bb 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/keys.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/keys.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Key, diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/managedHsms.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/managedHsms.ts index 9a8385cc08d3..2d82c3e245a6 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/managedHsms.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/managedHsms.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/mhsmPrivateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/mhsmPrivateEndpointConnections.ts index ec8dad7820b9..175bb98e7ff7 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/mhsmPrivateEndpointConnections.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/mhsmPrivateEndpointConnections.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/operations.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/operations.ts index a118c488033f..85501eafa7af 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/operations.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/operations.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Operation, OperationsListOptionalParams } from "../models"; diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/privateEndpointConnections.ts index 5e7c79b7f08b..7da1bbd06592 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/privateEndpointConnections.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/secrets.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/secrets.ts index ca2f10a761cf..7aa4e6e13104 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/secrets.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/secrets.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Secret, diff --git a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/vaults.ts b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/vaults.ts index b6415aaec258..b693f7e61645 100644 --- a/sdk/keyvault/arm-keyvault/src/operationsInterfaces/vaults.ts +++ b/sdk/keyvault/arm-keyvault/src/operationsInterfaces/vaults.ts @@ -6,7 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import "@azure/core-paging"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { diff --git a/sdk/keyvault/arm-keyvault/test/sampleTest.ts b/sdk/keyvault/arm-keyvault/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/keyvault/arm-keyvault/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/keyvault/arm-keyvault/tsconfig.json b/sdk/keyvault/arm-keyvault/tsconfig.json index 603440b3a359..6e3251194117 100644 --- a/sdk/keyvault/arm-keyvault/tsconfig.json +++ b/sdk/keyvault/arm-keyvault/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"], "exclude": ["node_modules"] }