fleet release (#26082)
https://github.com/Azure/sdk-release-request/issues/4171 Recording: https://github.com/Azure/azure-sdk-assets/tree/js/containerservice/arm-containerservicefleet_d8ca3d9234
This commit is contained in:
Родитель
a23a03eb54
Коммит
7754451445
|
@ -62,6 +62,7 @@ specifiers:
|
|||
'@rush-temp/arm-containerregistry': file:./projects/arm-containerregistry.tgz
|
||||
'@rush-temp/arm-containerservice': file:./projects/arm-containerservice.tgz
|
||||
'@rush-temp/arm-containerservice-1': file:./projects/arm-containerservice-1.tgz
|
||||
'@rush-temp/arm-containerservicefleet': file:./projects/arm-containerservicefleet.tgz
|
||||
'@rush-temp/arm-cosmosdb': file:./projects/arm-cosmosdb.tgz
|
||||
'@rush-temp/arm-costmanagement': file:./projects/arm-costmanagement.tgz
|
||||
'@rush-temp/arm-customerinsights': file:./projects/arm-customerinsights.tgz
|
||||
|
@ -408,6 +409,7 @@ dependencies:
|
|||
'@rush-temp/arm-containerregistry': file:projects/arm-containerregistry.tgz
|
||||
'@rush-temp/arm-containerservice': file:projects/arm-containerservice.tgz
|
||||
'@rush-temp/arm-containerservice-1': file:projects/arm-containerservice-1.tgz
|
||||
'@rush-temp/arm-containerservicefleet': file:projects/arm-containerservicefleet.tgz
|
||||
'@rush-temp/arm-cosmosdb': file:projects/arm-cosmosdb.tgz
|
||||
'@rush-temp/arm-costmanagement': file:projects/arm-costmanagement.tgz
|
||||
'@rush-temp/arm-customerinsights': file:projects/arm-customerinsights.tgz
|
||||
|
@ -2632,7 +2634,7 @@ packages:
|
|||
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
|
||||
dependencies:
|
||||
'@types/connect': 3.4.35
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/chai-as-promised/7.1.5:
|
||||
|
@ -2654,7 +2656,7 @@ packages:
|
|||
/@types/connect/3.4.35:
|
||||
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/cookie/0.4.1:
|
||||
|
@ -2664,7 +2666,7 @@ packages:
|
|||
/@types/cors/2.8.13:
|
||||
resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/debug/4.1.8:
|
||||
|
@ -2676,7 +2678,7 @@ packages:
|
|||
/@types/decompress/4.2.4:
|
||||
resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/eslint/8.4.10:
|
||||
|
@ -2697,7 +2699,7 @@ packages:
|
|||
/@types/express-serve-static-core/4.17.35:
|
||||
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
'@types/qs': 6.9.7
|
||||
'@types/range-parser': 1.2.4
|
||||
'@types/send': 0.17.1
|
||||
|
@ -2715,13 +2717,13 @@ packages:
|
|||
/@types/fs-extra/8.1.2:
|
||||
resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/fs-extra/9.0.13:
|
||||
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/inquirer/8.2.6:
|
||||
|
@ -2734,7 +2736,7 @@ packages:
|
|||
/@types/is-buffer/2.0.0:
|
||||
resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/json-schema/7.0.12:
|
||||
|
@ -2748,13 +2750,13 @@ packages:
|
|||
/@types/jsonwebtoken/9.0.2:
|
||||
resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/jws/3.2.5:
|
||||
resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/linkify-it/3.0.2:
|
||||
|
@ -2813,20 +2815,20 @@ packages:
|
|||
/@types/mysql/2.15.19:
|
||||
resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/node-fetch/2.6.2:
|
||||
resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
form-data: 3.0.1
|
||||
dev: false
|
||||
|
||||
/@types/node-fetch/2.6.4:
|
||||
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
form-data: 3.0.1
|
||||
dev: false
|
||||
|
||||
|
@ -2859,7 +2861,7 @@ packages:
|
|||
/@types/pg/8.6.1:
|
||||
resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
pg-protocol: 1.6.0
|
||||
pg-types: 2.2.0
|
||||
dev: false
|
||||
|
@ -2887,7 +2889,7 @@ packages:
|
|||
/@types/resolve/1.17.1:
|
||||
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/semaphore/1.1.1:
|
||||
|
@ -2906,14 +2908,14 @@ packages:
|
|||
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
|
||||
dependencies:
|
||||
'@types/mime': 1.3.2
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/serve-static/1.15.1:
|
||||
resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==}
|
||||
dependencies:
|
||||
'@types/mime': 3.0.1
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/shimmer/1.0.2:
|
||||
|
@ -2939,13 +2941,13 @@ packages:
|
|||
/@types/stoppable/1.1.1:
|
||||
resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/through/0.0.30:
|
||||
resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/tough-cookie/4.0.2:
|
||||
|
@ -2959,7 +2961,7 @@ packages:
|
|||
/@types/tunnel/0.0.3:
|
||||
resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/underscore/1.11.5:
|
||||
|
@ -2977,19 +2979,19 @@ packages:
|
|||
/@types/ws/7.4.7:
|
||||
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/ws/8.5.5:
|
||||
resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/xml2js/0.4.11:
|
||||
resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==}
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
|
||||
/@types/yargs-parser/21.0.0:
|
||||
|
@ -3006,7 +3008,7 @@ packages:
|
|||
resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
|
@ -4248,7 +4250,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:
|
||||
|
@ -4426,7 +4428,7 @@ packages:
|
|||
cosmiconfig: 7.1.0
|
||||
debug: 4.3.4
|
||||
deps-regex: 0.1.4
|
||||
ignore: 5.1.9
|
||||
ignore: 5.2.4
|
||||
is-core-module: 2.12.1
|
||||
js-yaml: 3.14.1
|
||||
json5: 2.2.3
|
||||
|
@ -4458,7 +4460,7 @@ packages:
|
|||
'@pnpm/crypto.base32-hash': 1.0.1
|
||||
'@pnpm/types': 8.9.0
|
||||
encode-registry: 3.0.0
|
||||
semver: 7.3.8
|
||||
semver: 7.5.2
|
||||
dev: false
|
||||
|
||||
/deps-regex/0.1.4:
|
||||
|
@ -4629,7 +4631,7 @@ packages:
|
|||
dependencies:
|
||||
'@types/cookie': 0.4.1
|
||||
'@types/cors': 2.8.13
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
accepts: 1.3.8
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.2
|
||||
|
@ -5612,7 +5614,7 @@ packages:
|
|||
fs.realpath: 1.0.0
|
||||
inflight: 1.0.6
|
||||
inherits: 2.0.4
|
||||
minimatch: 3.0.4
|
||||
minimatch: 3.1.2
|
||||
once: 1.4.0
|
||||
path-is-absolute: 1.0.1
|
||||
dev: false
|
||||
|
@ -6021,7 +6023,7 @@ packages:
|
|||
cli-cursor: 3.1.0
|
||||
cli-width: 3.0.0
|
||||
external-editor: 3.1.0
|
||||
figures: 3.0.0
|
||||
figures: 3.2.0
|
||||
lodash: 4.17.21
|
||||
mute-stream: 0.0.8
|
||||
run-async: 2.4.1
|
||||
|
@ -8483,7 +8485,7 @@ packages:
|
|||
'@protobufjs/path': 1.1.2
|
||||
'@protobufjs/pool': 1.1.0
|
||||
'@protobufjs/utf8': 1.1.0
|
||||
'@types/node': 14.18.51
|
||||
'@types/node': 16.18.36
|
||||
long: 5.2.3
|
||||
dev: false
|
||||
|
||||
|
@ -12574,6 +12576,34 @@ packages:
|
|||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
file:projects/arm-containerservicefleet.tgz:
|
||||
resolution: {integrity: sha512-iQXfuIOmJvD4ZzwbFq6byWC91//vIB8ecVWei80DzVDvzaLYj/N+4apJcF5Ppm5+1ShE6mf98GrUJ3UcSVT+vg==, tarball: file:projects/arm-containerservicefleet.tgz}
|
||||
name: '@rush-temp/arm-containerservicefleet'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure/identity': 2.1.0
|
||||
'@microsoft/api-extractor': 7.35.4_@types+node@14.18.51
|
||||
'@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1
|
||||
'@rollup/plugin-json': 6.0.0_rollup@2.79.1
|
||||
'@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1
|
||||
'@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1
|
||||
'@types/chai': 4.3.5
|
||||
'@types/node': 14.18.51
|
||||
chai: 4.3.7
|
||||
cross-env: 7.0.3
|
||||
dotenv: 16.3.1
|
||||
mkdirp: 2.1.6
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.79.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_ljfryqei6aq3wnzlbhhwgmxvcu
|
||||
tslib: 2.5.3
|
||||
typescript: 5.0.4
|
||||
uglify-js: 3.17.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-cosmosdb.tgz:
|
||||
resolution: {integrity: sha512-u6HJglqV3zqeClSFTmiqJItLo3bYPNxe6BKlx/e2UKxRdIdJCsJyuyakXAUIPHSaZvwUYsEdZ1+APVkFkoPTuA==, tarball: file:projects/arm-cosmosdb.tgz}
|
||||
name: '@rush-temp/arm-cosmosdb'
|
||||
|
@ -17128,7 +17158,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/communication-call-automation.tgz:
|
||||
resolution: {integrity: sha512-VD8/xJ8qDjSBZ3htdyTZqINjSvcFCsYNKGH3BqlXWRatiTFz4pVLg0UrV/obOxHrb7cuXUeofu/lee3nVv0UUw==, tarball: file:projects/communication-call-automation.tgz}
|
||||
resolution: {integrity: sha512-vqoOQKwPc05FTHfiXBdWLvJ/9ZHsb7W3QCyGYinX/zi/SBSiIMH2oBIwIgFEPFVb0oA4zYa76Je8yHxpbQaItw==, tarball: file:projects/communication-call-automation.tgz}
|
||||
name: '@rush-temp/communication-call-automation'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -21045,7 +21075,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/storage-file-share.tgz:
|
||||
resolution: {integrity: sha512-f0RGxZzt5s5rF+1pBkZleSk7bOLQawxz/qvsF4L105R3AjRInegaSSfWfSSf2qk4KLN4poZu3iGkiw7nbKPSnQ==, tarball: file:projects/storage-file-share.tgz}
|
||||
resolution: {integrity: sha512-RpThRihEhcpL4GBB9uvgjdYuHrsgy5h+I3kAfC3w5PKwJrFdwRHD/T6jj9lFU4XJMY7qWpXB9VTHZwYzBk5iDg==, tarball: file:projects/storage-file-share.tgz}
|
||||
name: '@rush-temp/storage-file-share'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -21143,7 +21173,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/storage-queue.tgz:
|
||||
resolution: {integrity: sha512-ax+3a9dUOOQQ5rDPec7HZ10/YxuUB2EAwf1i+9gZG+C9jsHyysWutCzgp1Bl8cXbm+7jpqshgoBCdmmeOTZNBg==, tarball: file:projects/storage-queue.tgz}
|
||||
resolution: {integrity: sha512-H8QFHf0DkTt/re1Sc3mDiJP3R6W92bVP09NBK4BRdP3Q+S2lK5LTw554YUx2F5jYNpZiIVEoBWPr/+DVQIUoDg==, tarball: file:projects/storage-queue.tgz}
|
||||
name: '@rush-temp/storage-queue'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
|
|
@ -19,3 +19,4 @@ https://docs.microsoft.com/javascript/api/@azure/arm-baremetalinfrastructure
|
|||
https://docs.microsoft.com/javascript/api/@azure/arm-baremetalinfrastructure?view=azure-node-preview
|
||||
https://docs.microsoft.com/javascript/api/@azure/arm-qumulo
|
||||
https://docs.microsoft.com/javascript/api/@azure/arm-qumulo?view=azure-node-preview
|
||||
https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* This is the main configuration file for Rush.
|
||||
* For full documentation, please see https://rushjs.io
|
||||
*/ {
|
||||
*/{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
|
||||
/**
|
||||
* (Required) This specifies the version of the Rush engine to be used in this repo.
|
||||
|
@ -2012,6 +2012,11 @@
|
|||
"packageName": "@azure/arm-qumulo",
|
||||
"projectFolder": "sdk/liftrqumulo/arm-qumulo",
|
||||
"versionPolicyName": "management"
|
||||
},
|
||||
{
|
||||
"packageName": "@azure/arm-containerservicefleet",
|
||||
"projectFolder": "sdk/containerservice/arm-containerservicefleet",
|
||||
"versionPolicyName": "management"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.0-beta.1 (2023-06-01)
|
||||
|
||||
The package of @azure/arm-containerservicefleet is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 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.
|
|
@ -0,0 +1,109 @@
|
|||
# Azure ContainerServiceFleet client library for JavaScript
|
||||
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerServiceFleet client.
|
||||
|
||||
Azure Kubernetes Fleet Manager api client.
|
||||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerservicefleet) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?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://github.com/nodejs/release#release-schedule)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
||||
### Install the `@azure/arm-containerservicefleet` package
|
||||
|
||||
Install the Azure ContainerServiceFleet client library for JavaScript with `npm`:
|
||||
|
||||
```bash
|
||||
npm install @azure/arm-containerservicefleet
|
||||
```
|
||||
|
||||
### Create and authenticate a `ContainerServiceFleetClient`
|
||||
|
||||
To create a client object to access the Azure ContainerServiceFleet API, you will need the `endpoint` of your Azure ContainerServiceFleet resource and a `credential`. The Azure ContainerServiceFleet client can use Azure Active Directory credentials to authenticate.
|
||||
You can find the endpoint for your Azure ContainerServiceFleet 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 ContainerServiceFleet** 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 { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new ContainerServiceFleetClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new ContainerServiceFleetClient(credential, 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
|
||||
|
||||
### ContainerServiceFleetClient
|
||||
|
||||
`ContainerServiceFleetClient` is the primary interface for developers using the Azure ContainerServiceFleet client library. Explore the methods on this client object to understand the different features of the Azure ContainerServiceFleet 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%2Fcontainerservice%2Farm-containerservicefleet%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
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"commit": "0724e72994ed3c77f76ed0bfa2df3b1f0c33a41b",
|
||||
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md",
|
||||
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\fleet\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
|
||||
"use": "@autorest/typescript@6.0.2"
|
||||
}
|
|
@ -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-containerservicefleet.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"ae-unresolved-link": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "js",
|
||||
"TagPrefix": "js/containerservice/arm-containerservicefleet",
|
||||
"Tag": "js/containerservice/arm-containerservicefleet_d8ca3d9234"
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"name": "@azure/arm-containerservicefleet",
|
||||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for ContainerServiceFleetClient.",
|
||||
"version": "1.0.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-lro": "^2.5.3",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.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-containerservicefleet.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.31.1",
|
||||
"@rollup/plugin-commonjs": "^24.0.0",
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-multi-entry": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^2.1.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~5.0.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"@azure/identity": "^2.0.1",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"@azure-tools/test-credential": "^1.0.0",
|
||||
"mocha": "^7.1.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"@types/node": "^14.0.0",
|
||||
"@azure/dev-tool": "^1.0.0"
|
||||
},
|
||||
"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": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
||||
"integration-test:browser": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/containerServiceFleetClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autoPublish": true,
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet",
|
||||
"//sampleConfiguration": {
|
||||
"productName": "",
|
||||
"productSlugs": [
|
||||
"azure"
|
||||
],
|
||||
"disableDocsMs": true,
|
||||
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,623 @@
|
|||
## API Report File for "@azure/arm-containerservicefleet"
|
||||
|
||||
> 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 { OperationState } from '@azure/core-lro';
|
||||
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
||||
import { SimplePollerLike } from '@azure/core-lro';
|
||||
|
||||
// @public
|
||||
export type ActionType = string;
|
||||
|
||||
// @public (undocumented)
|
||||
export class ContainerServiceFleetClient extends coreClient.ServiceClient {
|
||||
// (undocumented)
|
||||
$host: string;
|
||||
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ContainerServiceFleetClientOptionalParams);
|
||||
// (undocumented)
|
||||
apiVersion: string;
|
||||
// (undocumented)
|
||||
fleetMembers: FleetMembers;
|
||||
// (undocumented)
|
||||
fleets: Fleets;
|
||||
// (undocumented)
|
||||
operations: Operations;
|
||||
// (undocumented)
|
||||
subscriptionId: string;
|
||||
// (undocumented)
|
||||
updateRuns: UpdateRuns;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ContainerServiceFleetClientOptionalParams extends coreClient.ServiceClientOptions {
|
||||
$host?: string;
|
||||
apiVersion?: string;
|
||||
endpoint?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type CreatedByType = string;
|
||||
|
||||
// @public
|
||||
export interface ErrorAdditionalInfo {
|
||||
readonly info?: Record<string, unknown>;
|
||||
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 interface Fleet extends TrackedResource {
|
||||
readonly eTag?: string;
|
||||
hubProfile?: FleetHubProfile;
|
||||
readonly provisioningState?: FleetProvisioningState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetCredentialResult {
|
||||
readonly name?: string;
|
||||
readonly value?: Uint8Array;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetCredentialResults {
|
||||
readonly kubeconfigs?: FleetCredentialResult[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetHubProfile {
|
||||
dnsPrefix?: string;
|
||||
readonly fqdn?: string;
|
||||
readonly kubernetesVersion?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetListResult {
|
||||
nextLink?: string;
|
||||
value: Fleet[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMember extends ProxyResource {
|
||||
clusterResourceId?: string;
|
||||
readonly eTag?: string;
|
||||
group?: string;
|
||||
readonly provisioningState?: FleetMemberProvisioningState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMemberListResult {
|
||||
nextLink?: string;
|
||||
value: FleetMember[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMemberProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface FleetMembers {
|
||||
beginCreate(resourceGroupName: string, fleetName: string, fleetMemberName: string, resource: FleetMember, options?: FleetMembersCreateOptionalParams): Promise<SimplePollerLike<OperationState<FleetMembersCreateResponse>, FleetMembersCreateResponse>>;
|
||||
beginCreateAndWait(resourceGroupName: string, fleetName: string, fleetMemberName: string, resource: FleetMember, options?: FleetMembersCreateOptionalParams): Promise<FleetMembersCreateResponse>;
|
||||
beginDelete(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersDeleteOptionalParams): Promise<void>;
|
||||
get(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersGetOptionalParams): Promise<FleetMembersGetResponse>;
|
||||
listByFleet(resourceGroupName: string, fleetName: string, options?: FleetMembersListByFleetOptionalParams): PagedAsyncIterableIterator<FleetMember>;
|
||||
update(resourceGroupName: string, fleetName: string, fleetMemberName: string, properties: FleetMemberUpdate, options?: FleetMembersUpdateOptionalParams): Promise<FleetMembersUpdateResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMembersCreateHeaders {
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMembersCreateOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
ifNoneMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMembersCreateResponse = FleetMember;
|
||||
|
||||
// @public
|
||||
export interface FleetMembersDeleteHeaders {
|
||||
location?: string;
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMembersDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetMembersGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMembersGetResponse = FleetMember;
|
||||
|
||||
// @public
|
||||
export interface FleetMembersListByFleetNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMembersListByFleetNextResponse = FleetMemberListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetMembersListByFleetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMembersListByFleetResponse = FleetMemberListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetMembersUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetMembersUpdateResponse = FleetMember;
|
||||
|
||||
// @public
|
||||
export interface FleetMemberUpdate {
|
||||
group?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetPatch {
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface Fleets {
|
||||
beginCreateOrUpdate(resourceGroupName: string, fleetName: string, resource: Fleet, options?: FleetsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<FleetsCreateOrUpdateResponse>, FleetsCreateOrUpdateResponse>>;
|
||||
beginCreateOrUpdateAndWait(resourceGroupName: string, fleetName: string, resource: Fleet, options?: FleetsCreateOrUpdateOptionalParams): Promise<FleetsCreateOrUpdateResponse>;
|
||||
beginDelete(resourceGroupName: string, fleetName: string, options?: FleetsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, fleetName: string, options?: FleetsDeleteOptionalParams): Promise<void>;
|
||||
get(resourceGroupName: string, fleetName: string, options?: FleetsGetOptionalParams): Promise<FleetsGetResponse>;
|
||||
listByResourceGroup(resourceGroupName: string, options?: FleetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Fleet>;
|
||||
listBySubscription(options?: FleetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<Fleet>;
|
||||
listCredentials(resourceGroupName: string, fleetName: string, options?: FleetsListCredentialsOptionalParams): Promise<FleetsListCredentialsResponse>;
|
||||
update(resourceGroupName: string, fleetName: string, properties: FleetPatch, options?: FleetsUpdateOptionalParams): Promise<FleetsUpdateResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetsCreateOrUpdateHeaders {
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
ifNoneMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsCreateOrUpdateResponse = Fleet;
|
||||
|
||||
// @public
|
||||
export interface FleetsDeleteHeaders {
|
||||
location?: string;
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FleetsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsGetResponse = Fleet;
|
||||
|
||||
// @public
|
||||
export interface FleetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsListByResourceGroupNextResponse = FleetListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsListByResourceGroupResponse = FleetListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsListBySubscriptionNextResponse = FleetListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsListBySubscriptionResponse = FleetListResult;
|
||||
|
||||
// @public
|
||||
export interface FleetsListCredentialsOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsListCredentialsResponse = FleetCredentialResults;
|
||||
|
||||
// @public
|
||||
export interface FleetsUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FleetsUpdateResponse = Fleet;
|
||||
|
||||
// @public
|
||||
export function getContinuationToken(page: unknown): string | undefined;
|
||||
|
||||
// @public
|
||||
export enum KnownActionType {
|
||||
Internal = "Internal"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownCreatedByType {
|
||||
Application = "Application",
|
||||
Key = "Key",
|
||||
ManagedIdentity = "ManagedIdentity",
|
||||
User = "User"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownFleetMemberProvisioningState {
|
||||
Canceled = "Canceled",
|
||||
Failed = "Failed",
|
||||
Joining = "Joining",
|
||||
Leaving = "Leaving",
|
||||
Succeeded = "Succeeded",
|
||||
Updating = "Updating"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownFleetProvisioningState {
|
||||
Canceled = "Canceled",
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded",
|
||||
Updating = "Updating"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownManagedClusterUpgradeType {
|
||||
Full = "Full",
|
||||
NodeImageOnly = "NodeImageOnly"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownOrigin {
|
||||
System = "system",
|
||||
User = "user",
|
||||
UserSystem = "user,system"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownUpdateRunProvisioningState {
|
||||
Canceled = "Canceled",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownUpdateState {
|
||||
Completed = "Completed",
|
||||
Failed = "Failed",
|
||||
NotStarted = "NotStarted",
|
||||
Running = "Running",
|
||||
Stopped = "Stopped",
|
||||
Stopping = "Stopping"
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ManagedClusterUpdate {
|
||||
upgrade: ManagedClusterUpgradeSpec;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ManagedClusterUpgradeSpec {
|
||||
kubernetesVersion?: string;
|
||||
type: ManagedClusterUpgradeType;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ManagedClusterUpgradeType = string;
|
||||
|
||||
// @public
|
||||
export interface MemberUpdateStatus {
|
||||
readonly clusterResourceId?: string;
|
||||
readonly name?: string;
|
||||
readonly operationId?: string;
|
||||
readonly status?: UpdateStatus;
|
||||
}
|
||||
|
||||
// @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<Operation>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type OperationsListNextResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export interface OperationsListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type OperationsListResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export type Origin = string;
|
||||
|
||||
// @public
|
||||
export interface ProxyResource extends Resource {
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Resource {
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
readonly systemData?: SystemData;
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SystemData {
|
||||
createdAt?: Date;
|
||||
createdBy?: string;
|
||||
createdByType?: CreatedByType;
|
||||
lastModifiedAt?: Date;
|
||||
lastModifiedBy?: string;
|
||||
lastModifiedByType?: CreatedByType;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface TrackedResource extends Resource {
|
||||
location: string;
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateGroup {
|
||||
name: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateGroupStatus {
|
||||
readonly members?: MemberUpdateStatus[];
|
||||
readonly name?: string;
|
||||
readonly status?: UpdateStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRun extends ProxyResource {
|
||||
readonly eTag?: string;
|
||||
managedClusterUpdate?: ManagedClusterUpdate;
|
||||
readonly provisioningState?: UpdateRunProvisioningState;
|
||||
readonly status?: UpdateRunStatus;
|
||||
strategy?: UpdateRunStrategy;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunListResult {
|
||||
nextLink?: string;
|
||||
value: UpdateRun[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface UpdateRuns {
|
||||
beginCreateOrUpdate(resourceGroupName: string, fleetName: string, updateRunName: string, resource: UpdateRun, options?: UpdateRunsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<UpdateRunsCreateOrUpdateResponse>, UpdateRunsCreateOrUpdateResponse>>;
|
||||
beginCreateOrUpdateAndWait(resourceGroupName: string, fleetName: string, updateRunName: string, resource: UpdateRun, options?: UpdateRunsCreateOrUpdateOptionalParams): Promise<UpdateRunsCreateOrUpdateResponse>;
|
||||
beginDelete(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsDeleteOptionalParams): Promise<void>;
|
||||
beginStart(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsStartOptionalParams): Promise<SimplePollerLike<OperationState<UpdateRunsStartResponse>, UpdateRunsStartResponse>>;
|
||||
beginStartAndWait(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsStartOptionalParams): Promise<UpdateRunsStartResponse>;
|
||||
beginStop(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsStopOptionalParams): Promise<SimplePollerLike<OperationState<UpdateRunsStopResponse>, UpdateRunsStopResponse>>;
|
||||
beginStopAndWait(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsStopOptionalParams): Promise<UpdateRunsStopResponse>;
|
||||
get(resourceGroupName: string, fleetName: string, updateRunName: string, options?: UpdateRunsGetOptionalParams): Promise<UpdateRunsGetResponse>;
|
||||
listByFleet(resourceGroupName: string, fleetName: string, options?: UpdateRunsListByFleetOptionalParams): PagedAsyncIterableIterator<UpdateRun>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsCreateOrUpdateHeaders {
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
ifNoneMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsCreateOrUpdateResponse = UpdateRun;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsDeleteHeaders {
|
||||
location?: string;
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsGetResponse = UpdateRun;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsListByFleetNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsListByFleetNextResponse = UpdateRunListResult;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsListByFleetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsListByFleetResponse = UpdateRunListResult;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsStartHeaders {
|
||||
location?: string;
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsStartOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsStartResponse = UpdateRun;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsStopHeaders {
|
||||
location?: string;
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunsStopOptionalParams extends coreClient.OperationOptions {
|
||||
ifMatch?: string;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateRunsStopResponse = UpdateRun;
|
||||
|
||||
// @public
|
||||
export interface UpdateRunStatus {
|
||||
readonly stages?: UpdateStageStatus[];
|
||||
readonly status?: UpdateStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateRunStrategy {
|
||||
stages: UpdateStage[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateStage {
|
||||
afterStageWaitInSeconds?: number;
|
||||
groups?: UpdateGroup[];
|
||||
name: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UpdateStageStatus {
|
||||
readonly afterStageWaitStatus?: WaitStatus;
|
||||
readonly groups?: UpdateGroupStatus[];
|
||||
readonly name?: string;
|
||||
readonly status?: UpdateStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UpdateState = string;
|
||||
|
||||
// @public
|
||||
export interface UpdateStatus {
|
||||
readonly completedTime?: Date;
|
||||
readonly error?: ErrorDetail;
|
||||
readonly startTime?: Date;
|
||||
readonly state?: UpdateState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WaitStatus {
|
||||
readonly status?: UpdateStatus;
|
||||
readonly waitDurationInSeconds?: number;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* 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";
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
(warning.id.includes("node_modules/nise") ||
|
||||
warning.id.includes("node_modules/sinon")) === true
|
||||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* 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(),
|
||||
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()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
||||
if (!options.disableBrowserBundle) {
|
||||
config.push(makeBrowserTestConfig());
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
export default makeConfig(require("./package.json"));
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetMember,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a FleetMember
|
||||
*
|
||||
* @summary Create a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json
|
||||
*/
|
||||
async function createsAFleetMemberResourceWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const resource: FleetMember = {
|
||||
clusterResourceId:
|
||||
"/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetMemberResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a FleetMember
|
||||
*
|
||||
* @summary Delete a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json
|
||||
*/
|
||||
async function deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a FleetMember
|
||||
*
|
||||
* @summary Get a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json
|
||||
*/
|
||||
async function getsAFleetMemberResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.get(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetMemberResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List FleetMember resources by Fleet
|
||||
*
|
||||
* @summary List FleetMember resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json
|
||||
*/
|
||||
async function listsTheMembersOfAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleetMembers.listByFleet(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheMembersOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetMemberUpdate,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a FleetMember
|
||||
*
|
||||
* @summary Update a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json
|
||||
*/
|
||||
async function updatesAFleetMemberResourceSynchronously() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const properties: FleetMemberUpdate = { group: "staging" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.update(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
properties
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updatesAFleetMemberResourceSynchronously();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
Fleet,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a Fleet.
|
||||
*
|
||||
* @summary Creates or updates a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json
|
||||
*/
|
||||
async function createsAFleetResourceWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const resource: Fleet = {
|
||||
hubProfile: { dnsPrefix: "dnsprefix1" },
|
||||
location: "East US",
|
||||
tags: { archv2: "", tier: "production" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Fleet
|
||||
*
|
||||
* @summary Delete a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json
|
||||
*/
|
||||
async function deletesAFleetResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a Fleet.
|
||||
*
|
||||
* @summary Gets a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json
|
||||
*/
|
||||
async function getsAFleetResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.get(resourceGroupName, fleetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription and resource group.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription and resource group.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInAResourceGroup();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInASubscription() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInASubscription();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists the user credentials of a Fleet.
|
||||
*
|
||||
* @summary Lists the user credentials of a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json
|
||||
*/
|
||||
async function listsTheUserCredentialsOfAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.listCredentials(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUserCredentialsOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetPatch,
|
||||
FleetsUpdateOptionalParams,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Fleet
|
||||
*
|
||||
* @summary Update a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json
|
||||
*/
|
||||
async function updateAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const ifMatch = "dfjkwelr7384";
|
||||
const fleetName = "fleet1";
|
||||
const properties: FleetPatch = { tags: { env: "prod", tier: "secure" } };
|
||||
const options: FleetsUpdateOptionalParams = { ifMatch };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.update(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
properties,
|
||||
options
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updateAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the operations for the provider
|
||||
*
|
||||
* @summary List the operations for the provider
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function listTheOperationsForTheProvider() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listTheOperationsForTheProvider();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
UpdateRun,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a UpdateRun
|
||||
*
|
||||
* @summary Create a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json
|
||||
*/
|
||||
async function createAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const resource: UpdateRun = {
|
||||
managedClusterUpdate: {
|
||||
upgrade: { type: "Full", kubernetesVersion: "1.26.1" }
|
||||
},
|
||||
strategy: {
|
||||
stages: [
|
||||
{
|
||||
name: "stage1",
|
||||
afterStageWaitInSeconds: 3600,
|
||||
groups: [{ name: "group-a" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a UpdateRun
|
||||
*
|
||||
* @summary Delete a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json
|
||||
*/
|
||||
async function deleteAnUpdateRunResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a UpdateRun
|
||||
*
|
||||
* @summary Get a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json
|
||||
*/
|
||||
async function getsAnUpdateRunResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.get(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List UpdateRun resources by Fleet
|
||||
*
|
||||
* @summary List UpdateRun resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json
|
||||
*/
|
||||
async function listsTheUpdateRunResourcesByFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.updateRuns.listByFleet(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUpdateRunResourcesByFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Starts an UpdateRun.
|
||||
*
|
||||
* @summary Starts an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json
|
||||
*/
|
||||
async function startsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
startsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Stops an UpdateRun.
|
||||
*
|
||||
* @summary Stops an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json
|
||||
*/
|
||||
async function stopsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
stopsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,86 @@
|
|||
# client library samples for JavaScript (Beta)
|
||||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [fleetMembersCreateSample.js][fleetmemberscreatesample] | Create a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json |
|
||||
| [fleetMembersDeleteSample.js][fleetmembersdeletesample] | Delete a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json |
|
||||
| [fleetMembersGetSample.js][fleetmembersgetsample] | Get a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json |
|
||||
| [fleetMembersListByFleetSample.js][fleetmemberslistbyfleetsample] | List FleetMember resources by Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json |
|
||||
| [fleetMembersUpdateSample.js][fleetmembersupdatesample] | Update a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json |
|
||||
| [fleetsCreateOrUpdateSample.js][fleetscreateorupdatesample] | Creates or updates a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json |
|
||||
| [fleetsDeleteSample.js][fleetsdeletesample] | Delete a Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json |
|
||||
| [fleetsGetSample.js][fleetsgetsample] | Gets a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json |
|
||||
| [fleetsListByResourceGroupSample.js][fleetslistbyresourcegroupsample] | Lists fleets in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json |
|
||||
| [fleetsListBySubscriptionSample.js][fleetslistbysubscriptionsample] | Lists fleets in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json |
|
||||
| [fleetsListCredentialsSample.js][fleetslistcredentialssample] | Lists the user credentials of a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json |
|
||||
| [fleetsUpdateSample.js][fleetsupdatesample] | Update a Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json |
|
||||
| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json |
|
||||
| [updateRunsCreateOrUpdateSample.js][updaterunscreateorupdatesample] | Create a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json |
|
||||
| [updateRunsDeleteSample.js][updaterunsdeletesample] | Delete a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json |
|
||||
| [updateRunsGetSample.js][updaterunsgetsample] | Get a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json |
|
||||
| [updateRunsListByFleetSample.js][updaterunslistbyfleetsample] | List UpdateRun resources by Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json |
|
||||
| [updateRunsStartSample.js][updaterunsstartsample] | Starts an UpdateRun. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json |
|
||||
| [updateRunsStopSample.js][updaterunsstopsample] | Stops an UpdateRun. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node fleetMembersCreateSample.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="<containerservice subscription id>" CONTAINERSERVICE_RESOURCE_GROUP="<containerservice resource group>" node fleetMembersCreateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[fleetmemberscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetMembersCreateSample.js
|
||||
[fleetmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetMembersDeleteSample.js
|
||||
[fleetmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetMembersGetSample.js
|
||||
[fleetmemberslistbyfleetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetMembersListByFleetSample.js
|
||||
[fleetmembersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetMembersUpdateSample.js
|
||||
[fleetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsCreateOrUpdateSample.js
|
||||
[fleetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsDeleteSample.js
|
||||
[fleetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsGetSample.js
|
||||
[fleetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsListByResourceGroupSample.js
|
||||
[fleetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsListBySubscriptionSample.js
|
||||
[fleetslistcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsListCredentialsSample.js
|
||||
[fleetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/fleetsUpdateSample.js
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/operationsListSample.js
|
||||
[updaterunscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsCreateOrUpdateSample.js
|
||||
[updaterunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsDeleteSample.js
|
||||
[updaterunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsGetSample.js
|
||||
[updaterunslistbyfleetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsListByFleetSample.js
|
||||
[updaterunsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsStartSample.js
|
||||
[updaterunsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/javascript/updateRunsStopSample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet/README.md
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a FleetMember
|
||||
*
|
||||
* @summary Create a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json
|
||||
*/
|
||||
async function createsAFleetMemberResourceWithALongRunningOperation() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const resource = {
|
||||
clusterResourceId:
|
||||
"/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetMemberResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a FleetMember
|
||||
*
|
||||
* @summary Delete a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json
|
||||
*/
|
||||
async function deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a FleetMember
|
||||
*
|
||||
* @summary Get a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json
|
||||
*/
|
||||
async function getsAFleetMemberResource() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.get(resourceGroupName, fleetName, fleetMemberName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetMemberResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List FleetMember resources by Fleet
|
||||
*
|
||||
* @summary List FleetMember resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json
|
||||
*/
|
||||
async function listsTheMembersOfAFleet() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleetMembers.listByFleet(resourceGroupName, fleetName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheMembersOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a FleetMember
|
||||
*
|
||||
* @summary Update a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json
|
||||
*/
|
||||
async function updatesAFleetMemberResourceSynchronously() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const properties = { group: "staging" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.update(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
properties
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updatesAFleetMemberResourceSynchronously();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a Fleet.
|
||||
*
|
||||
* @summary Creates or updates a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json
|
||||
*/
|
||||
async function createsAFleetResourceWithALongRunningOperation() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const resource = {
|
||||
hubProfile: { dnsPrefix: "dnsprefix1" },
|
||||
location: "East US",
|
||||
tags: { archv2: "", tier: "production" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Fleet
|
||||
*
|
||||
* @summary Delete a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json
|
||||
*/
|
||||
async function deletesAFleetResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginDeleteAndWait(resourceGroupName, fleetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a Fleet.
|
||||
*
|
||||
* @summary Gets a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json
|
||||
*/
|
||||
async function getsAFleetResource() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.get(resourceGroupName, fleetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription and resource group.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription and resource group.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInAResourceGroup() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInAResourceGroup();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInASubscription() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInASubscription();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists the user credentials of a Fleet.
|
||||
*
|
||||
* @summary Lists the user credentials of a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json
|
||||
*/
|
||||
async function listsTheUserCredentialsOfAFleet() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.listCredentials(resourceGroupName, fleetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUserCredentialsOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Fleet
|
||||
*
|
||||
* @summary Update a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json
|
||||
*/
|
||||
async function updateAFleet() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const ifMatch = "dfjkwelr7384";
|
||||
const fleetName = "fleet1";
|
||||
const properties = { tags: { env: "prod", tier: "secure" } };
|
||||
const options = { ifMatch };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.update(resourceGroupName, fleetName, properties, options);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updateAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the operations for the provider
|
||||
*
|
||||
* @summary List the operations for the provider
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function listTheOperationsForTheProvider() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listTheOperationsForTheProvider();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-containerservicefleet-js-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for JavaScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/containerservice/arm-containerservicefleet"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet",
|
||||
"dependencies": {
|
||||
"@azure/arm-containerservicefleet": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a UpdateRun
|
||||
*
|
||||
* @summary Create a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json
|
||||
*/
|
||||
async function createAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const resource = {
|
||||
managedClusterUpdate: {
|
||||
upgrade: { type: "Full", kubernetesVersion: "1.26.1" },
|
||||
},
|
||||
strategy: {
|
||||
stages: [
|
||||
{
|
||||
name: "stage1",
|
||||
afterStageWaitInSeconds: 3600,
|
||||
groups: [{ name: "group-a" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a UpdateRun
|
||||
*
|
||||
* @summary Delete a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json
|
||||
*/
|
||||
async function deleteAnUpdateRunResource() {
|
||||
const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a UpdateRun
|
||||
*
|
||||
* @summary Get a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json
|
||||
*/
|
||||
async function getsAnUpdateRunResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.get(resourceGroupName, fleetName, updateRunName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List UpdateRun resources by Fleet
|
||||
*
|
||||
* @summary List UpdateRun resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json
|
||||
*/
|
||||
async function listsTheUpdateRunResourcesByFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.updateRuns.listByFleet(resourceGroupName, fleetName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUpdateRunResourcesByFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Starts an UpdateRun.
|
||||
*
|
||||
* @summary Starts an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json
|
||||
*/
|
||||
async function startsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
startsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ContainerServiceFleetClient } = require("@azure/arm-containerservicefleet");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Stops an UpdateRun.
|
||||
*
|
||||
* @summary Stops an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json
|
||||
*/
|
||||
async function stopsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
stopsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,99 @@
|
|||
# client library samples for TypeScript (Beta)
|
||||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [fleetMembersCreateSample.ts][fleetmemberscreatesample] | Create a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json |
|
||||
| [fleetMembersDeleteSample.ts][fleetmembersdeletesample] | Delete a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json |
|
||||
| [fleetMembersGetSample.ts][fleetmembersgetsample] | Get a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json |
|
||||
| [fleetMembersListByFleetSample.ts][fleetmemberslistbyfleetsample] | List FleetMember resources by Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json |
|
||||
| [fleetMembersUpdateSample.ts][fleetmembersupdatesample] | Update a FleetMember x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json |
|
||||
| [fleetsCreateOrUpdateSample.ts][fleetscreateorupdatesample] | Creates or updates a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json |
|
||||
| [fleetsDeleteSample.ts][fleetsdeletesample] | Delete a Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json |
|
||||
| [fleetsGetSample.ts][fleetsgetsample] | Gets a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json |
|
||||
| [fleetsListByResourceGroupSample.ts][fleetslistbyresourcegroupsample] | Lists fleets in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json |
|
||||
| [fleetsListBySubscriptionSample.ts][fleetslistbysubscriptionsample] | Lists fleets in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json |
|
||||
| [fleetsListCredentialsSample.ts][fleetslistcredentialssample] | Lists the user credentials of a Fleet. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json |
|
||||
| [fleetsUpdateSample.ts][fleetsupdatesample] | Update a Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json |
|
||||
| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json |
|
||||
| [updateRunsCreateOrUpdateSample.ts][updaterunscreateorupdatesample] | Create a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json |
|
||||
| [updateRunsDeleteSample.ts][updaterunsdeletesample] | Delete a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json |
|
||||
| [updateRunsGetSample.ts][updaterunsgetsample] | Get a UpdateRun x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json |
|
||||
| [updateRunsListByFleetSample.ts][updaterunslistbyfleetsample] | List UpdateRun resources by Fleet x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json |
|
||||
| [updateRunsStartSample.ts][updaterunsstartsample] | Starts an UpdateRun. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json |
|
||||
| [updateRunsStopSample.ts][updaterunsstopsample] | Stops an UpdateRun. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
|
||||
|
||||
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
|
||||
|
||||
```bash
|
||||
npm install -g typescript
|
||||
```
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Compile the samples:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node dist/fleetMembersCreateSample.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="<containerservice subscription id>" CONTAINERSERVICE_RESOURCE_GROUP="<containerservice resource group>" node dist/fleetMembersCreateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[fleetmemberscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetMembersCreateSample.ts
|
||||
[fleetmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetMembersDeleteSample.ts
|
||||
[fleetmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetMembersGetSample.ts
|
||||
[fleetmemberslistbyfleetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetMembersListByFleetSample.ts
|
||||
[fleetmembersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetMembersUpdateSample.ts
|
||||
[fleetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsCreateOrUpdateSample.ts
|
||||
[fleetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsDeleteSample.ts
|
||||
[fleetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsGetSample.ts
|
||||
[fleetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsListByResourceGroupSample.ts
|
||||
[fleetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsListBySubscriptionSample.ts
|
||||
[fleetslistcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsListCredentialsSample.ts
|
||||
[fleetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/fleetsUpdateSample.ts
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/operationsListSample.ts
|
||||
[updaterunscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsCreateOrUpdateSample.ts
|
||||
[updaterunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsDeleteSample.ts
|
||||
[updaterunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsGetSample.ts
|
||||
[updaterunslistbyfleetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsListByFleetSample.ts
|
||||
[updaterunsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsStartSample.ts
|
||||
[updaterunsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/src/updateRunsStopSample.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet/README.md
|
||||
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-containerservicefleet-ts-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for TypeScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prebuild": "rimraf dist/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/containerservice/arm-containerservicefleet"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet",
|
||||
"dependencies": {
|
||||
"@azure/arm-containerservicefleet": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.0.0",
|
||||
"typescript": "~5.0.0",
|
||||
"rimraf": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetMember,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a FleetMember
|
||||
*
|
||||
* @summary Create a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json
|
||||
*/
|
||||
async function createsAFleetMemberResourceWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const resource: FleetMember = {
|
||||
clusterResourceId:
|
||||
"/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetMemberResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a FleetMember
|
||||
*
|
||||
* @summary Delete a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json
|
||||
*/
|
||||
async function deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a FleetMember
|
||||
*
|
||||
* @summary Get a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json
|
||||
*/
|
||||
async function getsAFleetMemberResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.get(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetMemberResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List FleetMember resources by Fleet
|
||||
*
|
||||
* @summary List FleetMember resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json
|
||||
*/
|
||||
async function listsTheMembersOfAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleetMembers.listByFleet(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheMembersOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetMemberUpdate,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a FleetMember
|
||||
*
|
||||
* @summary Update a FleetMember
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json
|
||||
*/
|
||||
async function updatesAFleetMemberResourceSynchronously() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const fleetMemberName = "member-1";
|
||||
const properties: FleetMemberUpdate = { group: "staging" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleetMembers.update(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
properties
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updatesAFleetMemberResourceSynchronously();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
Fleet,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a Fleet.
|
||||
*
|
||||
* @summary Creates or updates a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json
|
||||
*/
|
||||
async function createsAFleetResourceWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const resource: Fleet = {
|
||||
hubProfile: { dnsPrefix: "dnsprefix1" },
|
||||
location: "East US",
|
||||
tags: { archv2: "", tier: "production" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createsAFleetResourceWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Fleet
|
||||
*
|
||||
* @summary Delete a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json
|
||||
*/
|
||||
async function deletesAFleetResourceAsynchronouslyWithALongRunningOperation() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deletesAFleetResourceAsynchronouslyWithALongRunningOperation();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a Fleet.
|
||||
*
|
||||
* @summary Gets a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json
|
||||
*/
|
||||
async function getsAFleetResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.get(resourceGroupName, fleetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAFleetResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription and resource group.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription and resource group.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInAResourceGroup();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists fleets in the specified subscription.
|
||||
*
|
||||
* @summary Lists fleets in the specified subscription.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json
|
||||
*/
|
||||
async function listsTheFleetResourcesInASubscription() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheFleetResourcesInASubscription();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists the user credentials of a Fleet.
|
||||
*
|
||||
* @summary Lists the user credentials of a Fleet.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json
|
||||
*/
|
||||
async function listsTheUserCredentialsOfAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.listCredentials(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUserCredentialsOfAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
FleetPatch,
|
||||
FleetsUpdateOptionalParams,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Fleet
|
||||
*
|
||||
* @summary Update a Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json
|
||||
*/
|
||||
async function updateAFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const ifMatch = "dfjkwelr7384";
|
||||
const fleetName = "fleet1";
|
||||
const properties: FleetPatch = { tags: { env: "prod", tier: "secure" } };
|
||||
const options: FleetsUpdateOptionalParams = { ifMatch };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.fleets.update(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
properties,
|
||||
options
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updateAFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the operations for the provider
|
||||
*
|
||||
* @summary List the operations for the provider
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function listTheOperationsForTheProvider() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listTheOperationsForTheProvider();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
UpdateRun,
|
||||
ContainerServiceFleetClient
|
||||
} from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a UpdateRun
|
||||
*
|
||||
* @summary Create a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json
|
||||
*/
|
||||
async function createAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const resource: UpdateRun = {
|
||||
managedClusterUpdate: {
|
||||
upgrade: { type: "Full", kubernetesVersion: "1.26.1" }
|
||||
},
|
||||
strategy: {
|
||||
stages: [
|
||||
{
|
||||
name: "stage1",
|
||||
afterStageWaitInSeconds: 3600,
|
||||
groups: [{ name: "group-a" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
resource
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a UpdateRun
|
||||
*
|
||||
* @summary Delete a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json
|
||||
*/
|
||||
async function deleteAnUpdateRunResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "subid1";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a UpdateRun
|
||||
*
|
||||
* @summary Get a UpdateRun
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json
|
||||
*/
|
||||
async function getsAnUpdateRunResource() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.get(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getsAnUpdateRunResource();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List UpdateRun resources by Fleet
|
||||
*
|
||||
* @summary List UpdateRun resources by Fleet
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json
|
||||
*/
|
||||
async function listsTheUpdateRunResourcesByFleet() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.updateRuns.listByFleet(
|
||||
resourceGroupName,
|
||||
fleetName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listsTheUpdateRunResourcesByFleet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Starts an UpdateRun.
|
||||
*
|
||||
* @summary Starts an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json
|
||||
*/
|
||||
async function startsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
startsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerServiceFleetClient } from "@azure/arm-containerservicefleet";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Stops an UpdateRun.
|
||||
*
|
||||
* @summary Stops an UpdateRun.
|
||||
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json
|
||||
*/
|
||||
async function stopsAnUpdateRun() {
|
||||
const subscriptionId =
|
||||
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName =
|
||||
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
|
||||
const fleetName = "fleet1";
|
||||
const updateRunName = "run1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerServiceFleetClient(credential, subscriptionId);
|
||||
const result = await client.updateRuns.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
stopsAnUpdateRun();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"alwaysStrict": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": [
|
||||
"src/**.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* 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 coreRestPipeline from "@azure/core-rest-pipeline";
|
||||
import {
|
||||
PipelineRequest,
|
||||
PipelineResponse,
|
||||
SendRequest
|
||||
} from "@azure/core-rest-pipeline";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import {
|
||||
OperationsImpl,
|
||||
FleetsImpl,
|
||||
FleetMembersImpl,
|
||||
UpdateRunsImpl
|
||||
} from "./operations";
|
||||
import {
|
||||
Operations,
|
||||
Fleets,
|
||||
FleetMembers,
|
||||
UpdateRuns
|
||||
} from "./operationsInterfaces";
|
||||
import { ContainerServiceFleetClientOptionalParams } from "./models";
|
||||
|
||||
export class ContainerServiceFleetClient extends coreClient.ServiceClient {
|
||||
$host: string;
|
||||
apiVersion: string;
|
||||
subscriptionId: string;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the ContainerServiceFleetClient 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?: ContainerServiceFleetClientOptionalParams
|
||||
) {
|
||||
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: ContainerServiceFleetClientOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-containerservicefleet/1.0.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
: `${packageDetails}`;
|
||||
|
||||
const optionsWithDefaults = {
|
||||
...defaults,
|
||||
...options,
|
||||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
endpoint:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
||||
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
||||
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
||||
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
||||
(pipelinePolicy) =>
|
||||
pipelinePolicy.name ===
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
);
|
||||
}
|
||||
if (
|
||||
!options ||
|
||||
!options.pipeline ||
|
||||
options.pipeline.getOrderedPolicies().length == 0 ||
|
||||
!bearerTokenAuthenticationPolicyFound
|
||||
) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
credential: credentials,
|
||||
scopes:
|
||||
optionsWithDefaults.credentialScopes ??
|
||||
`${optionsWithDefaults.endpoint}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2023-03-15-preview";
|
||||
this.operations = new OperationsImpl(this);
|
||||
this.fleets = new FleetsImpl(this);
|
||||
this.fleetMembers = new FleetMembersImpl(this);
|
||||
this.updateRuns = new UpdateRunsImpl(this);
|
||||
this.addCustomApiVersionPolicy(options.apiVersion);
|
||||
}
|
||||
|
||||
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
||||
private addCustomApiVersionPolicy(apiVersion?: string) {
|
||||
if (!apiVersion) {
|
||||
return;
|
||||
}
|
||||
const apiVersionPolicy = {
|
||||
name: "CustomApiVersionPolicy",
|
||||
async sendRequest(
|
||||
request: PipelineRequest,
|
||||
next: SendRequest
|
||||
): Promise<PipelineResponse> {
|
||||
const param = request.url.split("?");
|
||||
if (param.length > 1) {
|
||||
const newParams = param[1].split("&").map((item) => {
|
||||
if (item.indexOf("api-version") > -1) {
|
||||
return "api-version=" + apiVersion;
|
||||
} else {
|
||||
return item;
|
||||
}
|
||||
});
|
||||
request.url = param[0] + "?" + newParams.join("&");
|
||||
}
|
||||
return next(request);
|
||||
}
|
||||
};
|
||||
this.pipeline.addPolicy(apiVersionPolicy);
|
||||
}
|
||||
|
||||
operations: Operations;
|
||||
fleets: Fleets;
|
||||
fleetMembers: FleetMembers;
|
||||
updateRuns: UpdateRuns;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
export { getContinuationToken } from "./pagingHelper";
|
||||
export * from "./models";
|
||||
export { ContainerServiceFleetClient } from "./containerServiceFleetClient";
|
||||
export * from "./operationsInterfaces";
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { AbortSignalLike } from "@azure/abort-controller";
|
||||
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
||||
|
||||
export function createLroSpec<T>(inputs: {
|
||||
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
|
||||
args: Record<string, unknown>;
|
||||
spec: {
|
||||
readonly requestBody?: unknown;
|
||||
readonly path?: string;
|
||||
readonly httpMethod: string;
|
||||
} & Record<string, any>;
|
||||
}): LongRunningOperation<T> {
|
||||
const { args, spec, sendOperationFn } = inputs;
|
||||
return {
|
||||
requestMethod: spec.httpMethod,
|
||||
requestPath: spec.path!,
|
||||
sendInitialRequest: () => sendOperationFn(args, spec),
|
||||
sendPollRequest: (
|
||||
path: string,
|
||||
options?: { abortSignal?: AbortSignalLike }
|
||||
) => {
|
||||
const { requestBody, ...restSpec } = spec;
|
||||
return sendOperationFn(args, {
|
||||
...restSpec,
|
||||
httpMethod: "GET",
|
||||
path,
|
||||
abortSignal: options?.abortSignal
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,965 @@
|
|||
/*
|
||||
* 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";
|
||||
|
||||
/** 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;
|
||||
}
|
||||
|
||||
/** 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<string, unknown>;
|
||||
}
|
||||
|
||||
/** The response of a Fleet list operation. */
|
||||
export interface FleetListResult {
|
||||
/** The Fleet items on this page */
|
||||
value: Fleet[];
|
||||
/** The link to the next page of items */
|
||||
nextLink?: string;
|
||||
}
|
||||
|
||||
/** The FleetHubProfile configures the fleet hub. */
|
||||
export interface FleetHubProfile {
|
||||
/** DNS prefix used to create the FQDN for the Fleet hub. */
|
||||
dnsPrefix?: string;
|
||||
/**
|
||||
* The FQDN of the Fleet hub.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly fqdn?: string;
|
||||
/**
|
||||
* The Kubernetes version of the Fleet hub.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly kubernetesVersion?: string;
|
||||
}
|
||||
|
||||
/** 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;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/** 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;
|
||||
}
|
||||
|
||||
/** Properties of a Fleet that can be patched. */
|
||||
export interface FleetPatch {
|
||||
/** Resource tags. */
|
||||
tags?: { [propertyName: string]: string };
|
||||
}
|
||||
|
||||
/** The Credential results response. */
|
||||
export interface FleetCredentialResults {
|
||||
/**
|
||||
* Array of base64-encoded Kubernetes configuration files.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly kubeconfigs?: FleetCredentialResult[];
|
||||
}
|
||||
|
||||
/** One credential result item. */
|
||||
export interface FleetCredentialResult {
|
||||
/**
|
||||
* The name of the credential.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* Base64-encoded Kubernetes configuration file.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: Uint8Array;
|
||||
}
|
||||
|
||||
/** The response of a FleetMember list operation. */
|
||||
export interface FleetMemberListResult {
|
||||
/** The FleetMember items on this page */
|
||||
value: FleetMember[];
|
||||
/** The link to the next page of items */
|
||||
nextLink?: string;
|
||||
}
|
||||
|
||||
/** The type used for update operations of the FleetMember. */
|
||||
export interface FleetMemberUpdate {
|
||||
/** The group this member belongs to for multi-cluster update management. */
|
||||
group?: string;
|
||||
}
|
||||
|
||||
/** The response of a UpdateRun list operation. */
|
||||
export interface UpdateRunListResult {
|
||||
/** The UpdateRun items on this page */
|
||||
value: UpdateRun[];
|
||||
/** The link to the next page of items */
|
||||
nextLink?: string;
|
||||
}
|
||||
|
||||
/** The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. */
|
||||
export interface UpdateRunStrategy {
|
||||
/** The list of stages that compose this update run. */
|
||||
stages: UpdateStage[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains the groups to be updated by an UpdateRun.
|
||||
* Update order:
|
||||
* - Sequential between stages: Stages run sequentially. The previous stage must complete before the next one starts.
|
||||
* - Parallel within a stage: Groups within a stage run in parallel.
|
||||
* - Sequential within a group: Clusters within a group are updated sequentially.
|
||||
*/
|
||||
export interface UpdateStage {
|
||||
/** The name of the stage. Must be unique within the UpdateRun. */
|
||||
name: string;
|
||||
/**
|
||||
* A list of group names that compose the stage.
|
||||
* The groups will be updated in parallel. Each group name can only appear once in the UpdateRun.
|
||||
*/
|
||||
groups?: UpdateGroup[];
|
||||
/** The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. */
|
||||
afterStageWaitInSeconds?: number;
|
||||
}
|
||||
|
||||
/** A group to be updated. */
|
||||
export interface UpdateGroup {
|
||||
/**
|
||||
* The name of the Fleet member group to update.
|
||||
* It should match the name of an existing FleetMember group.
|
||||
* A group can only appear once across all UpdateStages in the UpdateRun.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** The update to be applied to the ManagedClusters. */
|
||||
export interface ManagedClusterUpdate {
|
||||
/** The upgrade to apply to the ManagedClusters. */
|
||||
upgrade: ManagedClusterUpgradeSpec;
|
||||
}
|
||||
|
||||
/** The upgrade to apply to a ManagedCluster. */
|
||||
export interface ManagedClusterUpgradeSpec {
|
||||
/**
|
||||
* The upgrade type.
|
||||
* Full requires the KubernetesVersion property to be set.
|
||||
* NodeImageOnly requires the KubernetesVersion property not to be set.
|
||||
*/
|
||||
type: ManagedClusterUpgradeType;
|
||||
/** The Kubernetes version to upgrade the member clusters to. */
|
||||
kubernetesVersion?: string;
|
||||
}
|
||||
|
||||
/** The status of a UpdateRun. */
|
||||
export interface UpdateRunStatus {
|
||||
/**
|
||||
* The status of the UpdateRun.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateStatus;
|
||||
/**
|
||||
* The stages composing an update run. Stages are run sequentially withing an UpdateRun.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly stages?: UpdateStageStatus[];
|
||||
}
|
||||
|
||||
/** The status for an operation or group of operations. */
|
||||
export interface UpdateStatus {
|
||||
/**
|
||||
* The time the operation or group was started.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly startTime?: Date;
|
||||
/**
|
||||
* The time the operation or group was completed.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly completedTime?: Date;
|
||||
/**
|
||||
* The State of the operation or group.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly state?: UpdateState;
|
||||
/**
|
||||
* The error details when a failure is encountered.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly error?: ErrorDetail;
|
||||
}
|
||||
|
||||
/** The status of a UpdateStage. */
|
||||
export interface UpdateStageStatus {
|
||||
/**
|
||||
* The status of the UpdateStage.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateStatus;
|
||||
/**
|
||||
* The name of the UpdateStage.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The list of groups to be updated as part of this UpdateStage.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly groups?: UpdateGroupStatus[];
|
||||
/**
|
||||
* The status of the wait period configured on the UpdateStage.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly afterStageWaitStatus?: WaitStatus;
|
||||
}
|
||||
|
||||
/** The status of a UpdateGroup. */
|
||||
export interface UpdateGroupStatus {
|
||||
/**
|
||||
* The status of the UpdateGroup.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateStatus;
|
||||
/**
|
||||
* The name of the UpdateGroup.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The list of member this UpdateGroup updates.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly members?: MemberUpdateStatus[];
|
||||
}
|
||||
|
||||
/** The status of a member update operation. */
|
||||
export interface MemberUpdateStatus {
|
||||
/**
|
||||
* The status of the MemberUpdate operation.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateStatus;
|
||||
/**
|
||||
* The name of the FleetMember.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The Azure resource id of the target Kubernetes cluster.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly clusterResourceId?: string;
|
||||
/**
|
||||
* The operation resource id of the latest attempt to perform the operation.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly operationId?: string;
|
||||
}
|
||||
|
||||
/** The status of the wait duration. */
|
||||
export interface WaitStatus {
|
||||
/**
|
||||
* The status of the wait duration.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateStatus;
|
||||
/**
|
||||
* The wait duration configured in seconds.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly waitDurationInSeconds?: number;
|
||||
}
|
||||
|
||||
/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
|
||||
export interface TrackedResource extends 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 interface ProxyResource extends Resource {}
|
||||
|
||||
/** The Fleet resource. */
|
||||
export interface Fleet extends TrackedResource {
|
||||
/**
|
||||
* If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly eTag?: string;
|
||||
/**
|
||||
* The status of the last operation.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: FleetProvisioningState;
|
||||
/** The FleetHubProfile configures the Fleet's hub. */
|
||||
hubProfile?: FleetHubProfile;
|
||||
}
|
||||
|
||||
/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */
|
||||
export interface FleetMember extends ProxyResource {
|
||||
/**
|
||||
* If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly eTag?: string;
|
||||
/** The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. */
|
||||
clusterResourceId?: string;
|
||||
/** The group this member belongs to for multi-cluster update management. */
|
||||
group?: string;
|
||||
/**
|
||||
* The status of the last operation.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: FleetMemberProvisioningState;
|
||||
}
|
||||
|
||||
/** An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. */
|
||||
export interface UpdateRun extends ProxyResource {
|
||||
/**
|
||||
* If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly eTag?: string;
|
||||
/**
|
||||
* The provisioning state of the UpdateRun resource.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: UpdateRunProvisioningState;
|
||||
/**
|
||||
* The strategy defines the order in which the clusters will be updated.
|
||||
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
|
||||
* The strategy of the UpdateRun can be modified until the run is started.
|
||||
*/
|
||||
strategy?: UpdateRunStrategy;
|
||||
/** The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. */
|
||||
managedClusterUpdate?: ManagedClusterUpdate;
|
||||
/**
|
||||
* The status of the UpdateRun.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly status?: UpdateRunStatus;
|
||||
}
|
||||
|
||||
/** Defines headers for Fleets_createOrUpdate operation. */
|
||||
export interface FleetsCreateOrUpdateHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
/** Defines headers for Fleets_delete operation. */
|
||||
export interface FleetsDeleteHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
/** The Location header contains the URL where the status of the long running operation can be checked. */
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for FleetMembers_create operation. */
|
||||
export interface FleetMembersCreateHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
/** Defines headers for FleetMembers_delete operation. */
|
||||
export interface FleetMembersDeleteHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
/** The Location header contains the URL where the status of the long running operation can be checked. */
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for UpdateRuns_createOrUpdate operation. */
|
||||
export interface UpdateRunsCreateOrUpdateHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
}
|
||||
|
||||
/** Defines headers for UpdateRuns_delete operation. */
|
||||
export interface UpdateRunsDeleteHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
/** The Location header contains the URL where the status of the long running operation can be checked. */
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for UpdateRuns_start operation. */
|
||||
export interface UpdateRunsStartHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
/** The Location header contains the URL where the status of the long running operation can be checked. */
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for UpdateRuns_stop operation. */
|
||||
export interface UpdateRunsStopHeaders {
|
||||
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
||||
retryAfter?: number;
|
||||
/** The Location header contains the URL where the status of the long running operation can be checked. */
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/** Known values of {@link Origin} that the service accepts. */
|
||||
export enum KnownOrigin {
|
||||
/** User */
|
||||
User = "user",
|
||||
/** System */
|
||||
System = "system",
|
||||
/** UserSystem */
|
||||
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 = "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;
|
||||
|
||||
/** Known values of {@link FleetProvisioningState} that the service accepts. */
|
||||
export enum KnownFleetProvisioningState {
|
||||
/** Succeeded */
|
||||
Succeeded = "Succeeded",
|
||||
/** Failed */
|
||||
Failed = "Failed",
|
||||
/** Canceled */
|
||||
Canceled = "Canceled",
|
||||
/** Creating */
|
||||
Creating = "Creating",
|
||||
/** Updating */
|
||||
Updating = "Updating",
|
||||
/** Deleting */
|
||||
Deleting = "Deleting"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for FleetProvisioningState. \
|
||||
* {@link KnownFleetProvisioningState} can be used interchangeably with FleetProvisioningState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Succeeded** \
|
||||
* **Failed** \
|
||||
* **Canceled** \
|
||||
* **Creating** \
|
||||
* **Updating** \
|
||||
* **Deleting**
|
||||
*/
|
||||
export type FleetProvisioningState = string;
|
||||
|
||||
/** Known values of {@link CreatedByType} that the service accepts. */
|
||||
export enum KnownCreatedByType {
|
||||
/** User */
|
||||
User = "User",
|
||||
/** Application */
|
||||
Application = "Application",
|
||||
/** ManagedIdentity */
|
||||
ManagedIdentity = "ManagedIdentity",
|
||||
/** Key */
|
||||
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 FleetMemberProvisioningState} that the service accepts. */
|
||||
export enum KnownFleetMemberProvisioningState {
|
||||
/** Succeeded */
|
||||
Succeeded = "Succeeded",
|
||||
/** Failed */
|
||||
Failed = "Failed",
|
||||
/** Canceled */
|
||||
Canceled = "Canceled",
|
||||
/** Joining */
|
||||
Joining = "Joining",
|
||||
/** Leaving */
|
||||
Leaving = "Leaving",
|
||||
/** Updating */
|
||||
Updating = "Updating"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for FleetMemberProvisioningState. \
|
||||
* {@link KnownFleetMemberProvisioningState} can be used interchangeably with FleetMemberProvisioningState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Succeeded** \
|
||||
* **Failed** \
|
||||
* **Canceled** \
|
||||
* **Joining** \
|
||||
* **Leaving** \
|
||||
* **Updating**
|
||||
*/
|
||||
export type FleetMemberProvisioningState = string;
|
||||
|
||||
/** Known values of {@link UpdateRunProvisioningState} that the service accepts. */
|
||||
export enum KnownUpdateRunProvisioningState {
|
||||
/** Succeeded */
|
||||
Succeeded = "Succeeded",
|
||||
/** Failed */
|
||||
Failed = "Failed",
|
||||
/** Canceled */
|
||||
Canceled = "Canceled"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for UpdateRunProvisioningState. \
|
||||
* {@link KnownUpdateRunProvisioningState} can be used interchangeably with UpdateRunProvisioningState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Succeeded** \
|
||||
* **Failed** \
|
||||
* **Canceled**
|
||||
*/
|
||||
export type UpdateRunProvisioningState = string;
|
||||
|
||||
/** Known values of {@link ManagedClusterUpgradeType} that the service accepts. */
|
||||
export enum KnownManagedClusterUpgradeType {
|
||||
/** Full upgrades the control plane and all agent pools of the target ManagedClusters. */
|
||||
Full = "Full",
|
||||
/** NodeImageOnly upgrades only the node images of the target ManagedClusters. */
|
||||
NodeImageOnly = "NodeImageOnly"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for ManagedClusterUpgradeType. \
|
||||
* {@link KnownManagedClusterUpgradeType} can be used interchangeably with ManagedClusterUpgradeType,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Full**: Full upgrades the control plane and all agent pools of the target ManagedClusters. \
|
||||
* **NodeImageOnly**: NodeImageOnly upgrades only the node images of the target ManagedClusters.
|
||||
*/
|
||||
export type ManagedClusterUpgradeType = string;
|
||||
|
||||
/** Known values of {@link UpdateState} that the service accepts. */
|
||||
export enum KnownUpdateState {
|
||||
/** NotStarted */
|
||||
NotStarted = "NotStarted",
|
||||
/** Running */
|
||||
Running = "Running",
|
||||
/** Stopping */
|
||||
Stopping = "Stopping",
|
||||
/** Stopped */
|
||||
Stopped = "Stopped",
|
||||
/** Failed */
|
||||
Failed = "Failed",
|
||||
/** Completed */
|
||||
Completed = "Completed"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for UpdateState. \
|
||||
* {@link KnownUpdateState} can be used interchangeably with UpdateState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **NotStarted** \
|
||||
* **Running** \
|
||||
* **Stopping** \
|
||||
* **Stopped** \
|
||||
* **Failed** \
|
||||
* **Completed**
|
||||
*/
|
||||
export type UpdateState = string;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface OperationsListOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the list operation. */
|
||||
export type OperationsListResponse = OperationListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface OperationsListNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listNext operation. */
|
||||
export type OperationsListNextResponse = OperationListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsListBySubscriptionOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listBySubscription operation. */
|
||||
export type FleetsListBySubscriptionResponse = FleetListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsListByResourceGroupOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByResourceGroup operation. */
|
||||
export type FleetsListByResourceGroupResponse = FleetListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsGetOptionalParams extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type FleetsGetResponse = Fleet;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsCreateOrUpdateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** The request should only proceed if no entity matches this string. */
|
||||
ifNoneMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the createOrUpdate operation. */
|
||||
export type FleetsCreateOrUpdateResponse = Fleet;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsUpdateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the update operation. */
|
||||
export type FleetsUpdateResponse = Fleet;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsDeleteOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsListCredentialsOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listCredentials operation. */
|
||||
export type FleetsListCredentialsResponse = FleetCredentialResults;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsListBySubscriptionNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listBySubscriptionNext operation. */
|
||||
export type FleetsListBySubscriptionNextResponse = FleetListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetsListByResourceGroupNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByResourceGroupNext operation. */
|
||||
export type FleetsListByResourceGroupNextResponse = FleetListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersListByFleetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByFleet operation. */
|
||||
export type FleetMembersListByFleetResponse = FleetMemberListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type FleetMembersGetResponse = FleetMember;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersCreateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** The request should only proceed if no entity matches this string. */
|
||||
ifNoneMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the create operation. */
|
||||
export type FleetMembersCreateResponse = FleetMember;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersUpdateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the update operation. */
|
||||
export type FleetMembersUpdateResponse = FleetMember;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersDeleteOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface FleetMembersListByFleetNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByFleetNext operation. */
|
||||
export type FleetMembersListByFleetNextResponse = FleetMemberListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsListByFleetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByFleet operation. */
|
||||
export type UpdateRunsListByFleetResponse = UpdateRunListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type UpdateRunsGetResponse = UpdateRun;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsCreateOrUpdateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** The request should only proceed if no entity matches this string. */
|
||||
ifNoneMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the createOrUpdate operation. */
|
||||
export type UpdateRunsCreateOrUpdateResponse = UpdateRun;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsDeleteOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsStartOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the start operation. */
|
||||
export type UpdateRunsStartResponse = UpdateRun;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsStopOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** The request should only proceed if an entity matches this string. */
|
||||
ifMatch?: string;
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the stop operation. */
|
||||
export type UpdateRunsStopResponse = UpdateRun;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface UpdateRunsListByFleetNextOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listByFleetNext operation. */
|
||||
export type UpdateRunsListByFleetNextResponse = UpdateRunListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface ContainerServiceFleetClientOptionalParams
|
||||
extends coreClient.ServiceClientOptions {
|
||||
/** server parameter */
|
||||
$host?: string;
|
||||
/** Api Version */
|
||||
apiVersion?: string;
|
||||
/** Overrides client endpoint. */
|
||||
endpoint?: string;
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* 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 {
|
||||
Fleet as FleetMapper,
|
||||
FleetPatch as FleetPatchMapper,
|
||||
FleetMember as FleetMemberMapper,
|
||||
FleetMemberUpdate as FleetMemberUpdateMapper,
|
||||
UpdateRun as UpdateRunMapper
|
||||
} from "../models/mappers";
|
||||
|
||||
export const accept: OperationParameter = {
|
||||
parameterPath: "accept",
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const $host: OperationURLParameter = {
|
||||
parameterPath: "$host",
|
||||
mapper: {
|
||||
serializedName: "$host",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
|
||||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2023-03-15-preview",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const nextLink: OperationURLParameter = {
|
||||
parameterPath: "nextLink",
|
||||
mapper: {
|
||||
serializedName: "nextLink",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
|
||||
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 fleetName: OperationURLParameter = {
|
||||
parameterPath: "fleetName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"),
|
||||
MaxLength: 63,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "fleetName",
|
||||
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 resource: OperationParameter = {
|
||||
parameterPath: "resource",
|
||||
mapper: FleetMapper
|
||||
};
|
||||
|
||||
export const ifMatch: OperationParameter = {
|
||||
parameterPath: ["options", "ifMatch"],
|
||||
mapper: {
|
||||
serializedName: "If-Match",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ifNoneMatch: OperationParameter = {
|
||||
parameterPath: ["options", "ifNoneMatch"],
|
||||
mapper: {
|
||||
serializedName: "If-None-Match",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const properties: OperationParameter = {
|
||||
parameterPath: "properties",
|
||||
mapper: FleetPatchMapper
|
||||
};
|
||||
|
||||
export const fleetMemberName: OperationURLParameter = {
|
||||
parameterPath: "fleetMemberName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"),
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "fleetMemberName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const resource1: OperationParameter = {
|
||||
parameterPath: "resource",
|
||||
mapper: FleetMemberMapper
|
||||
};
|
||||
|
||||
export const properties1: OperationParameter = {
|
||||
parameterPath: "properties",
|
||||
mapper: FleetMemberUpdateMapper
|
||||
};
|
||||
|
||||
export const updateRunName: OperationURLParameter = {
|
||||
parameterPath: "updateRunName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"),
|
||||
MaxLength: 50,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "updateRunName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const resource2: OperationParameter = {
|
||||
parameterPath: "resource",
|
||||
mapper: UpdateRunMapper
|
||||
};
|
|
@ -0,0 +1,562 @@
|
|||
/*
|
||||
* 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, PageSettings } from "@azure/core-paging";
|
||||
import { setContinuationToken } from "../pagingHelper";
|
||||
import { FleetMembers } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { ContainerServiceFleetClient } from "../containerServiceFleetClient";
|
||||
import {
|
||||
SimplePollerLike,
|
||||
OperationState,
|
||||
createHttpPoller
|
||||
} from "@azure/core-lro";
|
||||
import { createLroSpec } from "../lroImpl";
|
||||
import {
|
||||
FleetMember,
|
||||
FleetMembersListByFleetNextOptionalParams,
|
||||
FleetMembersListByFleetOptionalParams,
|
||||
FleetMembersListByFleetResponse,
|
||||
FleetMembersGetOptionalParams,
|
||||
FleetMembersGetResponse,
|
||||
FleetMembersCreateOptionalParams,
|
||||
FleetMembersCreateResponse,
|
||||
FleetMemberUpdate,
|
||||
FleetMembersUpdateOptionalParams,
|
||||
FleetMembersUpdateResponse,
|
||||
FleetMembersDeleteOptionalParams,
|
||||
FleetMembersListByFleetNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing FleetMembers operations. */
|
||||
export class FleetMembersImpl implements FleetMembers {
|
||||
private readonly client: ContainerServiceFleetClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class FleetMembers class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: ContainerServiceFleetClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* List FleetMember resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetMembersListByFleetOptionalParams
|
||||
): PagedAsyncIterableIterator<FleetMember> {
|
||||
const iter = this.listByFleetPagingAll(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings?: PageSettings) => {
|
||||
if (settings?.maxPageSize) {
|
||||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listByFleetPagingPage(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options,
|
||||
settings
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listByFleetPagingPage(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetMembersListByFleetOptionalParams,
|
||||
settings?: PageSettings
|
||||
): AsyncIterableIterator<FleetMember[]> {
|
||||
let result: FleetMembersListByFleetResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
if (!continuationToken) {
|
||||
result = await this._listByFleet(resourceGroupName, fleetName, options);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
while (continuationToken) {
|
||||
result = await this._listByFleetNext(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
}
|
||||
|
||||
private async *listByFleetPagingAll(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetMembersListByFleetOptionalParams
|
||||
): AsyncIterableIterator<FleetMember> {
|
||||
for await (const page of this.listByFleetPagingPage(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List FleetMember resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetMembersListByFleetOptionalParams
|
||||
): Promise<FleetMembersListByFleetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, options },
|
||||
listByFleetOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersGetOptionalParams
|
||||
): Promise<FleetMembersGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, fleetMemberName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
resource: FleetMember,
|
||||
options?: FleetMembersCreateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<FleetMembersCreateResponse>,
|
||||
FleetMembersCreateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<FleetMembersCreateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: {
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
resource,
|
||||
options
|
||||
},
|
||||
spec: createOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<
|
||||
FleetMembersCreateResponse,
|
||||
OperationState<FleetMembersCreateResponse>
|
||||
>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
resource: FleetMember,
|
||||
options?: FleetMembersCreateOptionalParams
|
||||
): Promise<FleetMembersCreateResponse> {
|
||||
const poller = await this.beginCreate(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
resource,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param properties The resource properties to be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
update(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
properties: FleetMemberUpdate,
|
||||
options?: FleetMembersUpdateOptionalParams
|
||||
): Promise<FleetMembersUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, fleetMemberName, properties, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, fleetMemberName, options },
|
||||
spec: deleteOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
fleetMemberName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* ListByFleetNext
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListByFleet method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByFleetNext(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
nextLink: string,
|
||||
options?: FleetMembersListByFleetNextOptionalParams
|
||||
): Promise<FleetMembersListByFleetNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, nextLink, options },
|
||||
listByFleetNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listByFleetOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetMemberListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.fleetMemberName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.resource1,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.fleetMemberName
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.accept,
|
||||
Parameters.contentType,
|
||||
Parameters.ifMatch,
|
||||
Parameters.ifNoneMatch
|
||||
],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const updateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
|
||||
httpMethod: "PATCH",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetMember
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.properties1,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.fleetMemberName
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.accept,
|
||||
Parameters.contentType,
|
||||
Parameters.ifMatch
|
||||
],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.fleetMemberName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.ifMatch],
|
||||
serializer
|
||||
};
|
||||
const listByFleetNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetMemberListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,684 @@
|
|||
/*
|
||||
* 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, PageSettings } from "@azure/core-paging";
|
||||
import { setContinuationToken } from "../pagingHelper";
|
||||
import { Fleets } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { ContainerServiceFleetClient } from "../containerServiceFleetClient";
|
||||
import {
|
||||
SimplePollerLike,
|
||||
OperationState,
|
||||
createHttpPoller
|
||||
} from "@azure/core-lro";
|
||||
import { createLroSpec } from "../lroImpl";
|
||||
import {
|
||||
Fleet,
|
||||
FleetsListBySubscriptionNextOptionalParams,
|
||||
FleetsListBySubscriptionOptionalParams,
|
||||
FleetsListBySubscriptionResponse,
|
||||
FleetsListByResourceGroupNextOptionalParams,
|
||||
FleetsListByResourceGroupOptionalParams,
|
||||
FleetsListByResourceGroupResponse,
|
||||
FleetsGetOptionalParams,
|
||||
FleetsGetResponse,
|
||||
FleetsCreateOrUpdateOptionalParams,
|
||||
FleetsCreateOrUpdateResponse,
|
||||
FleetPatch,
|
||||
FleetsUpdateOptionalParams,
|
||||
FleetsUpdateResponse,
|
||||
FleetsDeleteOptionalParams,
|
||||
FleetsListCredentialsOptionalParams,
|
||||
FleetsListCredentialsResponse,
|
||||
FleetsListBySubscriptionNextResponse,
|
||||
FleetsListByResourceGroupNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Fleets operations. */
|
||||
export class FleetsImpl implements Fleets {
|
||||
private readonly client: ContainerServiceFleetClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Fleets class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: ContainerServiceFleetClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists fleets in the specified subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listBySubscription(
|
||||
options?: FleetsListBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<Fleet> {
|
||||
const iter = this.listBySubscriptionPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings?: PageSettings) => {
|
||||
if (settings?.maxPageSize) {
|
||||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listBySubscriptionPagingPage(options, settings);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listBySubscriptionPagingPage(
|
||||
options?: FleetsListBySubscriptionOptionalParams,
|
||||
settings?: PageSettings
|
||||
): AsyncIterableIterator<Fleet[]> {
|
||||
let result: FleetsListBySubscriptionResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
if (!continuationToken) {
|
||||
result = await this._listBySubscription(options);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
while (continuationToken) {
|
||||
result = await this._listBySubscriptionNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
}
|
||||
|
||||
private async *listBySubscriptionPagingAll(
|
||||
options?: FleetsListBySubscriptionOptionalParams
|
||||
): AsyncIterableIterator<Fleet> {
|
||||
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists fleets in the specified subscription and 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?: FleetsListByResourceGroupOptionalParams
|
||||
): PagedAsyncIterableIterator<Fleet> {
|
||||
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings?: PageSettings) => {
|
||||
if (settings?.maxPageSize) {
|
||||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listByResourceGroupPagingPage(
|
||||
resourceGroupName,
|
||||
options,
|
||||
settings
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listByResourceGroupPagingPage(
|
||||
resourceGroupName: string,
|
||||
options?: FleetsListByResourceGroupOptionalParams,
|
||||
settings?: PageSettings
|
||||
): AsyncIterableIterator<Fleet[]> {
|
||||
let result: FleetsListByResourceGroupResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
if (!continuationToken) {
|
||||
result = await this._listByResourceGroup(resourceGroupName, options);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
while (continuationToken) {
|
||||
result = await this._listByResourceGroupNext(
|
||||
resourceGroupName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
}
|
||||
|
||||
private async *listByResourceGroupPagingAll(
|
||||
resourceGroupName: string,
|
||||
options?: FleetsListByResourceGroupOptionalParams
|
||||
): AsyncIterableIterator<Fleet> {
|
||||
for await (const page of this.listByResourceGroupPagingPage(
|
||||
resourceGroupName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists fleets in the specified subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySubscription(
|
||||
options?: FleetsListBySubscriptionOptionalParams
|
||||
): Promise<FleetsListBySubscriptionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ options },
|
||||
listBySubscriptionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists fleets in the specified subscription and 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?: FleetsListByResourceGroupOptionalParams
|
||||
): Promise<FleetsListByResourceGroupResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, options },
|
||||
listByResourceGroupOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsGetOptionalParams
|
||||
): Promise<FleetsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
resource: Fleet,
|
||||
options?: FleetsCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<FleetsCreateOrUpdateResponse>,
|
||||
FleetsCreateOrUpdateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<FleetsCreateOrUpdateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, resource, options },
|
||||
spec: createOrUpdateOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<
|
||||
FleetsCreateOrUpdateResponse,
|
||||
OperationState<FleetsCreateOrUpdateResponse>
|
||||
>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
resource: Fleet,
|
||||
options?: FleetsCreateOrUpdateOptionalParams
|
||||
): Promise<FleetsCreateOrUpdateResponse> {
|
||||
const poller = await this.beginCreateOrUpdate(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
resource,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param properties The resource properties to be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
update(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
properties: FleetPatch,
|
||||
options?: FleetsUpdateOptionalParams
|
||||
): Promise<FleetsUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, properties, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, options },
|
||||
spec: deleteOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the user credentials of a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listCredentials(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsListCredentialsOptionalParams
|
||||
): Promise<FleetsListCredentialsResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, options },
|
||||
listCredentialsOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListBySubscriptionNext
|
||||
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listBySubscriptionNext(
|
||||
nextLink: string,
|
||||
options?: FleetsListBySubscriptionNextOptionalParams
|
||||
): Promise<FleetsListBySubscriptionNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listBySubscriptionNextOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListByResourceGroupNext
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByResourceGroupNext(
|
||||
resourceGroupName: string,
|
||||
nextLink: string,
|
||||
options?: FleetsListByResourceGroupNextOptionalParams
|
||||
): Promise<FleetsListByResourceGroupNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, nextLink, options },
|
||||
listByResourceGroupNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.resource,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.accept,
|
||||
Parameters.contentType,
|
||||
Parameters.ifMatch,
|
||||
Parameters.ifNoneMatch
|
||||
],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const updateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
|
||||
httpMethod: "PATCH",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Fleet
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.properties,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.accept,
|
||||
Parameters.contentType,
|
||||
Parameters.ifMatch
|
||||
],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.ifMatch],
|
||||
serializer
|
||||
};
|
||||
const listCredentialsOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials",
|
||||
httpMethod: "POST",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetCredentialResults
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.FleetListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -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 "./operations";
|
||||
export * from "./fleets";
|
||||
export * from "./fleetMembers";
|
||||
export * from "./updateRuns";
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* 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, PageSettings } from "@azure/core-paging";
|
||||
import { setContinuationToken } from "../pagingHelper";
|
||||
import { Operations } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { ContainerServiceFleetClient } from "../containerServiceFleetClient";
|
||||
import {
|
||||
Operation,
|
||||
OperationsListNextOptionalParams,
|
||||
OperationsListOptionalParams,
|
||||
OperationsListResponse,
|
||||
OperationsListNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Operations operations. */
|
||||
export class OperationsImpl implements Operations {
|
||||
private readonly client: ContainerServiceFleetClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Operations class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: ContainerServiceFleetClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* List the operations for the provider
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public list(
|
||||
options?: OperationsListOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation> {
|
||||
const iter = this.listPagingAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings?: PageSettings) => {
|
||||
if (settings?.maxPageSize) {
|
||||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listPagingPage(options, settings);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
options?: OperationsListOptionalParams,
|
||||
settings?: PageSettings
|
||||
): AsyncIterableIterator<Operation[]> {
|
||||
let result: OperationsListResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
if (!continuationToken) {
|
||||
result = await this._list(options);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
while (continuationToken) {
|
||||
result = await this._listNext(continuationToken, options);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
options?: OperationsListOptionalParams
|
||||
): AsyncIterableIterator<Operation> {
|
||||
for await (const page of this.listPagingPage(options)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List the operations for the provider
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
options?: OperationsListOptionalParams
|
||||
): Promise<OperationsListResponse> {
|
||||
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* ListNext
|
||||
* @param nextLink The nextLink from the previous successful call to the List method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listNext(
|
||||
nextLink: string,
|
||||
options?: OperationsListNextOptionalParams
|
||||
): Promise<OperationsListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path: "/providers/Microsoft.ContainerService/operations",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
urlParameters: [Parameters.$host, Parameters.nextLink],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,763 @@
|
|||
/*
|
||||
* 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, PageSettings } from "@azure/core-paging";
|
||||
import { setContinuationToken } from "../pagingHelper";
|
||||
import { UpdateRuns } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { ContainerServiceFleetClient } from "../containerServiceFleetClient";
|
||||
import {
|
||||
SimplePollerLike,
|
||||
OperationState,
|
||||
createHttpPoller
|
||||
} from "@azure/core-lro";
|
||||
import { createLroSpec } from "../lroImpl";
|
||||
import {
|
||||
UpdateRun,
|
||||
UpdateRunsListByFleetNextOptionalParams,
|
||||
UpdateRunsListByFleetOptionalParams,
|
||||
UpdateRunsListByFleetResponse,
|
||||
UpdateRunsGetOptionalParams,
|
||||
UpdateRunsGetResponse,
|
||||
UpdateRunsCreateOrUpdateOptionalParams,
|
||||
UpdateRunsCreateOrUpdateResponse,
|
||||
UpdateRunsDeleteOptionalParams,
|
||||
UpdateRunsStartOptionalParams,
|
||||
UpdateRunsStartResponse,
|
||||
UpdateRunsStopOptionalParams,
|
||||
UpdateRunsStopResponse,
|
||||
UpdateRunsListByFleetNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing UpdateRuns operations. */
|
||||
export class UpdateRunsImpl implements UpdateRuns {
|
||||
private readonly client: ContainerServiceFleetClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class UpdateRuns class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: ContainerServiceFleetClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* List UpdateRun resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: UpdateRunsListByFleetOptionalParams
|
||||
): PagedAsyncIterableIterator<UpdateRun> {
|
||||
const iter = this.listByFleetPagingAll(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings?: PageSettings) => {
|
||||
if (settings?.maxPageSize) {
|
||||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listByFleetPagingPage(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options,
|
||||
settings
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listByFleetPagingPage(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: UpdateRunsListByFleetOptionalParams,
|
||||
settings?: PageSettings
|
||||
): AsyncIterableIterator<UpdateRun[]> {
|
||||
let result: UpdateRunsListByFleetResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
if (!continuationToken) {
|
||||
result = await this._listByFleet(resourceGroupName, fleetName, options);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
while (continuationToken) {
|
||||
result = await this._listByFleetNext(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
continuationToken,
|
||||
options
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
setContinuationToken(page, continuationToken);
|
||||
yield page;
|
||||
}
|
||||
}
|
||||
|
||||
private async *listByFleetPagingAll(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: UpdateRunsListByFleetOptionalParams
|
||||
): AsyncIterableIterator<UpdateRun> {
|
||||
for await (const page of this.listByFleetPagingPage(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List UpdateRun resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: UpdateRunsListByFleetOptionalParams
|
||||
): Promise<UpdateRunsListByFleetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, options },
|
||||
listByFleetOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsGetOptionalParams
|
||||
): Promise<UpdateRunsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, updateRunName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
resource: UpdateRun,
|
||||
options?: UpdateRunsCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsCreateOrUpdateResponse>,
|
||||
UpdateRunsCreateOrUpdateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<UpdateRunsCreateOrUpdateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, updateRunName, resource, options },
|
||||
spec: createOrUpdateOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<
|
||||
UpdateRunsCreateOrUpdateResponse,
|
||||
OperationState<UpdateRunsCreateOrUpdateResponse>
|
||||
>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
resource: UpdateRun,
|
||||
options?: UpdateRunsCreateOrUpdateOptionalParams
|
||||
): Promise<UpdateRunsCreateOrUpdateResponse> {
|
||||
const poller = await this.beginCreateOrUpdate(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
resource,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, updateRunName, options },
|
||||
spec: deleteOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginStart(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStartOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsStartResponse>,
|
||||
UpdateRunsStartResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<UpdateRunsStartResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, updateRunName, options },
|
||||
spec: startOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<
|
||||
UpdateRunsStartResponse,
|
||||
OperationState<UpdateRunsStartResponse>
|
||||
>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginStartAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStartOptionalParams
|
||||
): Promise<UpdateRunsStartResponse> {
|
||||
const poller = await this.beginStart(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginStop(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStopOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsStopResponse>,
|
||||
UpdateRunsStopResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<UpdateRunsStopResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperationFn = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = createLroSpec({
|
||||
sendOperationFn,
|
||||
args: { resourceGroupName, fleetName, updateRunName, options },
|
||||
spec: stopOperationSpec
|
||||
});
|
||||
const poller = await createHttpPoller<
|
||||
UpdateRunsStopResponse,
|
||||
OperationState<UpdateRunsStopResponse>
|
||||
>(lro, {
|
||||
restoreFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
resourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginStopAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStopOptionalParams
|
||||
): Promise<UpdateRunsStopResponse> {
|
||||
const poller = await this.beginStop(
|
||||
resourceGroupName,
|
||||
fleetName,
|
||||
updateRunName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* ListByFleetNext
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param nextLink The nextLink from the previous successful call to the ListByFleet method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listByFleetNext(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
nextLink: string,
|
||||
options?: UpdateRunsListByFleetNextOptionalParams
|
||||
): Promise<UpdateRunsListByFleetNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, fleetName, nextLink, options },
|
||||
listByFleetNextOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listByFleetOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRunListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.updateRunName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.resource2,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.updateRunName
|
||||
],
|
||||
headerParameters: [
|
||||
Parameters.accept,
|
||||
Parameters.contentType,
|
||||
Parameters.ifMatch,
|
||||
Parameters.ifNoneMatch
|
||||
],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.updateRunName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.ifMatch],
|
||||
serializer
|
||||
};
|
||||
const startOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start",
|
||||
httpMethod: "POST",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.updateRunName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.ifMatch],
|
||||
serializer
|
||||
};
|
||||
const stopOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop",
|
||||
httpMethod: "POST",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.UpdateRun
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName,
|
||||
Parameters.updateRunName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.ifMatch],
|
||||
serializer
|
||||
};
|
||||
const listByFleetNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.UpdateRunListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.nextLink,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.fleetName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* 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 { SimplePollerLike, OperationState } from "@azure/core-lro";
|
||||
import {
|
||||
FleetMember,
|
||||
FleetMembersListByFleetOptionalParams,
|
||||
FleetMembersGetOptionalParams,
|
||||
FleetMembersGetResponse,
|
||||
FleetMembersCreateOptionalParams,
|
||||
FleetMembersCreateResponse,
|
||||
FleetMemberUpdate,
|
||||
FleetMembersUpdateOptionalParams,
|
||||
FleetMembersUpdateResponse,
|
||||
FleetMembersDeleteOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a FleetMembers. */
|
||||
export interface FleetMembers {
|
||||
/**
|
||||
* List FleetMember resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetMembersListByFleetOptionalParams
|
||||
): PagedAsyncIterableIterator<FleetMember>;
|
||||
/**
|
||||
* Get a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersGetOptionalParams
|
||||
): Promise<FleetMembersGetResponse>;
|
||||
/**
|
||||
* Create a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
resource: FleetMember,
|
||||
options?: FleetMembersCreateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<FleetMembersCreateResponse>,
|
||||
FleetMembersCreateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Create a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
resource: FleetMember,
|
||||
options?: FleetMembersCreateOptionalParams
|
||||
): Promise<FleetMembersCreateResponse>;
|
||||
/**
|
||||
* Update a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param properties The resource properties to be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
update(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
properties: FleetMemberUpdate,
|
||||
options?: FleetMembersUpdateOptionalParams
|
||||
): Promise<FleetMembersUpdateResponse>;
|
||||
/**
|
||||
* Delete a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Delete a FleetMember
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param fleetMemberName The name of the Fleet member resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
fleetMemberName: string,
|
||||
options?: FleetMembersDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
}
|
|
@ -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 { SimplePollerLike, OperationState } from "@azure/core-lro";
|
||||
import {
|
||||
Fleet,
|
||||
FleetsListBySubscriptionOptionalParams,
|
||||
FleetsListByResourceGroupOptionalParams,
|
||||
FleetsGetOptionalParams,
|
||||
FleetsGetResponse,
|
||||
FleetsCreateOrUpdateOptionalParams,
|
||||
FleetsCreateOrUpdateResponse,
|
||||
FleetPatch,
|
||||
FleetsUpdateOptionalParams,
|
||||
FleetsUpdateResponse,
|
||||
FleetsDeleteOptionalParams,
|
||||
FleetsListCredentialsOptionalParams,
|
||||
FleetsListCredentialsResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Fleets. */
|
||||
export interface Fleets {
|
||||
/**
|
||||
* Lists fleets in the specified subscription.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listBySubscription(
|
||||
options?: FleetsListBySubscriptionOptionalParams
|
||||
): PagedAsyncIterableIterator<Fleet>;
|
||||
/**
|
||||
* Lists fleets in the specified subscription and resource group.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByResourceGroup(
|
||||
resourceGroupName: string,
|
||||
options?: FleetsListByResourceGroupOptionalParams
|
||||
): PagedAsyncIterableIterator<Fleet>;
|
||||
/**
|
||||
* Gets a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsGetOptionalParams
|
||||
): Promise<FleetsGetResponse>;
|
||||
/**
|
||||
* Creates or updates a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
resource: Fleet,
|
||||
options?: FleetsCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<FleetsCreateOrUpdateResponse>,
|
||||
FleetsCreateOrUpdateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Creates or updates a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
resource: Fleet,
|
||||
options?: FleetsCreateOrUpdateOptionalParams
|
||||
): Promise<FleetsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Update a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param properties The resource properties to be updated.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
update(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
properties: FleetPatch,
|
||||
options?: FleetsUpdateOptionalParams
|
||||
): Promise<FleetsUpdateResponse>;
|
||||
/**
|
||||
* Delete a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Delete a Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Lists the user credentials of a Fleet.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listCredentials(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: FleetsListCredentialsOptionalParams
|
||||
): Promise<FleetsListCredentialsResponse>;
|
||||
}
|
|
@ -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 "./operations";
|
||||
export * from "./fleets";
|
||||
export * from "./fleetMembers";
|
||||
export * from "./updateRuns";
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Operations. */
|
||||
export interface Operations {
|
||||
/**
|
||||
* List the operations for the provider
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
options?: OperationsListOptionalParams
|
||||
): PagedAsyncIterableIterator<Operation>;
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
/*
|
||||
* 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 { SimplePollerLike, OperationState } from "@azure/core-lro";
|
||||
import {
|
||||
UpdateRun,
|
||||
UpdateRunsListByFleetOptionalParams,
|
||||
UpdateRunsGetOptionalParams,
|
||||
UpdateRunsGetResponse,
|
||||
UpdateRunsCreateOrUpdateOptionalParams,
|
||||
UpdateRunsCreateOrUpdateResponse,
|
||||
UpdateRunsDeleteOptionalParams,
|
||||
UpdateRunsStartOptionalParams,
|
||||
UpdateRunsStartResponse,
|
||||
UpdateRunsStopOptionalParams,
|
||||
UpdateRunsStopResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a UpdateRuns. */
|
||||
export interface UpdateRuns {
|
||||
/**
|
||||
* List UpdateRun resources by Fleet
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listByFleet(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
options?: UpdateRunsListByFleetOptionalParams
|
||||
): PagedAsyncIterableIterator<UpdateRun>;
|
||||
/**
|
||||
* Get a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsGetOptionalParams
|
||||
): Promise<UpdateRunsGetResponse>;
|
||||
/**
|
||||
* Create a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdate(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
resource: UpdateRun,
|
||||
options?: UpdateRunsCreateOrUpdateOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsCreateOrUpdateResponse>,
|
||||
UpdateRunsCreateOrUpdateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Create a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param resource Resource create parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateOrUpdateAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
resource: UpdateRun,
|
||||
options?: UpdateRunsCreateOrUpdateOptionalParams
|
||||
): Promise<UpdateRunsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* Delete a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsDeleteOptionalParams
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Delete a UpdateRun
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Starts an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginStart(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStartOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsStartResponse>,
|
||||
UpdateRunsStartResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Starts an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginStartAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStartOptionalParams
|
||||
): Promise<UpdateRunsStartResponse>;
|
||||
/**
|
||||
* Stops an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginStop(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStopOptionalParams
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<UpdateRunsStopResponse>,
|
||||
UpdateRunsStopResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Stops an UpdateRun.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param fleetName The name of the Fleet resource.
|
||||
* @param updateRunName The name of the UpdateRun resource.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginStopAndWait(
|
||||
resourceGroupName: string,
|
||||
fleetName: string,
|
||||
updateRunName: string,
|
||||
options?: UpdateRunsStopOptionalParams
|
||||
): Promise<UpdateRunsStopResponse>;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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 interface PageInfo {
|
||||
continuationToken?: string;
|
||||
}
|
||||
|
||||
const pageMap = new WeakMap<object, PageInfo>();
|
||||
|
||||
/**
|
||||
* Given the last `.value` produced by the `byPage` iterator,
|
||||
* returns a continuation token that can be used to begin paging from
|
||||
* that point later.
|
||||
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
||||
* @returns The continuation token that can be passed into byPage() during future calls.
|
||||
*/
|
||||
export function getContinuationToken(page: unknown): string | undefined {
|
||||
if (typeof page !== "object" || page === null) {
|
||||
return undefined;
|
||||
}
|
||||
return pageMap.get(page)?.continuationToken;
|
||||
}
|
||||
|
||||
export function setContinuationToken(
|
||||
page: unknown,
|
||||
continuationToken: string | undefined
|
||||
): void {
|
||||
if (typeof page !== "object" || page === null || !continuationToken) {
|
||||
return;
|
||||
}
|
||||
const pageInfo = pageMap.get(page) ?? {};
|
||||
pageInfo.continuationToken = continuationToken;
|
||||
pageMap.set(page, pageInfo);
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import {
|
||||
env,
|
||||
Recorder,
|
||||
RecorderStartOptions,
|
||||
delay,
|
||||
isPlaybackMode,
|
||||
} from "@azure-tools/test-recorder";
|
||||
import { createTestCredential } from "@azure-tools/test-credential";
|
||||
import { assert } from "chai";
|
||||
import { Context } from "mocha";
|
||||
import { ContainerServiceFleetClient } from "../src/containerServiceFleetClient";
|
||||
|
||||
const replaceableVariables: Record<string, string> = {
|
||||
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"
|
||||
};
|
||||
|
||||
const recorderOptions: RecorderStartOptions = {
|
||||
envSetupForPlayback: replaceableVariables
|
||||
};
|
||||
|
||||
export const testPollingOptions = {
|
||||
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
||||
};
|
||||
|
||||
describe("containerservicefleet test", () => {
|
||||
let recorder: Recorder;
|
||||
let subscriptionId: string;
|
||||
let client: ContainerServiceFleetClient;
|
||||
let location: string;
|
||||
let resourceGroup: string;
|
||||
let resourceName: string;
|
||||
|
||||
beforeEach(async function (this: Context) {
|
||||
recorder = new Recorder(this.currentTest);
|
||||
await recorder.start(recorderOptions);
|
||||
subscriptionId = env.SUBSCRIPTION_ID || '';
|
||||
// This is an example of how the environment variables are used
|
||||
const credential = createTestCredential();
|
||||
client = new ContainerServiceFleetClient(credential, subscriptionId, recorder.configureClientOptions({}));
|
||||
location = "eastus";
|
||||
resourceGroup = "myjstest";
|
||||
resourceName = "testresource-12a"
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("fleets create test", async function () {
|
||||
const res = await client.fleets.beginCreateOrUpdateAndWait(
|
||||
resourceGroup,
|
||||
resourceName,
|
||||
{
|
||||
hubProfile: { dnsPrefix: "dnsprefix1" },
|
||||
location,
|
||||
tags: { archv2: "", tier: "production" }
|
||||
},
|
||||
testPollingOptions);
|
||||
assert.equal(res.name, resourceName);
|
||||
});
|
||||
|
||||
it("fleets get test", async function () {
|
||||
const res = await client.fleets.get(resourceGroup,
|
||||
resourceName);
|
||||
assert.equal(res.name, resourceName);
|
||||
});
|
||||
|
||||
it("fleets list test", async function () {
|
||||
const resArray = new Array();
|
||||
for await (let item of client.fleets.listByResourceGroup(resourceGroup)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
assert.equal(resArray.length, 1);
|
||||
});
|
||||
|
||||
it("fleets delete test", async function () {
|
||||
const resArray = new Array();
|
||||
const res = await client.fleets.beginDeleteAndWait(resourceGroup, resourceName)
|
||||
for await (let item of client.fleets.listByResourceGroup(resourceGroup)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
assert.equal(resArray.length, 0);
|
||||
});
|
||||
})
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"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,
|
||||
"paths": {
|
||||
"@azure/arm-containerservicefleet": [
|
||||
"./src/index"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts",
|
||||
"samples-dev/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -11,6 +11,7 @@ trigger:
|
|||
- sdk/containerservice/ci.mgmt.yml
|
||||
- sdk/containerservice/arm-containerservice
|
||||
- sdk/containerservice/arm-containerservice-rest
|
||||
- sdk/containerservice/arm-containerservicefleet
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
|
@ -25,6 +26,7 @@ pr:
|
|||
- sdk/containerservice/ci.mgmt.yml
|
||||
- sdk/containerservice/arm-containerservice
|
||||
- sdk/containerservice/arm-containerservice-rest
|
||||
- sdk/containerservice/arm-containerservicefleet
|
||||
extends:
|
||||
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
|
@ -34,3 +36,5 @@ extends:
|
|||
safeName: azurearmcontainerservice
|
||||
- name: azure-rest-arm-containerservice
|
||||
safeName: azurerestarmcontainerservice
|
||||
- name: azure-arm-containerservicefleet
|
||||
safeName: azurearmcontainerservicefleet
|
||||
|
|
Загрузка…
Ссылка в новой задаче