From f61f05535c52c44e5f0f3946d530124a1e0dcac3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Feb 2022 20:45:43 +0000 Subject: [PATCH] CodeGen from PR 17596 in Azure/azure-rest-api-specs Merge a110fcfd92b17e9435fa2b6c7b2358169b545a89 into 9673e2239f4f8257b2e916df2d15e1ef41c5bfd1 --- common/config/rush/pnpm-lock.yaml | 101 ++- rush.json | 7 +- sdk/automanage/arm-automanage/CHANGELOG.md | 5 + sdk/automanage/arm-automanage/LICENSE | 21 + sdk/automanage/arm-automanage/README.md | 98 +++ sdk/automanage/arm-automanage/_meta.json | 7 + .../arm-automanage/api-extractor.json | 31 + sdk/automanage/arm-automanage/package.json | 100 +++ .../review/arm-automanage.api.md | 450 +++++++++++ .../arm-automanage/rollup.config.js | 188 +++++ .../arm-automanage/src/automanageClient.ts | 107 +++ sdk/automanage/arm-automanage/src/index.ts | 12 + .../arm-automanage/src/models/index.ts | 573 ++++++++++++++ .../arm-automanage/src/models/mappers.ts | 745 ++++++++++++++++++ .../arm-automanage/src/models/parameters.ts | 176 +++++ .../src/operations/bestPractices.ts | 134 ++++ .../src/operations/bestPracticesVersions.ts | 151 ++++ .../configurationProfileAssignments.ts | 335 ++++++++ .../src/operations/configurationProfiles.ts | 357 +++++++++ .../configurationProfilesVersions.ts | 334 ++++++++ .../arm-automanage/src/operations/index.ts | 15 + .../src/operations/operations.ts | 98 +++ .../arm-automanage/src/operations/reports.ts | 204 +++++ .../src/operationsInterfaces/bestPractices.ts | 36 + .../bestPracticesVersions.ts | 40 + .../configurationProfileAssignments.ts | 82 ++ .../configurationProfiles.ts | 91 +++ .../configurationProfilesVersions.ts | 93 +++ .../src/operationsInterfaces/index.ts | 15 + .../src/operationsInterfaces/operations.ts | 22 + .../src/operationsInterfaces/reports.ts | 48 ++ .../arm-automanage/test/sampleTest.ts | 48 ++ sdk/automanage/arm-automanage/tsconfig.json | 27 + sdk/automanage/ci.yml | 30 + 34 files changed, 4742 insertions(+), 39 deletions(-) create mode 100644 sdk/automanage/arm-automanage/CHANGELOG.md create mode 100644 sdk/automanage/arm-automanage/LICENSE create mode 100644 sdk/automanage/arm-automanage/README.md create mode 100644 sdk/automanage/arm-automanage/_meta.json create mode 100644 sdk/automanage/arm-automanage/api-extractor.json create mode 100644 sdk/automanage/arm-automanage/package.json create mode 100644 sdk/automanage/arm-automanage/review/arm-automanage.api.md create mode 100644 sdk/automanage/arm-automanage/rollup.config.js create mode 100644 sdk/automanage/arm-automanage/src/automanageClient.ts create mode 100644 sdk/automanage/arm-automanage/src/index.ts create mode 100644 sdk/automanage/arm-automanage/src/models/index.ts create mode 100644 sdk/automanage/arm-automanage/src/models/mappers.ts create mode 100644 sdk/automanage/arm-automanage/src/models/parameters.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/bestPractices.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/bestPracticesVersions.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/configurationProfileAssignments.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/configurationProfiles.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/configurationProfilesVersions.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/index.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/operations.ts create mode 100644 sdk/automanage/arm-automanage/src/operations/reports.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/bestPractices.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/bestPracticesVersions.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfileAssignments.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfiles.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilesVersions.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/index.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/operations.ts create mode 100644 sdk/automanage/arm-automanage/src/operationsInterfaces/reports.ts create mode 100644 sdk/automanage/arm-automanage/test/sampleTest.ts create mode 100644 sdk/automanage/arm-automanage/tsconfig.json create mode 100644 sdk/automanage/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index fb31c83fbf46..7b6be07bc9e2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -18,6 +18,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-avs': file:./projects/arm-avs.tgz '@rush-temp/arm-azurestack': file:./projects/arm-azurestack.tgz '@rush-temp/arm-azurestackhci': file:./projects/arm-azurestackhci.tgz @@ -273,6 +274,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-avs': file:projects/arm-avs.tgz '@rush-temp/arm-azurestack': file:projects/arm-azurestack.tgz '@rush-temp/arm-azurestackhci': file:projects/arm-azurestackhci.tgz @@ -967,7 +969,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.3 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.3 @@ -2128,7 +2130,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/chai-as-promised/7.1.4: @@ -2154,14 +2156,14 @@ packages: /@types/concurrently/6.4.0: resolution: {integrity: sha512-CYU1eyFHsIa2IZIsb8gfUOdiewfnZcyM2Hg1Zaq95xnmB0Ix/bTRM8SttqZ2Cjy6JGPZLttHjZewVsDg1yvnJg==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 chalk: 4.1.2 dev: false /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/cookie/0.4.1: @@ -2196,7 +2198,7 @@ packages: /@types/express-serve-static-core/4.17.28: resolution: {integrity: sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2213,26 +2215,26 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/json-schema/7.0.9: @@ -2246,13 +2248,13 @@ packages: /@types/jsonwebtoken/8.5.8: resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/long/4.0.1: @@ -2266,7 +2268,7 @@ packages: /@types/md5/2.3.1: resolution: {integrity: sha512-OK3oe+ALIoPSo262lnhAYwpqFNXbiwH2a+0+Z5YBnkQEwWD8fk5+PIeRhYA48PzvX9I4SGNpWy+9bLj8qz92RQ==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/mime/1.3.2: @@ -2292,13 +2294,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/ms/0.7.31: @@ -2312,7 +2314,7 @@ packages: /@types/node-fetch/2.5.12: resolution: {integrity: sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 form-data: 3.0.1 dev: false @@ -2351,7 +2353,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/semaphore/1.1.1: @@ -2362,7 +2364,7 @@ packages: resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} dependencies: '@types/mime': 1.3.2 - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/sinon/10.0.10: @@ -2384,7 +2386,7 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/tough-cookie/4.0.1: @@ -2394,13 +2396,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/underscore/1.11.4: @@ -2414,26 +2416,26 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/ws/8.2.2: resolution: {integrity: sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/xml2js/0.4.9: resolution: {integrity: sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==} dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false /@types/yauzl/2.9.2: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 12.20.43 + '@types/node': 17.0.15 dev: false optional: true @@ -3422,7 +3424,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3643,7 +3645,7 @@ packages: dependencies: semver: 7.3.5 shelljs: 0.8.5 - typescript: 4.2.4 + typescript: 4.5.5 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3696,7 +3698,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.43 + '@types/node': 17.0.15 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4531,7 +4533,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.0.5 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -8342,7 +8344,7 @@ packages: /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: - string-width: 1.0.2 + string-width: 4.2.3 dev: false /word-wrap/1.2.3: @@ -8799,7 +8801,7 @@ packages: dev: false file:projects/ai-form-recognizer.tgz: - resolution: {integrity: sha512-P8TSFPYonsRq17g0lGwIkF+WP0G4EPS39m0rrFGbRB49fIQ2ZOTiACPH4pWPQWDa6q5CbXMKOvJZfDwkvArpHQ==, tarball: file:projects/ai-form-recognizer.tgz} + resolution: {integrity: sha512-ownHpGufsptjT7As1HseE8LnhkNj/td/UB99hRgXU0EcSo2f2FvKFmxvkhd2s9SGdoxt22yty5r1BzbkBIvrSw==, tarball: file:projects/ai-form-recognizer.tgz} name: '@rush-temp/ai-form-recognizer' version: 0.0.0 dependencies: @@ -8840,7 +8842,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -9225,6 +9226,31 @@ packages: uglify-js: 3.15.1 dev: false + file:projects/arm-automanage.tgz: + resolution: {integrity: sha512-fz093DHwqfqXuAyRpXQbyCi+L14hLRfd+kaSDQtYpgrREFPfqWixwi3sdKlcOD3xCbv2BygB47yCyc7xoV5oYw==, tarball: file:projects/arm-automanage.tgz} + name: '@rush-temp/arm-automanage' + version: 0.0.0 + dependencies: + '@azure-tools/test-recorder': 1.0.2 + '@microsoft/api-extractor': 7.19.4 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.15.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + file:projects/arm-avs.tgz: resolution: {integrity: sha512-RdwLZ9hAJV8c9izgG2zvh+nNWtRflty3+fD2kaPJGMKUDxkjdJWUhjXlMRZJ8hXml0lYugXKdfBU39wvfcN1ow==, tarball: file:projects/arm-avs.tgz} name: '@rush-temp/arm-avs' @@ -14022,7 +14048,7 @@ packages: dev: false file:projects/eventgrid.tgz: - resolution: {integrity: sha512-9BGMqsBlp2lJdjX4ZlpoQuRKM/sLcpaIHFI7xaztqIaCq17bheVkFsBqw6izuZ59sn4DkAmcsovdtlA4S+jO5w==, tarball: file:projects/eventgrid.tgz} + resolution: {integrity: sha512-cRipNDlfS0co7HptArkxqp6lbNAffyBqpvSVSDhMe/ZR5cBJs6ywzCsV/QxHhxBpp6Z7p5To9h98IYOOIhMp+A==, tarball: file:projects/eventgrid.tgz} name: '@rush-temp/eventgrid' version: 0.0.0 dependencies: @@ -14076,7 +14102,7 @@ packages: dev: false file:projects/eventhubs-checkpointstore-blob.tgz: - resolution: {integrity: sha512-mGcs2vWqVqLXm7vXEIvHN5fB82d0MGEuCUFxZkmnwISHGLgj0Eg/yGM4WsDouYtUFdboeTrNSg1gaORB+WrC5A==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-Zjderk9z4yJ2X0VCX+Bg2mv4sRQQVGvPYhz4bqwQe8ekduCFek0KT0230RKdGANBSmWtYN/zbxmPbjexRtOv8A==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} name: '@rush-temp/eventhubs-checkpointstore-blob' version: 0.0.0 dependencies: @@ -14330,7 +14356,7 @@ packages: dev: false file:projects/iot-device-update.tgz: - resolution: {integrity: sha512-XwF1/EW7RR/mN5meDZOLMADblUIf6RywLM7pIbHeDfDxcfkihfXEMTvl7aLF26rA04TPxRah4r+OKrCbi8Sv7g==, tarball: file:projects/iot-device-update.tgz} + resolution: {integrity: sha512-rsm9IpQrX4PDeRoGSnfHltpD9jmpulpHFNu/lxAyTKHQPAk2Ji9ag1panuQZwQp+2ASA3AoA6DzbB2Q2Mx29cQ==, tarball: file:projects/iot-device-update.tgz} name: '@rush-temp/iot-device-update' version: 0.0.0 dependencies: @@ -15216,7 +15242,7 @@ packages: dev: false file:projects/perf-service-bus.tgz: - resolution: {integrity: sha512-pKuhxHEjhyGAKk5t/XaVzB6JHLSGzv/PE9Q5zgt+fEkcKrw19H7qsWJsBqPU2TIHjX1ddRgv+GW0c79shGEWbg==, tarball: file:projects/perf-service-bus.tgz} + resolution: {integrity: sha512-I9NPyEoKnxP89clzbNdSHyCWIYH86+mEBa8PR9tZLv7waQHsjFtuQj6tBhkqEqODTLjmKpJgr5ikmc7ZufEKBQ==, tarball: file:projects/perf-service-bus.tgz} name: '@rush-temp/perf-service-bus' version: 0.0.0 dependencies: @@ -15234,7 +15260,6 @@ packages: transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - - encoding - supports-color dev: false @@ -15560,7 +15585,7 @@ packages: dev: false file:projects/schema-registry-avro.tgz: - resolution: {integrity: sha512-oLhIB2Nqhk9vYYmhFaVfP0XdBJigpfdN37dHtNKbCjaUp9Vg5g9XyRCkqTdNrsDT6aNDpvQAW8g9Vm2V/roZgQ==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-RzaQoBIbNzOWnTtlJWWGMSWRWwqeu2hPKKCXc32ZOnpj5F/VJHN+TXdCxB2luIMRam7ufqbhPSM218df4+nulA==, tarball: file:projects/schema-registry-avro.tgz} name: '@rush-temp/schema-registry-avro' version: 0.0.0 dependencies: @@ -16156,7 +16181,7 @@ packages: dev: false file:projects/synapse-access-control.tgz: - resolution: {integrity: sha512-r+K5go02ZzvB1eNv2HgJluelwAinqtfhWqRX4/yV5lfL7RMk3gizbot6n8Ne8aBVxiXRWPNRDKnEz9l8bTju7Q==, tarball: file:projects/synapse-access-control.tgz} + resolution: {integrity: sha512-8OFSsIvvqKFB4r7z6QtpS+ElPHWoYwnnd8q25qy7+sD5Y6Fke1y/IQ16i0Se/DEnUbO7qOMaLgs1vF0PT/VJkg==, tarball: file:projects/synapse-access-control.tgz} name: '@rush-temp/synapse-access-control' version: 0.0.0 dependencies: diff --git a/rush.json b/rush.json index bb1a03ea6c55..a8d689282efe 100644 --- a/rush.json +++ b/rush.json @@ -1584,6 +1584,11 @@ "packageName": "@azure/arm-kusto", "projectFolder": "sdk/kusto/arm-kusto", "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..fe8dd8a04a67 --- /dev/null +++ b/sdk/automanage/arm-automanage/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-02-09) + +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..0c46ef111011 --- /dev/null +++ b/sdk/automanage/arm-automanage/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "162183de1e2c94678ec92ef493f10a62b93f12e2", + "readme": "specification/automanage/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/automanage/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.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..75203b05ef8f --- /dev/null +++ b/sdk/automanage/arm-automanage/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-automanage.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/automanage/arm-automanage/package.json b/sdk/automanage/arm-automanage/package.json new file mode 100644 index 000000000000..9a06c60dfe0b --- /dev/null +++ b/sdk/automanage/arm-automanage/package.json @@ -0,0 +1,100 @@ +{ + "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-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 +} \ No newline at end of file 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..deca9919ed70 --- /dev/null +++ b/sdk/automanage/arm-automanage/review/arm-automanage.api.md @@ -0,0 +1,450 @@ +## 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'; + +// @public +export type ActionType = string; + +// @public (undocumented) +export class AutomanageClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AutomanageClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + bestPractices: BestPractices; + // (undocumented) + bestPracticesVersions: BestPracticesVersions; + // (undocumented) + configurationProfileAssignments: ConfigurationProfileAssignments; + // (undocumented) + configurationProfiles: ConfigurationProfiles; + // (undocumented) + configurationProfilesVersions: ConfigurationProfilesVersions; + // (undocumented) + operations: Operations; + // (undocumented) + reports: Reports; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface AutomanageClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface BestPractice { + configuration?: Record; + readonly id?: string; + readonly name?: string; + overrides?: Record[]; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface BestPracticeList { + value?: BestPractice[]; +} + +// @public +export interface BestPractices { + get(bestPracticeName: string, options?: BestPracticesGetOptionalParams): Promise; + listByTenant(options?: BestPracticesListByTenantOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BestPracticesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BestPracticesGetResponse = BestPractice; + +// @public +export interface BestPracticesListByTenantOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BestPracticesListByTenantResponse = BestPracticeList; + +// @public +export interface BestPracticesVersions { + get(bestPracticeName: string, versionName: string, options?: BestPracticesVersionsGetOptionalParams): Promise; + listByTenant(bestPracticeName: string, options?: BestPracticesVersionsListByTenantOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BestPracticesVersionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BestPracticesVersionsGetResponse = BestPractice; + +// @public +export interface BestPracticesVersionsListByTenantOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BestPracticesVersionsListByTenantResponse = BestPracticeList; + +// @public +export type ConfigurationProfile = TrackedResource & { + properties?: ConfigurationProfileProperties; + readonly systemData?: SystemData; +}; + +// @public +export type ConfigurationProfileAssignment = ProxyResource & { + properties?: ConfigurationProfileAssignmentProperties; + readonly systemData?: SystemData; +}; + +// @public +export interface ConfigurationProfileAssignmentList { + value?: ConfigurationProfileAssignment[]; +} + +// @public +export interface ConfigurationProfileAssignmentProperties { + configurationProfile?: string; + profileOverrides?: { + [propertyName: string]: Record; + }; + readonly status?: string; + targetId?: string; +} + +// @public +export interface ConfigurationProfileAssignments { + createOrUpdate(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 { +} + +// @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 interface ConfigurationProfileList { + value?: ConfigurationProfile[]; +} + +// @public +export interface ConfigurationProfileProperties { + configuration?: Record; + overrides?: Record[]; +} + +// @public +export interface ConfigurationProfiles { + createOrUpdate(configurationProfileName: string, resourceGroupName: string, parameters: ConfigurationProfile, options?: ConfigurationProfilesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, configurationProfileName: string, options?: ConfigurationProfilesDeleteOptionalParams): Promise; + get(configurationProfileName: string, resourceGroupName: string, options?: ConfigurationProfilesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ConfigurationProfilesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ConfigurationProfilesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(configurationProfileName: string, resourceGroupName: string, parameters: ConfigurationProfileUpdate, options?: ConfigurationProfilesUpdateOptionalParams): Promise; +} + +// @public +export interface ConfigurationProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesCreateOrUpdateResponse = ConfigurationProfile; + +// @public +export interface ConfigurationProfilesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConfigurationProfilesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesGetResponse = ConfigurationProfile; + +// @public +export interface ConfigurationProfilesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesListByResourceGroupResponse = ConfigurationProfileList; + +// @public +export interface ConfigurationProfilesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesListBySubscriptionResponse = ConfigurationProfileList; + +// @public +export interface ConfigurationProfilesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesUpdateResponse = ConfigurationProfile; + +// @public +export interface ConfigurationProfilesVersions { + createOrUpdate(configurationProfileName: string, versionName: string, resourceGroupName: string, parameters: ConfigurationProfile, options?: ConfigurationProfilesVersionsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, configurationProfileName: string, versionName: string, options?: ConfigurationProfilesVersionsDeleteOptionalParams): Promise; + get(configurationProfileName: string, versionName: string, resourceGroupName: string, options?: ConfigurationProfilesVersionsGetOptionalParams): Promise; + listChildResources(configurationProfileName: string, resourceGroupName: string, options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams): PagedAsyncIterableIterator; + update(configurationProfileName: string, versionName: string, resourceGroupName: string, parameters: ConfigurationProfileUpdate, options?: ConfigurationProfilesVersionsUpdateOptionalParams): Promise; +} + +// @public +export interface ConfigurationProfilesVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesVersionsCreateOrUpdateResponse = ConfigurationProfile; + +// @public +export interface ConfigurationProfilesVersionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConfigurationProfilesVersionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesVersionsGetResponse = ConfigurationProfile; + +// @public +export interface ConfigurationProfilesVersionsListChildResourcesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesVersionsListChildResourcesResponse = ConfigurationProfileList; + +// @public +export interface ConfigurationProfilesVersionsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationProfilesVersionsUpdateResponse = ConfigurationProfile; + +// @public +export type ConfigurationProfileUpdate = UpdateResource & { + properties?: ConfigurationProfileProperties; +}; + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export enum KnownActionType { + // (undocumented) + Internal = "Internal" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownOrigin { + // (undocumented) + System = "system", + // (undocumented) + User = "user", + // (undocumented) + UserSystem = "user,system" +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type Report = ProxyResource & { + readonly systemData?: SystemData; + startTime?: string; + endTime?: string; + readonly lastModifiedTime?: string; + readonly duration?: string; + readonly typePropertiesType?: string; + readonly status?: string; + readonly configurationProfile?: string; + readonly resources?: ReportResource[]; + readonly error?: ErrorDetail; + readonly reportFormatVersion?: string; +}; + +// @public +export interface ReportList { + value?: Report[]; +} + +// @public +export interface ReportResource { + readonly error?: ErrorDetail; + readonly id?: string; + readonly name?: string; + readonly status?: string; + readonly type?: string; +} + +// @public +export interface Reports { + get(resourceGroupName: string, configurationProfileAssignmentName: string, reportName: string, vmName: string, options?: ReportsGetOptionalParams): Promise; + listByConfigurationProfileAssignments(resourceGroupName: string, configurationProfileAssignmentName: string, vmName: string, options?: ReportsListByConfigurationProfileAssignmentsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ReportsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReportsGetResponse = Report; + +// @public +export interface ReportsListByConfigurationProfileAssignmentsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReportsListByConfigurationProfileAssignmentsResponse = ReportList; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UpdateResource { + tags?: { + [propertyName: string]: 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..65bb25f6f630 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/automanageClient.ts @@ -0,0 +1,107 @@ +/* + * 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 { + BestPracticesImpl, + BestPracticesVersionsImpl, + ConfigurationProfilesImpl, + ConfigurationProfilesVersionsImpl, + ConfigurationProfileAssignmentsImpl, + OperationsImpl, + ReportsImpl +} from "./operations"; +import { + BestPractices, + BestPracticesVersions, + ConfigurationProfiles, + ConfigurationProfilesVersions, + ConfigurationProfileAssignments, + Operations, + Reports +} from "./operationsInterfaces"; +import { AutomanageClientOptionalParams } from "./models"; + +export class AutomanageClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: 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 || "2021-04-30-preview"; + this.bestPractices = new BestPracticesImpl(this); + this.bestPracticesVersions = new BestPracticesVersionsImpl(this); + this.configurationProfiles = new ConfigurationProfilesImpl(this); + this.configurationProfilesVersions = new ConfigurationProfilesVersionsImpl( + this + ); + this.configurationProfileAssignments = new ConfigurationProfileAssignmentsImpl( + this + ); + this.operations = new OperationsImpl(this); + this.reports = new ReportsImpl(this); + } + + bestPractices: BestPractices; + bestPracticesVersions: BestPracticesVersions; + configurationProfiles: ConfigurationProfiles; + configurationProfilesVersions: ConfigurationProfilesVersions; + configurationProfileAssignments: ConfigurationProfileAssignments; + operations: Operations; + reports: Reports; +} 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/models/index.ts b/sdk/automanage/arm-automanage/src/models/index.ts new file mode 100644 index 000000000000..024e5c3131b4 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/index.ts @@ -0,0 +1,573 @@ +/* + * 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"; + +/** Definition of the Automanage best practice. */ +export interface BestPractice { + /** + * The fully qualified ID for the best practice. For example, /providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Automanage/bestPractices + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The name of the best practice. For example, azureBestPracticesProduction + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** configuration dictionary of the configuration profile. */ + configuration?: Record; + /** overrides of the configuration profile. */ + overrides?: Record[]; +} + +/** Automanage configuration profile properties. */ +export interface ConfigurationProfileProperties { + /** configuration dictionary of the configuration profile. */ + configuration?: Record; + /** overrides of the configuration profile. */ + overrides?: Record[]; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** 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; +} + +/** The response of the list best practice operation. */ +export interface BestPracticeList { + /** Result of the list best practice operation. */ + value?: BestPractice[]; +} + +/** 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; +} + +/** Represents an update resource */ +export interface UpdateResource { + /** The tags of the resource. */ + tags?: { [propertyName: string]: string }; +} + +/** The response of the list configuration profile operation. */ +export interface ConfigurationProfileList { + /** Result of the list ConfigurationProfile operation. */ + value?: ConfigurationProfile[]; +} + +/** Automanage configuration profile assignment properties. */ +export interface ConfigurationProfileAssignmentProperties { + /** The Automanage configurationProfile ARM Resource URI. */ + configurationProfile?: string; + /** The target VM resource URI */ + targetId?: string; + /** + * The status of onboarding, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** The profileOverrides setting for the configuration profile assignment. */ + profileOverrides?: { [propertyName: string]: Record }; +} + +/** The response of the list configuration profile assignment operation. */ +export interface ConfigurationProfileAssignmentList { + /** Result of the list configuration profile assignment operation. */ + value?: ConfigurationProfileAssignment[]; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** Details about the resource processed by the configuration profile assignment */ +export interface ReportResource { + /** + * Name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * ARM id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Status of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Error message, if any, returned when deploying the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorDetail; +} + +/** The response of the list report operation. */ +export interface ReportList { + /** Result of the list report operation. */ + value?: Report[]; +} + +/** 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 configuration profile. */ +export type ConfigurationProfileUpdate = UpdateResource & { + /** Properties of the configuration profile. */ + properties?: ConfigurationProfileProperties; +}; + +/** Definition of the configuration profile. */ +export type ConfigurationProfile = TrackedResource & { + /** Properties of the configuration profile. */ + properties?: ConfigurationProfileProperties; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +}; + +/** 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; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +}; + +/** Definition of the report. */ +export type Report = ProxyResource & { + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Start time of the configuration profile assignment processing. */ + startTime?: string; + /** End time of the configuration profile assignment processing. */ + endTime?: string; + /** + * Last modified time of the configuration profile assignment processing. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedTime?: string; + /** + * Duration of the configuration profile assignment processing. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly duration?: string; + /** + * Type of the configuration profile assignment processing (Initial/Consistency). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly typePropertiesType?: string; + /** + * The status of the configuration profile assignment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * The configurationProfile linked to the assignment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly configurationProfile?: string; + /** + * List of resources processed by the configuration profile assignment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: ReportResource[]; + /** + * Error message, if any, returned by the configuration profile assignment processing. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorDetail; + /** + * Version of the report format + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reportFormatVersion?: string; +}; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + User = "user", + System = "system", + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Optional parameters. */ +export interface BestPracticesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BestPracticesGetResponse = BestPractice; + +/** Optional parameters. */ +export interface BestPracticesListByTenantOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTenant operation. */ +export type BestPracticesListByTenantResponse = BestPracticeList; + +/** Optional parameters. */ +export interface BestPracticesVersionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BestPracticesVersionsGetResponse = BestPractice; + +/** Optional parameters. */ +export interface BestPracticesVersionsListByTenantOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTenant operation. */ +export type BestPracticesVersionsListByTenantResponse = BestPracticeList; + +/** Optional parameters. */ +export interface ConfigurationProfilesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConfigurationProfilesCreateOrUpdateResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConfigurationProfilesGetResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConfigurationProfilesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConfigurationProfilesUpdateResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ConfigurationProfilesListByResourceGroupResponse = ConfigurationProfileList; + +/** Optional parameters. */ +export interface ConfigurationProfilesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConfigurationProfilesListBySubscriptionResponse = ConfigurationProfileList; + +/** Optional parameters. */ +export interface ConfigurationProfilesVersionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConfigurationProfilesVersionsCreateOrUpdateResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesVersionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConfigurationProfilesVersionsGetResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesVersionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConfigurationProfilesVersionsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConfigurationProfilesVersionsUpdateResponse = ConfigurationProfile; + +/** Optional parameters. */ +export interface ConfigurationProfilesVersionsListChildResourcesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listChildResources operation. */ +export type ConfigurationProfilesVersionsListChildResourcesResponse = ConfigurationProfileList; + +/** Optional parameters. */ +export interface ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** 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 OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface ReportsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ReportsGetResponse = Report; + +/** Optional parameters. */ +export interface ReportsListByConfigurationProfileAssignmentsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByConfigurationProfileAssignments operation. */ +export type ReportsListByConfigurationProfileAssignmentsResponse = ReportList; + +/** 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..78543398a674 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/mappers.ts @@ -0,0 +1,745 @@ +/* + * 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 BestPractice: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BestPractice", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + overrides: { + serializedName: "properties.overrides", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } + } + } +}; + +export const ConfigurationProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileProperties", + modelProperties: { + configuration: { + serializedName: "configuration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + overrides: { + serializedName: "overrides", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const 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 BestPracticeList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BestPracticeList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BestPractice" + } + } + } + } + } + } +}; + +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 UpdateResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ConfigurationProfileList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationProfile" + } + } + } + } + } + } +}; + +export const ConfigurationProfileAssignmentProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentProperties", + modelProperties: { + configurationProfile: { + serializedName: "configurationProfile", + type: { + name: "String" + } + }, + targetId: { + serializedName: "targetId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + profileOverrides: { + serializedName: "profileOverrides", + type: { + name: "Dictionary", + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } + } + } + } + } +}; + +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 OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReportResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReportResource", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ReportList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReportList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Report" + } + } + } + } + } + } +}; + +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 ConfigurationProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileUpdate", + modelProperties: { + ...UpdateResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfileProperties" + } + } + } + } +}; + +export const ConfigurationProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfile", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfileProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ConfigurationProfileAssignment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationProfileAssignment", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConfigurationProfileAssignmentProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const Report: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Report", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "String" + } + }, + lastModifiedTime: { + serializedName: "properties.lastModifiedTime", + readOnly: true, + type: { + name: "String" + } + }, + duration: { + serializedName: "properties.duration", + readOnly: true, + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + configurationProfile: { + serializedName: "properties.configurationProfile", + readOnly: true, + type: { + name: "String" + } + }, + resources: { + serializedName: "properties.resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportResource" + } + } + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "ErrorDetail" + } + }, + reportFormatVersion: { + serializedName: "properties.reportFormatVersion", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; 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..8699b98709f0 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/models/parameters.ts @@ -0,0 +1,176 @@ +/* + * 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 { + ConfigurationProfile as ConfigurationProfileMapper, + ConfigurationProfileUpdate as ConfigurationProfileUpdateMapper, + ConfigurationProfileAssignment as ConfigurationProfileAssignmentMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const bestPracticeName: OperationURLParameter = { + parameterPath: "bestPracticeName", + mapper: { + serializedName: "bestPracticeName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-04-30-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const versionName: OperationURLParameter = { + parameterPath: "versionName", + mapper: { + serializedName: "versionName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: ConfigurationProfileMapper +}; + +export const configurationProfileName: OperationURLParameter = { + parameterPath: "configurationProfileName", + mapper: { + serializedName: "configurationProfileName", + 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 parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: ConfigurationProfileUpdateMapper +}; + +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 reportName: OperationURLParameter = { + parameterPath: "reportName", + mapper: { + serializedName: "reportName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/automanage/arm-automanage/src/operations/bestPractices.ts b/sdk/automanage/arm-automanage/src/operations/bestPractices.ts new file mode 100644 index 000000000000..e97161c1cd44 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/bestPractices.ts @@ -0,0 +1,134 @@ +/* + * 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 { BestPractices } 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 { + BestPractice, + BestPracticesListByTenantOptionalParams, + BestPracticesGetOptionalParams, + BestPracticesGetResponse, + BestPracticesListByTenantResponse +} from "../models"; + +/// +/** Class containing BestPractices operations. */ +export class BestPracticesImpl implements BestPractices { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class BestPractices class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of Automanage best practices + * @param options The options parameters. + */ + public listByTenant( + options?: BestPracticesListByTenantOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTenantPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByTenantPagingPage(options); + } + }; + } + + private async *listByTenantPagingPage( + options?: BestPracticesListByTenantOptionalParams + ): AsyncIterableIterator { + let result = await this._listByTenant(options); + yield result.value || []; + } + + private async *listByTenantPagingAll( + options?: BestPracticesListByTenantOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTenantPagingPage(options)) { + yield* page; + } + } + + /** + * Get information about a Automanage best practice + * @param bestPracticeName The Automanage best practice name. + * @param options The options parameters. + */ + get( + bestPracticeName: string, + options?: BestPracticesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { bestPracticeName, options }, + getOperationSpec + ); + } + + /** + * Retrieve a list of Automanage best practices + * @param options The options parameters. + */ + private _listByTenant( + options?: BestPracticesListByTenantOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listByTenantOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Automanage/bestPractices/{bestPracticeName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BestPractice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.bestPracticeName], + headerParameters: [Parameters.accept], + serializer +}; +const listByTenantOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Automanage/bestPractices", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BestPracticeList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operations/bestPracticesVersions.ts b/sdk/automanage/arm-automanage/src/operations/bestPracticesVersions.ts new file mode 100644 index 000000000000..e363cf593443 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/bestPracticesVersions.ts @@ -0,0 +1,151 @@ +/* + * 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 { BestPracticesVersions } 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 { + BestPractice, + BestPracticesVersionsListByTenantOptionalParams, + BestPracticesVersionsGetOptionalParams, + BestPracticesVersionsGetResponse, + BestPracticesVersionsListByTenantResponse +} from "../models"; + +/// +/** Class containing BestPracticesVersions operations. */ +export class BestPracticesVersionsImpl implements BestPracticesVersions { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class BestPracticesVersions class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of Automanage best practices versions + * @param bestPracticeName The Automanage best practice name. + * @param options The options parameters. + */ + public listByTenant( + bestPracticeName: string, + options?: BestPracticesVersionsListByTenantOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTenantPagingAll(bestPracticeName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByTenantPagingPage(bestPracticeName, options); + } + }; + } + + private async *listByTenantPagingPage( + bestPracticeName: string, + options?: BestPracticesVersionsListByTenantOptionalParams + ): AsyncIterableIterator { + let result = await this._listByTenant(bestPracticeName, options); + yield result.value || []; + } + + private async *listByTenantPagingAll( + bestPracticeName: string, + options?: BestPracticesVersionsListByTenantOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTenantPagingPage( + bestPracticeName, + options + )) { + yield* page; + } + } + + /** + * Get information about a Automanage best practice version + * @param bestPracticeName The Automanage best practice name. + * @param versionName The Automanage best practice version name. + * @param options The options parameters. + */ + get( + bestPracticeName: string, + versionName: string, + options?: BestPracticesVersionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { bestPracticeName, versionName, options }, + getOperationSpec + ); + } + + /** + * Retrieve a list of Automanage best practices versions + * @param bestPracticeName The Automanage best practice name. + * @param options The options parameters. + */ + private _listByTenant( + bestPracticeName: string, + options?: BestPracticesVersionsListByTenantOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { bestPracticeName, options }, + listByTenantOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/Microsoft.Automanage/bestPractices/{bestPracticeName}/versions/{versionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BestPractice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.bestPracticeName, + Parameters.versionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByTenantOperationSpec: coreClient.OperationSpec = { + path: + "/providers/Microsoft.Automanage/bestPractices/{bestPracticeName}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BestPracticeList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.bestPracticeName], + 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..0a549631c29d --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/configurationProfileAssignments.ts @@ -0,0 +1,335 @@ +/* + * 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 { + 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. + */ + createOrUpdate( + configurationProfileAssignmentName: string, + resourceGroupName: string, + vmName: string, + parameters: ConfigurationProfileAssignment, + options?: ConfigurationProfileAssignmentsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + configurationProfileAssignmentName, + resourceGroupName, + vmName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * 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 + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + 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/configurationProfiles.ts b/sdk/automanage/arm-automanage/src/operations/configurationProfiles.ts new file mode 100644 index 000000000000..1d104a84552c --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/configurationProfiles.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 { ConfigurationProfiles } 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 { + ConfigurationProfile, + ConfigurationProfilesListByResourceGroupOptionalParams, + ConfigurationProfilesListBySubscriptionOptionalParams, + ConfigurationProfilesCreateOrUpdateOptionalParams, + ConfigurationProfilesCreateOrUpdateResponse, + ConfigurationProfilesGetOptionalParams, + ConfigurationProfilesGetResponse, + ConfigurationProfilesDeleteOptionalParams, + ConfigurationProfileUpdate, + ConfigurationProfilesUpdateOptionalParams, + ConfigurationProfilesUpdateResponse, + ConfigurationProfilesListByResourceGroupResponse, + ConfigurationProfilesListBySubscriptionResponse +} from "../models"; + +/// +/** Class containing ConfigurationProfiles operations. */ +export class ConfigurationProfilesImpl implements ConfigurationProfiles { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class ConfigurationProfiles class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of configuration profile 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?: ConfigurationProfilesListByResourceGroupOptionalParams + ): 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?: ConfigurationProfilesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ConfigurationProfilesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Retrieve a list of configuration profile within a subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: ConfigurationProfilesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ConfigurationProfilesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + } + + private async *listBySubscriptionPagingAll( + options?: ConfigurationProfilesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfileName: string, + resourceGroupName: string, + parameters: ConfigurationProfile, + options?: ConfigurationProfilesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfileName, resourceGroupName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Get information about a configuration profile + * @param configurationProfileName The configuration profile name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfileName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Delete a configuration profile + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileName Name of the configuration profile + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileName: string, + options?: ConfigurationProfilesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, configurationProfileName, options }, + deleteOperationSpec + ); + } + + /** + * Updates a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update configuration profile. + * @param options The options parameters. + */ + update( + configurationProfileName: string, + resourceGroupName: string, + parameters: ConfigurationProfileUpdate, + options?: ConfigurationProfilesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfileName, resourceGroupName, parameters, options }, + updateOperationSpec + ); + } + + /** + * Retrieve a list of configuration profile 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?: ConfigurationProfilesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Retrieve a list of configuration profile within a subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: ConfigurationProfilesListBySubscriptionOptionalParams + ): 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/configurationProfiles/{configurationProfileName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + 201: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileList + }, + 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/configurationProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileList + }, + 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/configurationProfilesVersions.ts b/sdk/automanage/arm-automanage/src/operations/configurationProfilesVersions.ts new file mode 100644 index 000000000000..16fe3b6d2511 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/configurationProfilesVersions.ts @@ -0,0 +1,334 @@ +/* + * 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 { ConfigurationProfilesVersions } 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 { + ConfigurationProfile, + ConfigurationProfilesVersionsListChildResourcesOptionalParams, + ConfigurationProfilesVersionsCreateOrUpdateOptionalParams, + ConfigurationProfilesVersionsCreateOrUpdateResponse, + ConfigurationProfilesVersionsGetOptionalParams, + ConfigurationProfilesVersionsGetResponse, + ConfigurationProfilesVersionsDeleteOptionalParams, + ConfigurationProfileUpdate, + ConfigurationProfilesVersionsUpdateOptionalParams, + ConfigurationProfilesVersionsUpdateResponse, + ConfigurationProfilesVersionsListChildResourcesResponse +} from "../models"; + +/// +/** Class containing ConfigurationProfilesVersions operations. */ +export class ConfigurationProfilesVersionsImpl + implements ConfigurationProfilesVersions { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class ConfigurationProfilesVersions class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of configuration profile version for a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listChildResources( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listChildResourcesPagingAll( + configurationProfileName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listChildResourcesPagingPage( + configurationProfileName, + resourceGroupName, + options + ); + } + }; + } + + private async *listChildResourcesPagingPage( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams + ): AsyncIterableIterator { + let result = await this._listChildResources( + configurationProfileName, + resourceGroupName, + options + ); + yield result.value || []; + } + + private async *listChildResourcesPagingAll( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listChildResourcesPagingPage( + configurationProfileName, + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Creates a configuration profile version + * @param configurationProfileName Name of the configuration profile. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + parameters: ConfigurationProfile, + options?: ConfigurationProfilesVersionsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + configurationProfileName, + versionName, + resourceGroupName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Get information about a configuration profile version + * @param configurationProfileName The configuration profile name. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfileName, versionName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Delete a configuration profile version + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileName Name of the configuration profile + * @param versionName The configuration profile version name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileName: string, + versionName: string, + options?: ConfigurationProfilesVersionsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, configurationProfileName, versionName, options }, + deleteOperationSpec + ); + } + + /** + * Updates a configuration profile version + * @param configurationProfileName Name of the configuration profile. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update configuration profile. + * @param options The options parameters. + */ + update( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + parameters: ConfigurationProfileUpdate, + options?: ConfigurationProfilesVersionsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + configurationProfileName, + versionName, + resourceGroupName, + parameters, + options + }, + updateOperationSpec + ); + } + + /** + * Retrieve a list of configuration profile version for a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listChildResources( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { configurationProfileName, resourceGroupName, options }, + listChildResourcesOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions/{versionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + 201: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.versionName, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions/{versionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.versionName, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions/{versionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.versionName, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions/{versionName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.versionName, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listChildResourcesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationProfileList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.configurationProfileName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + 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..19628d9e6093 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/index.ts @@ -0,0 +1,15 @@ +/* + * 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 "./bestPractices"; +export * from "./bestPracticesVersions"; +export * from "./configurationProfiles"; +export * from "./configurationProfilesVersions"; +export * from "./configurationProfileAssignments"; +export * from "./operations"; +export * from "./reports"; 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..68df98cf485d --- /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.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operations/reports.ts b/sdk/automanage/arm-automanage/src/operations/reports.ts new file mode 100644 index 000000000000..0d70578609fc --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operations/reports.ts @@ -0,0 +1,204 @@ +/* + * 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 { Reports } 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 { + Report, + ReportsListByConfigurationProfileAssignmentsOptionalParams, + ReportsGetOptionalParams, + ReportsGetResponse, + ReportsListByConfigurationProfileAssignmentsResponse +} from "../models"; + +/// +/** Class containing Reports operations. */ +export class ReportsImpl implements Reports { + private readonly client: AutomanageClient; + + /** + * Initialize a new instance of the class Reports class. + * @param client Reference to the service client + */ + constructor(client: AutomanageClient) { + this.client = client; + } + + /** + * Retrieve a list of reports within a given 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. + */ + public listByConfigurationProfileAssignments( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ReportsListByConfigurationProfileAssignmentsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByConfigurationProfileAssignmentsPagingAll( + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByConfigurationProfileAssignmentsPagingPage( + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + ); + } + }; + } + + private async *listByConfigurationProfileAssignmentsPagingPage( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ReportsListByConfigurationProfileAssignmentsOptionalParams + ): AsyncIterableIterator { + let result = await this._listByConfigurationProfileAssignments( + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + ); + yield result.value || []; + } + + private async *listByConfigurationProfileAssignmentsPagingAll( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ReportsListByConfigurationProfileAssignmentsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByConfigurationProfileAssignmentsPagingPage( + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + )) { + yield* page; + } + } + + /** + * Get information about a report associated with a configuration profile assignment run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName The configuration profile assignment name. + * @param reportName The report name. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configurationProfileAssignmentName: string, + reportName: string, + vmName: string, + options?: ReportsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configurationProfileAssignmentName, + reportName, + vmName, + options + }, + getOperationSpec + ); + } + + /** + * Retrieve a list of reports within a given 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. + */ + private _listByConfigurationProfileAssignments( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ReportsListByConfigurationProfileAssignmentsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + configurationProfileAssignmentName, + vmName, + options + }, + listByConfigurationProfileAssignmentsOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports/{reportName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Report + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName, + Parameters.reportName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByConfigurationProfileAssignmentsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configurationProfileAssignmentName, + Parameters.vmName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPractices.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPractices.ts new file mode 100644 index 000000000000..6155a4a70e5a --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPractices.ts @@ -0,0 +1,36 @@ +/* + * 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 { + BestPractice, + BestPracticesListByTenantOptionalParams, + BestPracticesGetOptionalParams, + BestPracticesGetResponse +} from "../models"; + +/// +/** Interface representing a BestPractices. */ +export interface BestPractices { + /** + * Retrieve a list of Automanage best practices + * @param options The options parameters. + */ + listByTenant( + options?: BestPracticesListByTenantOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get information about a Automanage best practice + * @param bestPracticeName The Automanage best practice name. + * @param options The options parameters. + */ + get( + bestPracticeName: string, + options?: BestPracticesGetOptionalParams + ): Promise; +} diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPracticesVersions.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPracticesVersions.ts new file mode 100644 index 000000000000..6c7f41fea45e --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/bestPracticesVersions.ts @@ -0,0 +1,40 @@ +/* + * 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 { + BestPractice, + BestPracticesVersionsListByTenantOptionalParams, + BestPracticesVersionsGetOptionalParams, + BestPracticesVersionsGetResponse +} from "../models"; + +/// +/** Interface representing a BestPracticesVersions. */ +export interface BestPracticesVersions { + /** + * Retrieve a list of Automanage best practices versions + * @param bestPracticeName The Automanage best practice name. + * @param options The options parameters. + */ + listByTenant( + bestPracticeName: string, + options?: BestPracticesVersionsListByTenantOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get information about a Automanage best practice version + * @param bestPracticeName The Automanage best practice name. + * @param versionName The Automanage best practice version name. + * @param options The options parameters. + */ + get( + bestPracticeName: string, + versionName: string, + options?: BestPracticesVersionsGetOptionalParams + ): 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..704db229b0aa --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfileAssignments.ts @@ -0,0 +1,82 @@ +/* + * 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 { + 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. + */ + createOrUpdate( + 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/configurationProfiles.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfiles.ts new file mode 100644 index 000000000000..c6fb5742c0a7 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfiles.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 { + ConfigurationProfile, + ConfigurationProfilesListByResourceGroupOptionalParams, + ConfigurationProfilesListBySubscriptionOptionalParams, + ConfigurationProfilesCreateOrUpdateOptionalParams, + ConfigurationProfilesCreateOrUpdateResponse, + ConfigurationProfilesGetOptionalParams, + ConfigurationProfilesGetResponse, + ConfigurationProfilesDeleteOptionalParams, + ConfigurationProfileUpdate, + ConfigurationProfilesUpdateOptionalParams, + ConfigurationProfilesUpdateResponse +} from "../models"; + +/// +/** Interface representing a ConfigurationProfiles. */ +export interface ConfigurationProfiles { + /** + * Retrieve a list of configuration profile 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?: ConfigurationProfilesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieve a list of configuration profile within a subscription + * @param options The options parameters. + */ + listBySubscription( + options?: ConfigurationProfilesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfileName: string, + resourceGroupName: string, + parameters: ConfigurationProfile, + options?: ConfigurationProfilesCreateOrUpdateOptionalParams + ): Promise; + /** + * Get information about a configuration profile + * @param configurationProfileName The configuration profile name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesGetOptionalParams + ): Promise; + /** + * Delete a configuration profile + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileName Name of the configuration profile + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileName: string, + options?: ConfigurationProfilesDeleteOptionalParams + ): Promise; + /** + * Updates a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update configuration profile. + * @param options The options parameters. + */ + update( + configurationProfileName: string, + resourceGroupName: string, + parameters: ConfigurationProfileUpdate, + options?: ConfigurationProfilesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilesVersions.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilesVersions.ts new file mode 100644 index 000000000000..7ce48aa3a13a --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/configurationProfilesVersions.ts @@ -0,0 +1,93 @@ +/* + * 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 { + ConfigurationProfile, + ConfigurationProfilesVersionsListChildResourcesOptionalParams, + ConfigurationProfilesVersionsCreateOrUpdateOptionalParams, + ConfigurationProfilesVersionsCreateOrUpdateResponse, + ConfigurationProfilesVersionsGetOptionalParams, + ConfigurationProfilesVersionsGetResponse, + ConfigurationProfilesVersionsDeleteOptionalParams, + ConfigurationProfileUpdate, + ConfigurationProfilesVersionsUpdateOptionalParams, + ConfigurationProfilesVersionsUpdateResponse +} from "../models"; + +/// +/** Interface representing a ConfigurationProfilesVersions. */ +export interface ConfigurationProfilesVersions { + /** + * Retrieve a list of configuration profile version for a configuration profile + * @param configurationProfileName Name of the configuration profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listChildResources( + configurationProfileName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsListChildResourcesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a configuration profile version + * @param configurationProfileName Name of the configuration profile. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to create or update configuration profile. + * @param options The options parameters. + */ + createOrUpdate( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + parameters: ConfigurationProfile, + options?: ConfigurationProfilesVersionsCreateOrUpdateOptionalParams + ): Promise; + /** + * Get information about a configuration profile version + * @param configurationProfileName The configuration profile name. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + options?: ConfigurationProfilesVersionsGetOptionalParams + ): Promise; + /** + * Delete a configuration profile version + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileName Name of the configuration profile + * @param versionName The configuration profile version name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + configurationProfileName: string, + versionName: string, + options?: ConfigurationProfilesVersionsDeleteOptionalParams + ): Promise; + /** + * Updates a configuration profile version + * @param configurationProfileName Name of the configuration profile. + * @param versionName The configuration profile version name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters supplied to update configuration profile. + * @param options The options parameters. + */ + update( + configurationProfileName: string, + versionName: string, + resourceGroupName: string, + parameters: ConfigurationProfileUpdate, + options?: ConfigurationProfilesVersionsUpdateOptionalParams + ): 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..19628d9e6093 --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/index.ts @@ -0,0 +1,15 @@ +/* + * 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 "./bestPractices"; +export * from "./bestPracticesVersions"; +export * from "./configurationProfiles"; +export * from "./configurationProfilesVersions"; +export * from "./configurationProfileAssignments"; +export * from "./operations"; +export * from "./reports"; 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/src/operationsInterfaces/reports.ts b/sdk/automanage/arm-automanage/src/operationsInterfaces/reports.ts new file mode 100644 index 000000000000..bf9bfee9f56c --- /dev/null +++ b/sdk/automanage/arm-automanage/src/operationsInterfaces/reports.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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Report, + ReportsListByConfigurationProfileAssignmentsOptionalParams, + ReportsGetOptionalParams, + ReportsGetResponse +} from "../models"; + +/// +/** Interface representing a Reports. */ +export interface Reports { + /** + * Retrieve a list of reports within a given 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. + */ + listByConfigurationProfileAssignments( + resourceGroupName: string, + configurationProfileAssignmentName: string, + vmName: string, + options?: ReportsListByConfigurationProfileAssignmentsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get information about a report associated with a configuration profile assignment run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationProfileAssignmentName The configuration profile assignment name. + * @param reportName The report name. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configurationProfileAssignmentName: string, + reportName: string, + vmName: string, + options?: ReportsGetOptionalParams + ): Promise; +} 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..3e6ae96443f3 --- /dev/null +++ b/sdk/automanage/arm-automanage/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/automanage/ci.yml b/sdk/automanage/ci.yml new file mode 100644 index 000000000000..15bf087ff9e0 --- /dev/null +++ b/sdk/automanage/ci.yml @@ -0,0 +1,30 @@ +# 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