diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..e397c92af74d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -16,6 +16,7 @@ specifiers: '@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz '@rush-temp/arm-attestation': file:./projects/arm-attestation.tgz '@rush-temp/arm-authorization': file:./projects/arm-authorization.tgz + '@rush-temp/arm-automanage': file:./projects/arm-automanage.tgz '@rush-temp/arm-azurestack': file:./projects/arm-azurestack.tgz '@rush-temp/arm-batch': file:./projects/arm-batch.tgz '@rush-temp/arm-billing': file:./projects/arm-billing.tgz @@ -197,6 +198,7 @@ dependencies: '@rush-temp/arm-appservice': file:projects/arm-appservice.tgz '@rush-temp/arm-attestation': file:projects/arm-attestation.tgz '@rush-temp/arm-authorization': file:projects/arm-authorization.tgz + '@rush-temp/arm-automanage': file:projects/arm-automanage.tgz '@rush-temp/arm-azurestack': file:projects/arm-azurestack.tgz '@rush-temp/arm-batch': file:projects/arm-batch.tgz '@rush-temp/arm-billing': file:projects/arm-billing.tgz @@ -6977,7 +6979,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 +7005,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 +7035,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 +7631,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 +7859,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 +7910,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 +7967,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 @@ -8122,6 +8124,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-automanage.tgz: + resolution: {integrity: sha512-N7ciqbfu9rg+OPHk9ANr2ukdJ0xWphfNI4g5+IZW6nrz8Sb8tghkvJJ1528E7eBHyVkzghQFKOZy2/fI74GXIw==, tarball: file:projects/arm-automanage.tgz} + name: '@rush-temp/arm-automanage' + version: 0.0.0 + dependencies: + '@microsoft/api-extractor': 7.19.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + dev: false + file:projects/arm-azurestack.tgz: resolution: {integrity: sha512-nx1zmEvcREyoaIZ/93bbMgWvGE7yOL/imhdnkRkyHyHm3ek5MjE8jW4PeY3WwhVx9ZvHqYmnQqk53QgYbhlFjw==, tarball: file:projects/arm-azurestack.tgz} name: '@rush-temp/arm-azurestack' @@ -9487,7 +9510,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 +10005,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 +10048,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 +10134,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 +10365,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 +10413,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 +10680,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 +10737,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 +10783,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 +10940,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 +11002,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 +11057,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 +11110,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 +11312,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 +11576,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 +11725,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 +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: @@ -11794,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: @@ -11814,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 transitivePeerDependencies: @@ -11834,7 +11857,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 +11896,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 +11917,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 +11940,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 +11960,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 +11980,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 +12001,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 +12023,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 +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 uuid: 8.3.2 @@ -12041,7 +12064,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 +12083,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 +12104,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 +12127,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 +12148,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 +12169,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 +12190,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 +12562,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 +12631,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 +12694,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 +12757,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 +12820,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 +12881,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 +12939,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 +12999,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 +13051,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 +13105,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 +13158,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/rush.json b/rush.json index 66a9aa13703f..87615d1711da 100644 --- a/rush.json +++ b/rush.json @@ -1215,6 +1215,11 @@ "packageName": "@azure/arm-containerinstance", "projectFolder": "sdk/containerinstance/arm-containerinstance", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-automanage", + "projectFolder": "sdk/automanage/arm-automanage", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/automanage/arm-automanage/CHANGELOG.md b/sdk/automanage/arm-automanage/CHANGELOG.md new file mode 100644 index 000000000000..e8843cbd54e0 --- /dev/null +++ b/sdk/automanage/arm-automanage/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-01-05) + +The package of @azure/arm-automanage is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/automanage/arm-automanage/LICENSE b/sdk/automanage/arm-automanage/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/automanage/arm-automanage/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/automanage/arm-automanage/README.md b/sdk/automanage/arm-automanage/README.md new file mode 100644 index 000000000000..5a60c99a78b4 --- /dev/null +++ b/sdk/automanage/arm-automanage/README.md @@ -0,0 +1,98 @@ +# Azure Automanage client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Automanage client. + +Automanage Client + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/automanage/arm-automanage) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-automanage) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-automanage?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-automanage` package + +Install the Azure Automanage client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-automanage +``` + +### Create and authenticate a `AutomanageClient` + +To create a client object to access the Azure Automanage API, you will need the `endpoint` of your Azure Automanage resource and a `credential`. The Azure Automanage client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Automanage resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Automanage** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { AutomanageClient } = require("@azure/arm-automanage"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new AutomanageClient(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 + +### AutomanageClient + +`AutomanageClient` is the primary interface for developers using the Azure Automanage client library. Explore the methods on this client object to understand the different features of the Azure Automanage service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fautomanage%2Farm-automanage%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/automanage/arm-automanage/_meta.json b/sdk/automanage/arm-automanage/_meta.json new file mode 100644 index 000000000000..f1491ce83cb1 --- /dev/null +++ b/sdk/automanage/arm-automanage/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "6acc7e2e59b3777da22e417149d0c71d05054bff", + "readme": "specification/automanage/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 --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/automanage/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.16.20211130.1" +} \ No newline at end of file diff --git a/sdk/automanage/arm-automanage/api-extractor.json b/sdk/automanage/arm-automanage/api-extractor.json new file mode 100644 index 000000000000..579c0f691125 --- /dev/null +++ b/sdk/automanage/arm-automanage/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-automanage.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/automanage/arm-automanage/package.json b/sdk/automanage/arm-automanage/package.json new file mode 100644 index 000000000000..08c8d31a20fb --- /dev/null +++ b/sdk/automanage/arm-automanage/package.json @@ -0,0 +1,92 @@ +{ + "name": "@azure/arm-automanage", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for AutomanageClient.", + "version": "1.0.0-beta.1", + "engines": { "node": ">=12.0.0" }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" + }, + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-automanage.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/automanage/arm-automanage", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/automanage/arm-automanage/review/arm-automanage.api.md b/sdk/automanage/arm-automanage/review/arm-automanage.api.md new file mode 100644 index 000000000000..702042fd40b2 --- /dev/null +++ b/sdk/automanage/arm-automanage/review/arm-automanage.api.md @@ -0,0 +1,420 @@ +## API Report File for "@azure/arm-automanage" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type Account = TrackedResource & { + identity?: AccountIdentity; +}; + +// @public +export interface AccountIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: ResourceIdentityType; +} + +// @public +export interface AccountList { + value?: Account[]; +} + +// @public +export interface Accounts { + createOrUpdate(accountName: string, resourceGroupName: string, parameters: Account, options?: AccountsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams): Promise; + get(accountName: string, resourceGroupName: string, options?: AccountsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AccountsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(accountName: string, resourceGroupName: string, parameters: AccountUpdate, options?: AccountsUpdateOptionalParams): Promise; +} + +// @public +export interface AccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsCreateOrUpdateResponse = Account; + +// @public +export interface AccountsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsGetResponse = Account; + +// @public +export interface AccountsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListByResourceGroupResponse = AccountList; + +// @public +export interface AccountsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListBySubscriptionResponse = AccountList; + +// @public +export interface AccountsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsUpdateResponse = Account; + +// @public +export type AccountUpdate = UpdateResource & { + identity?: AccountIdentity; +}; + +// @public (undocumented) +export class AutomanageClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AutomanageClientOptionalParams); + // (undocumented) + accounts: Accounts; + // (undocumented) + apiVersion: string; + // (undocumented) + configurationProfileAssignments: ConfigurationProfileAssignments; + // (undocumented) + configurationProfilePreferences: ConfigurationProfilePreferences; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface AutomanageClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type ConfigurationProfile = string; + +// @public +export type ConfigurationProfileAssignment = ProxyResource & { + properties?: ConfigurationProfileAssignmentProperties; +}; + +// @public +export interface ConfigurationProfileAssignmentCompliance { + readonly updateStatus?: UpdateStatus; +} + +// @public +export interface ConfigurationProfileAssignmentList { + value?: ConfigurationProfileAssignment[]; +} + +// @public +export interface ConfigurationProfileAssignmentProperties { + accountId?: string; + compliance?: ConfigurationProfileAssignmentCompliance; + configurationProfile?: ConfigurationProfile; + configurationProfilePreferenceId?: string; + readonly provisioningState?: ProvisioningState; + targetId?: string; +} + +// @public +export interface ConfigurationProfileAssignments { + beginCreateOrUpdate(configurationProfileAssignmentName: string, resourceGroupName: string, vmName: string, parameters: ConfigurationProfileAssignment, options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams): Promise, ConfigurationProfileAssignmentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(configurationProfileAssignmentName: string, resourceGroupName: string, vmName: string, parameters: ConfigurationProfileAssignment, options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, configurationProfileAssignmentName: string, vmName: string, options?: ConfigurationProfileAssignmentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, configurationProfileAssignmentName: string, vmName: string, options?: ConfigurationProfileAssignmentsGetOptionalParams): Promise; + list(resourceGroupName: string, options?: ConfigurationProfileAssignmentsListOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConfigurationProfileAssignmentsCreateOrUpdateResponse = ConfigurationProfileAssignment; + +// @public +export interface ConfigurationProfileAssignmentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConfigurationProfileAssignmentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfileAssignmentsGetResponse = ConfigurationProfileAssignment; + +// @public +export interface ConfigurationProfileAssignmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfileAssignmentsListBySubscriptionResponse = ConfigurationProfileAssignmentList; + +// @public +export interface ConfigurationProfileAssignmentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfileAssignmentsListResponse = ConfigurationProfileAssignmentList; + +// @public +export type ConfigurationProfilePreference = TrackedResource & { + properties?: ConfigurationProfilePreferenceProperties; +}; + +// @public +export interface ConfigurationProfilePreferenceAntiMalware { + enableRealTimeProtection?: EnableRealTimeProtection; + exclusions?: Record; + runScheduledScan?: RunScheduledScan; + scanDay?: string; + scanTimeInMinutes?: string; + scanType?: ScanType; +} + +// @public +export interface ConfigurationProfilePreferenceList { + value?: ConfigurationProfilePreference[]; +} + +// @public +export interface ConfigurationProfilePreferenceProperties { + antiMalware?: ConfigurationProfilePreferenceAntiMalware; + vmBackup?: ConfigurationProfilePreferenceVmBackup; +} + +// @public +export interface ConfigurationProfilePreferences { + createOrUpdate(configurationProfilePreferenceName: string, resourceGroupName: string, parameters: ConfigurationProfilePreference, options?: ConfigurationProfilePreferencesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, configurationProfilePreferenceName: string, options?: ConfigurationProfilePreferencesDeleteOptionalParams): Promise; + get(configurationProfilePreferenceName: string, resourceGroupName: string, options?: ConfigurationProfilePreferencesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(configurationProfilePreferenceName: string, resourceGroupName: string, parameters: ConfigurationProfilePreferenceUpdate, options?: ConfigurationProfilePreferencesUpdateOptionalParams): Promise; +} + +// @public +export interface ConfigurationProfilePreferencesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilePreferencesCreateOrUpdateResponse = ConfigurationProfilePreference; + +// @public +export interface ConfigurationProfilePreferencesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConfigurationProfilePreferencesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilePreferencesGetResponse = ConfigurationProfilePreference; + +// @public +export interface ConfigurationProfilePreferencesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilePreferencesListByResourceGroupResponse = ConfigurationProfilePreferenceList; + +// @public +export interface ConfigurationProfilePreferencesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilePreferencesListBySubscriptionResponse = ConfigurationProfilePreferenceList; + +// @public +export interface ConfigurationProfilePreferencesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilePreferencesUpdateResponse = ConfigurationProfilePreference; + +// @public +export type ConfigurationProfilePreferenceUpdate = UpdateResource & { + properties?: ConfigurationProfilePreferenceProperties; +}; + +// @public +export interface ConfigurationProfilePreferenceVmBackup { + instantRpRetentionRangeInDays?: number; + retentionPolicy?: string; + schedulePolicy?: string; + timeZone?: string; +} + +// @public +export type EnableRealTimeProtection = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export enum KnownConfigurationProfile { + // (undocumented) + AzureVirtualMachineBestPracticesDevTest = "Azure virtual machine best practices \u2013 Dev/Test", + // (undocumented) + AzureVirtualMachineBestPracticesProduction = "Azure virtual machine best practices \u2013 Production" +} + +// @public +export enum KnownEnableRealTimeProtection { + // (undocumented) + False = "False", + // (undocumented) + True = "True" +} + +// @public +export enum KnownProvisioningState { + // (undocumented) + Created = "Created", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownRunScheduledScan { + // (undocumented) + False = "False", + // (undocumented) + True = "True" +} + +// @public +export enum KnownScanType { + // (undocumented) + Full = "Full", + // (undocumented) + Quick = "Quick" +} + +// @public +export enum KnownUpdateStatus { + // (undocumented) + Created = "Created", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export interface Operation { + display?: OperationDisplay; + isDataAction?: string; + name?: string; + statusCode?: string; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationList { + value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationList; + +// @public +export type ProvisioningState = string; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export type ResourceIdentityType = "SystemAssigned" | "None"; + +// @public +export type RunScheduledScan = string; + +// @public +export type ScanType = string; + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UpdateResource { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type UpdateStatus = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/automanage/arm-automanage/rollup.config.js b/sdk/automanage/arm-automanage/rollup.config.js new file mode 100644 index 000000000000..9be1955eb7f1 --- /dev/null +++ b/sdk/automanage/arm-automanage/rollup.config.js @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/automanage/arm-automanage/src/automanageClient.ts b/sdk/automanage/arm-automanage/src/automanageClient.ts new file mode 100644 index 000000000000..9fc20b401bfd --- /dev/null +++ b/sdk/automanage/arm-automanage/src/automanageClient.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + AccountsImpl, + ConfigurationProfileAssignmentsImpl, + ConfigurationProfilePreferencesImpl, + OperationsImpl +} from "./operations"; +import { + Accounts, + ConfigurationProfileAssignments, + ConfigurationProfilePreferences, + Operations +} from "./operationsInterfaces"; +import { AutomanageClientOptionalParams } from "./models"; + +export class AutomanageClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the AutomanageClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: AutomanageClientOptionalParams + ) { + 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: AutomanageClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-automanage/1.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 || "2020-06-30-preview"; + this.accounts = new AccountsImpl(this); + this.configurationProfileAssignments = new ConfigurationProfileAssignmentsImpl( + this + ); + this.configurationProfilePreferences = new ConfigurationProfilePreferencesImpl( + this + ); + this.operations = new OperationsImpl(this); + } + + accounts: Accounts; + configurationProfileAssignments: ConfigurationProfileAssignments; + configurationProfilePreferences: ConfigurationProfilePreferences; + operations: Operations; +} diff --git a/sdk/automanage/arm-automanage/src/index.ts b/sdk/automanage/arm-automanage/src/index.ts new file mode 100644 index 000000000000..c65f5564354d --- /dev/null +++ b/sdk/automanage/arm-automanage/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { AutomanageClient } from "./automanageClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/automanage/arm-automanage/src/lroImpl.ts b/sdk/automanage/arm-automanage/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/automanage/arm-automanage/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/automanage/arm-automanage/src/models/index.ts b/sdk/automanage/arm-automanage/src/models/index.ts new file mode 100644 index 000000000000..30e5f69aa770 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/index.ts @@ -0,0 +1,487 @@ +/* + * 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"; + +/** Identity for the Automanage account. */ +export interface AccountIdentity { + /** + * The principal id of Automanage account identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant id associated with the Automanage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The type of identity used for the Automanage account. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity. */ + type?: ResourceIdentityType; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Represents an update resource */ +export interface UpdateResource { + /** The tags of the resource. */ + tags?: { [propertyName: string]: string }; +} + +/** The response of the list Account operation. */ +export interface AccountList { + /** Result of the list Account operation. */ + value?: Account[]; +} + +/** Automanage configuration profile assignment properties. */ +export interface ConfigurationProfileAssignmentProperties { + /** A value indicating configuration profile. */ + configurationProfile?: ConfigurationProfile; + /** The target VM resource URI */ + targetId?: string; + /** The Automanage account ARM Resource URI */ + accountId?: string; + /** The configuration profile custom preferences ARM resource URI */ + configurationProfilePreferenceId?: string; + /** + * The state of onboarding, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The configuration setting for the configuration profile. */ + compliance?: ConfigurationProfileAssignmentCompliance; +} + +/** The compliance status for the configuration profile assignment. */ +export interface ConfigurationProfileAssignmentCompliance { + /** + * The state of compliance, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updateStatus?: UpdateStatus; +} + +/** The response of the list configuration profile assignment operation. */ +export interface ConfigurationProfileAssignmentList { + /** Result of the list configuration profile assignment operation. */ + value?: ConfigurationProfileAssignment[]; +} + +/** Automanage configuration profile preference properties. */ +export interface ConfigurationProfilePreferenceProperties { + /** The custom preferences for Azure VM Backup. */ + vmBackup?: ConfigurationProfilePreferenceVmBackup; + /** The custom preferences for Azure Antimalware. */ + antiMalware?: ConfigurationProfilePreferenceAntiMalware; +} + +/** Automanage configuration profile VM Backup preferences. */ +export interface ConfigurationProfilePreferenceVmBackup { + /** TimeZone optional input as string. For example: Pacific Standard Time */ + timeZone?: string; + /** Instant RP retention policy range in days */ + instantRpRetentionRangeInDays?: number; + /** Retention policy with the details on backup copy retention ranges. */ + retentionPolicy?: string; + /** Backup schedule specified as part of backup policy. */ + schedulePolicy?: string; +} + +/** Automanage configuration profile Antimalware preferences. */ +export interface ConfigurationProfilePreferenceAntiMalware { + /** Enables or disables Real Time Protection */ + enableRealTimeProtection?: EnableRealTimeProtection; + /** Extensions, Paths and Processes that must be excluded from scan */ + exclusions?: Record; + /** Enables or disables a periodic scan for antimalware */ + runScheduledScan?: RunScheduledScan; + /** Type of scheduled scan */ + scanType?: ScanType; + /** Schedule scan settings day */ + scanDay?: string; + /** Schedule scan settings time */ + scanTimeInMinutes?: string; +} + +/** The response of the list ConfigurationProfilePreference operation. */ +export interface ConfigurationProfilePreferenceList { + /** Result of the list ConfigurationProfilePreference operation. */ + value?: ConfigurationProfilePreference[]; +} + +/** The response model for the list of Automanage operations */ +export interface OperationList { + /** List of Automanage operations supported by the Automanage resource provider. */ + value?: Operation[]; +} + +/** Automanage REST API operation */ +export interface Operation { + /** Operation name: For ex. providers/Microsoft.Automanage/configurationProfileAssignments/write or read */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: string; + /** Provider, Resource, Operation and description values. */ + display?: OperationDisplay; + /** Service provider: Microsoft.Automanage */ + statusCode?: string; +} + +/** Provider, Resource, Operation and description values. */ +export interface OperationDisplay { + /** Service provider: Microsoft.Automanage */ + provider?: string; + /** Resource on which the operation is performed: For ex. */ + resource?: string; + /** Operation type: Read, write, delete, etc. */ + operation?: string; + /** Description about operation. */ + description?: string; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +}; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** Definition of the Automanage account. */ +export type AccountUpdate = UpdateResource & { + /** The identity of the Automanage account. */ + identity?: AccountIdentity; +}; + +/** Definition of the configuration profile preference. */ +export type ConfigurationProfilePreferenceUpdate = UpdateResource & { + /** Properties of the configuration profile preference. */ + properties?: ConfigurationProfilePreferenceProperties; +}; + +/** Definition of the Automanage account. */ +export type Account = TrackedResource & { + /** The identity of the Automanage account. */ + identity?: AccountIdentity; +}; + +/** Definition of the configuration profile preference. */ +export type ConfigurationProfilePreference = TrackedResource & { + /** Properties of the configuration profile preference. */ + properties?: ConfigurationProfilePreferenceProperties; +}; + +/** Configuration profile assignment is an association between a VM and automanage profile configuration. */ +export type ConfigurationProfileAssignment = ProxyResource & { + /** Properties of the configuration profile assignment. */ + properties?: ConfigurationProfileAssignmentProperties; +}; + +/** Known values of {@link ConfigurationProfile} that the service accepts. */ +export enum KnownConfigurationProfile { + AzureVirtualMachineBestPracticesDevTest = "Azure virtual machine best practices – Dev/Test", + AzureVirtualMachineBestPracticesProduction = "Azure virtual machine best practices – Production" +} + +/** + * Defines values for ConfigurationProfile. \ + * {@link KnownConfigurationProfile} can be used interchangeably with ConfigurationProfile, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Azure virtual machine best practices – Dev\/Test** \ + * **Azure virtual machine best practices – Production** + */ +export type ConfigurationProfile = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + Succeeded = "Succeeded", + Failed = "Failed", + Created = "Created" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Created** + */ +export type ProvisioningState = string; + +/** Known values of {@link UpdateStatus} that the service accepts. */ +export enum KnownUpdateStatus { + Succeeded = "Succeeded", + Failed = "Failed", + Created = "Created" +} + +/** + * Defines values for UpdateStatus. \ + * {@link KnownUpdateStatus} can be used interchangeably with UpdateStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Created** + */ +export type UpdateStatus = string; + +/** Known values of {@link EnableRealTimeProtection} that the service accepts. */ +export enum KnownEnableRealTimeProtection { + True = "True", + False = "False" +} + +/** + * Defines values for EnableRealTimeProtection. \ + * {@link KnownEnableRealTimeProtection} can be used interchangeably with EnableRealTimeProtection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** + */ +export type EnableRealTimeProtection = string; + +/** Known values of {@link RunScheduledScan} that the service accepts. */ +export enum KnownRunScheduledScan { + True = "True", + False = "False" +} + +/** + * Defines values for RunScheduledScan. \ + * {@link KnownRunScheduledScan} can be used interchangeably with RunScheduledScan, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** + */ +export type RunScheduledScan = string; + +/** Known values of {@link ScanType} that the service accepts. */ +export enum KnownScanType { + Quick = "Quick", + Full = "Full" +} + +/** + * Defines values for ScanType. \ + * {@link KnownScanType} can be used interchangeably with ScanType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Quick** \ + * **Full** + */ +export type ScanType = string; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = "SystemAssigned" | "None"; + +/** Optional parameters. */ +export interface AccountsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AccountsCreateOrUpdateResponse = Account; + +/** Optional parameters. */ +export interface AccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccountsGetResponse = Account; + +/** Optional parameters. */ +export interface AccountsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AccountsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AccountsUpdateResponse = Account; + +/** Optional parameters. */ +export interface AccountsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type AccountsListByResourceGroupResponse = AccountList; + +/** Optional parameters. */ +export interface AccountsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type AccountsListBySubscriptionResponse = AccountList; + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ConfigurationProfileAssignmentsCreateOrUpdateResponse = ConfigurationProfileAssignment; + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConfigurationProfileAssignmentsGetResponse = ConfigurationProfileAssignment; + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConfigurationProfileAssignmentsListResponse = ConfigurationProfileAssignmentList; + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConfigurationProfileAssignmentsListBySubscriptionResponse = ConfigurationProfileAssignmentList; + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConfigurationProfilePreferencesCreateOrUpdateResponse = ConfigurationProfilePreference; + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConfigurationProfilePreferencesGetResponse = ConfigurationProfilePreference; + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConfigurationProfilePreferencesUpdateResponse = ConfigurationProfilePreference; + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ConfigurationProfilePreferencesListByResourceGroupResponse = ConfigurationProfilePreferenceList; + +/** Optional parameters. */ +export interface ConfigurationProfilePreferencesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConfigurationProfilePreferencesListBySubscriptionResponse = ConfigurationProfilePreferenceList; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationList; + +/** Optional parameters. */ +export interface AutomanageClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/automanage/arm-automanage/src/models/mappers.ts b/sdk/automanage/arm-automanage/src/models/mappers.ts new file mode 100644 index 000000000000..e5b9be14ac1b --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/mappers.ts @@ -0,0 +1,627 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const AccountIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: ["SystemAssigned", "None"] + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const UpdateResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const AccountList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Account" + } + } + } + } + } + } +}; + +export const ConfigurationProfileAssignmentProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentProperties", + modelProperties: { + configurationProfile: { + serializedName: "configurationProfile", + type: { + name: "String" + } + }, + targetId: { + serializedName: "targetId", + type: { + name: "String" + } + }, + accountId: { + serializedName: "accountId", + type: { + name: "String" + } + }, + configurationProfilePreferenceId: { + serializedName: "configurationProfilePreferenceId", + nullable: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + compliance: { + serializedName: "compliance", + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentCompliance" + } + } + } + } +}; + +export const ConfigurationProfileAssignmentCompliance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentCompliance", + modelProperties: { + updateStatus: { + serializedName: "updateStatus", + readOnly: true, + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfigurationProfileAssignmentList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationProfileAssignment" + } + } + } + } + } + } +}; + +export const ConfigurationProfilePreferenceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceProperties", + modelProperties: { + vmBackup: { + serializedName: "vmBackup", + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceVmBackup" + } + }, + antiMalware: { + serializedName: "antiMalware", + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceAntiMalware" + } + } + } + } +}; + +export const ConfigurationProfilePreferenceVmBackup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceVmBackup", + modelProperties: { + timeZone: { + serializedName: "timeZone", + nullable: true, + type: { + name: "String" + } + }, + instantRpRetentionRangeInDays: { + serializedName: "instantRpRetentionRangeInDays", + type: { + name: "Number" + } + }, + retentionPolicy: { + serializedName: "retentionPolicy", + nullable: true, + type: { + name: "String" + } + }, + schedulePolicy: { + serializedName: "schedulePolicy", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfigurationProfilePreferenceAntiMalware: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceAntiMalware", + modelProperties: { + enableRealTimeProtection: { + serializedName: "enableRealTimeProtection", + nullable: true, + type: { + name: "String" + } + }, + exclusions: { + serializedName: "exclusions", + nullable: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + runScheduledScan: { + serializedName: "runScheduledScan", + nullable: true, + type: { + name: "String" + } + }, + scanType: { + serializedName: "scanType", + nullable: true, + type: { + name: "String" + } + }, + scanDay: { + serializedName: "scanDay", + nullable: true, + type: { + name: "String" + } + }, + scanTimeInMinutes: { + serializedName: "scanTimeInMinutes", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfigurationProfilePreferenceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationProfilePreference" + } + } + } + } + } + } +}; + +export const OperationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + statusCode: { + serializedName: "properties.statusCode", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AccountUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountUpdate", + modelProperties: { + ...UpdateResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AccountIdentity" + } + } + } + } +}; + +export const ConfigurationProfilePreferenceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceUpdate", + modelProperties: { + ...UpdateResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceProperties" + } + } + } + } +}; + +export const Account: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Account", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AccountIdentity" + } + } + } + } +}; + +export const ConfigurationProfilePreference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfilePreference", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfilePreferenceProperties" + } + } + } + } +}; + +export const ConfigurationProfileAssignment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignment", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentProperties" + } + } + } + } +}; diff --git a/sdk/automanage/arm-automanage/src/models/parameters.ts b/sdk/automanage/arm-automanage/src/models/parameters.ts new file mode 100644 index 000000000000..c746998ceb68 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/parameters.ts @@ -0,0 +1,166 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + Account as AccountMapper, + AccountUpdate as AccountUpdateMapper, + ConfigurationProfileAssignment as ConfigurationProfileAssignmentMapper, + ConfigurationProfilePreference as ConfigurationProfilePreferenceMapper, + ConfigurationProfilePreferenceUpdate as ConfigurationProfilePreferenceUpdateMapper +} from "../models/mappers"; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: AccountMapper +}; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const accountName: OperationURLParameter = { + parameterPath: "accountName", + mapper: { + serializedName: "accountName", + required: true, + type: { + name: "String" + } + } +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-06-30-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: AccountUpdateMapper +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: ConfigurationProfileAssignmentMapper +}; + +export const configurationProfileAssignmentName: OperationURLParameter = { + parameterPath: "configurationProfileAssignmentName", + mapper: { + serializedName: "configurationProfileAssignmentName", + required: true, + type: { + name: "String" + } + } +}; + +export const vmName: OperationURLParameter = { + parameterPath: "vmName", + mapper: { + serializedName: "vmName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: ConfigurationProfilePreferenceMapper +}; + +export const configurationProfilePreferenceName: OperationURLParameter = { + parameterPath: "configurationProfilePreferenceName", + mapper: { + serializedName: "configurationProfilePreferenceName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: ConfigurationProfilePreferenceUpdateMapper +}; diff --git a/sdk/automanage/arm-automanage/src/operations/accounts.ts b/sdk/automanage/arm-automanage/src/operations/accounts.ts new file mode 100644 index 000000000000..34cebe02d246 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/accounts.ts @@ -0,0 +1,357 @@ +/* + * 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 { Accounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AutomanageClient } from "../automanageClient"; +import { + Account, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsDeleteOptionalParams, + AccountUpdate, + AccountsUpdateOptionalParams, + AccountsUpdateResponse, + AccountsListByResourceGroupResponse, + AccountsListBySubscriptionResponse +} from "../models"; + +/// +/** Class containing Accounts operations. */ +export class AccountsImpl implements Accounts { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class Accounts class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of Automanage accounts within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Retrieve a list of Automanage accounts within a subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AccountsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + } + + private async *listBySubscriptionPagingAll( + options?: AccountsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates an Automanage Account + * @param accountName Name of the Automanage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update Automanage account. + * @param options The options parameters. + */ + createOrUpdate( + accountName: string, + resourceGroupName: string, + parameters: Account, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { accountName, resourceGroupName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Get information about a Automanage account + * @param accountName The Automanage account name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + accountName: string, + resourceGroupName: string, + options?: AccountsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { accountName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Delete a Automanage account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of the Automanage account + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + deleteOperationSpec + ); + } + + /** + * Updates an Automanage Account + * @param accountName Name of the Automanage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update Automanage account. + * @param options The options parameters. + */ + update( + accountName: string, + resourceGroupName: string, + parameters: AccountUpdate, + options?: AccountsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { accountName, resourceGroupName, parameters, options }, + updateOperationSpec + ); + } + + /** + * Retrieve a list of Automanage accounts within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Retrieve a list of Automanage accounts within a subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + 201: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/accounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operations/configurationProfileAssignments.ts b/sdk/automanage/arm-automanage/src/operations/configurationProfileAssignments.ts new file mode 100644 index 000000000000..247ba54ad231 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/configurationProfileAssignments.ts @@ -0,0 +1,418 @@ +/* + * 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 { ConfigurationProfileAssignments } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AutomanageClient } from "../automanageClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ConfigurationProfileAssignment, + ConfigurationProfileAssignmentsListOptionalParams, + ConfigurationProfileAssignmentsListBySubscriptionOptionalParams, + ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams, + ConfigurationProfileAssignmentsCreateOrUpdateResponse, + ConfigurationProfileAssignmentsGetOptionalParams, + ConfigurationProfileAssignmentsGetResponse, + ConfigurationProfileAssignmentsDeleteOptionalParams, + ConfigurationProfileAssignmentsListResponse, + ConfigurationProfileAssignmentsListBySubscriptionResponse +} from "../models"; + +/// +/** Class containing ConfigurationProfileAssignments operations. */ +export class ConfigurationProfileAssignmentsImpl + implements ConfigurationProfileAssignments { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class ConfigurationProfileAssignments class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Get list of configuration profile assignments + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: ConfigurationProfileAssignmentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: ConfigurationProfileAssignmentsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + options?: ConfigurationProfileAssignmentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Get list of configuration profile assignments under a given subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + } + + private async *listBySubscriptionPagingAll( + options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates an association between a VM and Automanage configuration profile + * @param configurationProfileAssignmentName Name of the configuration profile assignment. Only default + * is supported. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the create or update configuration profile assignment. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + configurationProfileAssignmentName: string, + resourceGroupName: string, + vmName: string, + parameters: ConfigurationProfileAssignment, + options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConfigurationProfileAssignmentsCreateOrUpdateResponse + > + > { + 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, + { + configurationProfileAssignmentName, + resourceGroupName, + vmName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Creates an association between a VM and Automanage configuration profile + * @param configurationProfileAssignmentName Name of the configuration profile assignment. Only default + * is supported. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the create or update configuration profile assignment. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + configurationProfileAssignmentName: string, + resourceGroupName: string, + vmName: string, + parameters: ConfigurationProfileAssignment, + options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + configurationProfileAssignmentName, + resourceGroupName, + vmName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get information about a configuration profile assignment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName The configuration profile assignment name. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ConfigurationProfileAssignmentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + }, + getOperationSpec + ); + } + + /** + * Delete a configuration profile assignment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName Name of the configuration profile assignment + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ConfigurationProfileAssignmentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + }, + deleteOperationSpec + ); + } + + /** + * Get list of configuration profile assignments + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: ConfigurationProfileAssignmentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Get list of configuration profile assignments under a given subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileAssignment + }, + 201: { + bodyMapper: Mappers.ConfigurationProfileAssignment + }, + 202: { + bodyMapper: Mappers.ConfigurationProfileAssignment + }, + 204: { + bodyMapper: Mappers.ConfigurationProfileAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfileAssignments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileAssignmentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/configurationProfileAssignments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileAssignmentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operations/configurationProfilePreferences.ts b/sdk/automanage/arm-automanage/src/operations/configurationProfilePreferences.ts new file mode 100644 index 000000000000..1eb1cdc4f7f8 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/configurationProfilePreferences.ts @@ -0,0 +1,368 @@ +/* + * 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 { ConfigurationProfilePreferences } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AutomanageClient } from "../automanageClient"; +import { + ConfigurationProfilePreference, + ConfigurationProfilePreferencesListByResourceGroupOptionalParams, + ConfigurationProfilePreferencesListBySubscriptionOptionalParams, + ConfigurationProfilePreferencesCreateOrUpdateOptionalParams, + ConfigurationProfilePreferencesCreateOrUpdateResponse, + ConfigurationProfilePreferencesGetOptionalParams, + ConfigurationProfilePreferencesGetResponse, + ConfigurationProfilePreferencesDeleteOptionalParams, + ConfigurationProfilePreferenceUpdate, + ConfigurationProfilePreferencesUpdateOptionalParams, + ConfigurationProfilePreferencesUpdateResponse, + ConfigurationProfilePreferencesListByResourceGroupResponse, + ConfigurationProfilePreferencesListBySubscriptionResponse +} from "../models"; + +/// +/** Class containing ConfigurationProfilePreferences operations. */ +export class ConfigurationProfilePreferencesImpl + implements ConfigurationProfilePreferences { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class ConfigurationProfilePreferences class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of configuration profile preferences within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Retrieve a list of configuration profile preferences within a subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + } + + private async *listBySubscriptionPagingAll( + options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates a configuration profile preference + * @param configurationProfilePreferenceName Name of the configuration profile preference. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile preference. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfilePreferenceName: string, + resourceGroupName: string, + parameters: ConfigurationProfilePreference, + options?: ConfigurationProfilePreferencesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + configurationProfilePreferenceName, + resourceGroupName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Get information about a configuration profile preference + * @param configurationProfilePreferenceName The configuration profile preference name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfilePreferenceName: string, + resourceGroupName: string, + options?: ConfigurationProfilePreferencesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfilePreferenceName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Delete a configuration profile preference + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfilePreferenceName Name of the configuration profile preference + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfilePreferenceName: string, + options?: ConfigurationProfilePreferencesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, configurationProfilePreferenceName, options }, + deleteOperationSpec + ); + } + + /** + * Updates a configuration profile preference + * @param configurationProfilePreferenceName Name of the configuration profile preference. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile preference. + * @param options The options parameters. + */ + update( + configurationProfilePreferenceName: string, + resourceGroupName: string, + parameters: ConfigurationProfilePreferenceUpdate, + options?: ConfigurationProfilePreferencesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + configurationProfilePreferenceName, + resourceGroupName, + parameters, + options + }, + updateOperationSpec + ); + } + + /** + * Retrieve a list of configuration profile preferences within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Retrieve a list of configuration profile preferences within a subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfilePreference + }, + 201: { + bodyMapper: Mappers.ConfigurationProfilePreference + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfilePreferenceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfilePreference + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfilePreferenceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfilePreferenceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfilePreference + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfilePreferenceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfilePreferenceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/configurationProfilePreferences", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfilePreferenceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operations/index.ts b/sdk/automanage/arm-automanage/src/operations/index.ts new file mode 100644 index 000000000000..05a6125fb851 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./accounts"; +export * from "./configurationProfileAssignments"; +export * from "./configurationProfilePreferences"; +export * from "./operations"; diff --git a/sdk/automanage/arm-automanage/src/operations/operations.ts b/sdk/automanage/arm-automanage/src/operations/operations.ts new file mode 100644 index 000000000000..15b52306b2a9 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/operations.ts @@ -0,0 +1,98 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AutomanageClient } from "../automanageClient"; +import { + Operation, + OperationsListOptionalParams, + OperationsListResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Lists all of the available Automanage REST API operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available Automanage REST API operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Automanage/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/accounts.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/accounts.ts new file mode 100644 index 000000000000..1a5a330441e9 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/accounts.ts @@ -0,0 +1,91 @@ +/* + * 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 { + Account, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsDeleteOptionalParams, + AccountUpdate, + AccountsUpdateOptionalParams, + AccountsUpdateResponse +} from "../models"; + +/// +/** Interface representing a Accounts. */ +export interface Accounts { + /** + * Retrieve a list of Automanage accounts within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieve a list of Automanage accounts within a subscription + * @param options The options parameters. + */ + listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates an Automanage Account + * @param accountName Name of the Automanage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update Automanage account. + * @param options The options parameters. + */ + createOrUpdate( + accountName: string, + resourceGroupName: string, + parameters: Account, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise; + /** + * Get information about a Automanage account + * @param accountName The Automanage account name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + accountName: string, + resourceGroupName: string, + options?: AccountsGetOptionalParams + ): Promise; + /** + * Delete a Automanage account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of the Automanage account + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise; + /** + * Updates an Automanage Account + * @param accountName Name of the Automanage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update Automanage account. + * @param options The options parameters. + */ + update( + accountName: string, + resourceGroupName: string, + parameters: AccountUpdate, + options?: AccountsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfileAssignments.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfileAssignments.ts new file mode 100644 index 000000000000..09d4dae160f6 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfileAssignments.ts @@ -0,0 +1,104 @@ +/* + * 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 { + ConfigurationProfileAssignment, + ConfigurationProfileAssignmentsListOptionalParams, + ConfigurationProfileAssignmentsListBySubscriptionOptionalParams, + ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams, + ConfigurationProfileAssignmentsCreateOrUpdateResponse, + ConfigurationProfileAssignmentsGetOptionalParams, + ConfigurationProfileAssignmentsGetResponse, + ConfigurationProfileAssignmentsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ConfigurationProfileAssignments. */ +export interface ConfigurationProfileAssignments { + /** + * Get list of configuration profile assignments + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: ConfigurationProfileAssignmentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get list of configuration profile assignments under a given subscription + * @param options The options parameters. + */ + listBySubscription( + options?: ConfigurationProfileAssignmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates an association between a VM and Automanage configuration profile + * @param configurationProfileAssignmentName Name of the configuration profile assignment. Only default + * is supported. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the create or update configuration profile assignment. + * @param options The options parameters. + */ + beginCreateOrUpdate( + configurationProfileAssignmentName: string, + resourceGroupName: string, + vmName: string, + parameters: ConfigurationProfileAssignment, + options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConfigurationProfileAssignmentsCreateOrUpdateResponse + > + >; + /** + * Creates an association between a VM and Automanage configuration profile + * @param configurationProfileAssignmentName Name of the configuration profile assignment. Only default + * is supported. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the create or update configuration profile assignment. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + configurationProfileAssignmentName: string, + resourceGroupName: string, + vmName: string, + parameters: ConfigurationProfileAssignment, + options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Get information about a configuration profile assignment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName The configuration profile assignment name. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ConfigurationProfileAssignmentsGetOptionalParams + ): Promise; + /** + * Delete a configuration profile assignment + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName Name of the configuration profile assignment + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ConfigurationProfileAssignmentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilePreferences.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilePreferences.ts new file mode 100644 index 000000000000..0160d385ffbe --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilePreferences.ts @@ -0,0 +1,91 @@ +/* + * 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 { + ConfigurationProfilePreference, + ConfigurationProfilePreferencesListByResourceGroupOptionalParams, + ConfigurationProfilePreferencesListBySubscriptionOptionalParams, + ConfigurationProfilePreferencesCreateOrUpdateOptionalParams, + ConfigurationProfilePreferencesCreateOrUpdateResponse, + ConfigurationProfilePreferencesGetOptionalParams, + ConfigurationProfilePreferencesGetResponse, + ConfigurationProfilePreferencesDeleteOptionalParams, + ConfigurationProfilePreferenceUpdate, + ConfigurationProfilePreferencesUpdateOptionalParams, + ConfigurationProfilePreferencesUpdateResponse +} from "../models"; + +/// +/** Interface representing a ConfigurationProfilePreferences. */ +export interface ConfigurationProfilePreferences { + /** + * Retrieve a list of configuration profile preferences within a given resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ConfigurationProfilePreferencesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieve a list of configuration profile preferences within a subscription + * @param options The options parameters. + */ + listBySubscription( + options?: ConfigurationProfilePreferencesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a configuration profile preference + * @param configurationProfilePreferenceName Name of the configuration profile preference. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile preference. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfilePreferenceName: string, + resourceGroupName: string, + parameters: ConfigurationProfilePreference, + options?: ConfigurationProfilePreferencesCreateOrUpdateOptionalParams + ): Promise; + /** + * Get information about a configuration profile preference + * @param configurationProfilePreferenceName The configuration profile preference name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfilePreferenceName: string, + resourceGroupName: string, + options?: ConfigurationProfilePreferencesGetOptionalParams + ): Promise; + /** + * Delete a configuration profile preference + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfilePreferenceName Name of the configuration profile preference + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfilePreferenceName: string, + options?: ConfigurationProfilePreferencesDeleteOptionalParams + ): Promise; + /** + * Updates a configuration profile preference + * @param configurationProfilePreferenceName Name of the configuration profile preference. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile preference. + * @param options The options parameters. + */ + update( + configurationProfilePreferenceName: string, + resourceGroupName: string, + parameters: ConfigurationProfilePreferenceUpdate, + options?: ConfigurationProfilePreferencesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/index.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..05a6125fb851 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./accounts"; +export * from "./configurationProfileAssignments"; +export * from "./configurationProfilePreferences"; +export * from "./operations"; diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/operations.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..5f646309befc --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available Automanage REST API operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/automanage/arm-automanage/test/sampleTest.ts b/sdk/automanage/arm-automanage/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/automanage/arm-automanage/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/automanage/arm-automanage/tsconfig.json b/sdk/automanage/arm-automanage/tsconfig.json new file mode 100644 index 000000000000..6e3251194117 --- /dev/null +++ b/sdk/automanage/arm-automanage/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts", "./test/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/automanage/ci.yml b/sdk/automanage/ci.yml new file mode 100644 index 000000000000..27f714dcbe8f --- /dev/null +++ b/sdk/automanage/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/automanage/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/automanage/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: automanage + Artifacts: + - name: azure-arm-automanage + safeName: azurearmautomanage + \ No newline at end of file