diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 02c02922362f..260485c1d1f9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1903,6 +1903,18 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: false + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: false + /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -2327,6 +2339,13 @@ packages: '@opentelemetry/core': 1.17.0(@opentelemetry/api@1.6.0) dev: false + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: false + optional: true + /@protobufjs/aspromise@1.1.2: resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} dev: false @@ -3392,6 +3411,11 @@ packages: engines: {node: '>=8'} dev: false + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: false + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -3406,6 +3430,11 @@ packages: color-convert: 2.0.1 dev: false + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: false + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -4431,6 +4460,10 @@ packages: typescript: 5.3.0-dev.20230914 dev: false + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: false + /ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} dependencies: @@ -4457,6 +4490,10 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: false + /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -5204,6 +5241,14 @@ packages: signal-exit: 3.0.7 dev: false + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: false + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -5384,13 +5429,25 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false + /glob@10.3.4: + resolution: {integrity: sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.3 + minimatch: 9.0.3 + minipass: 7.0.3 + path-scurry: 1.10.1 + dev: false + /glob@7.1.3: resolution: {integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==} dependencies: 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 @@ -6069,6 +6126,15 @@ packages: istanbul-lib-report: 3.0.1 dev: false + /jackspeak@2.3.3: + resolution: {integrity: sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: false + /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: false @@ -6594,6 +6660,11 @@ packages: get-func-name: 2.0.0 dev: false + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: false + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -6836,6 +6907,13 @@ packages: brace-expansion: 2.0.1 dev: false + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false @@ -6845,6 +6923,11 @@ packages: engines: {node: '>=8'} dev: false + /minipass@7.0.3: + resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} + engines: {node: '>=16 || 14 >=14.17'} + dev: false + /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} dev: false @@ -7476,6 +7559,14 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: false + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.0.1 + minipass: 7.0.3 + dev: false + /path-scurry@1.6.3: resolution: {integrity: sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==} engines: {node: '>=16 || 14 >=14.17'} @@ -8058,6 +8149,14 @@ packages: glob: 7.2.3 dev: false + /rimraf@5.0.1: + resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.4 + dev: false + /rollup-plugin-polyfill-node@0.12.0(rollup@2.79.1): resolution: {integrity: sha512-PWEVfDxLEKt8JX1nZ0NkUAgXpkZMTb85rO/Ru9AQ69wYW8VUCfDgP4CGRXXWYni5wDF0vIeR1UoF3Jmw/Lt3Ug==} peerDependencies: @@ -8310,6 +8409,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: false + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: false + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: false @@ -8503,6 +8607,15 @@ packages: strip-ansi: 6.0.1 dev: false + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: false + /string.prototype.padend@3.1.5: resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} engines: {node: '>= 0.4'} @@ -8574,6 +8687,13 @@ packages: ansi-regex: 5.0.1 dev: false + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: false + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -9255,6 +9375,15 @@ packages: strip-ansi: 6.0.1 dev: false + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: false + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false @@ -11658,7 +11787,7 @@ packages: dev: false file:projects/arm-containerservicefleet.tgz: - resolution: {integrity: sha512-7n3X8ly60cnmnXMU69LBOpMgmo8uFZEAA6Eo0oXNJzZs+6GMcFHxK0IIWfU1VN7f2WovQjWtVFQSpJZSpaqEmQ==, tarball: file:projects/arm-containerservicefleet.tgz} + resolution: {integrity: sha512-y64Bmx3z0z7jugNmfRqSPSG8gY/MdxfFQUzMsrCAqWyaUNBT4mfJbx5qu0QKcVBKPfvydmuncji6P0dUktI+LA==, tarball: file:projects/arm-containerservicefleet.tgz} name: '@rush-temp/arm-containerservicefleet' version: 0.0.0 dependencies: @@ -11675,7 +11804,7 @@ packages: dotenv: 16.3.1 mkdirp: 2.1.6 mocha: 7.2.0 - rimraf: 3.0.2 + rimraf: 5.0.1 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.59)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.59)(typescript@5.0.4) diff --git a/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md b/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md index c858dce3dee2..138152cd66f6 100644 --- a/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 1.0.0-beta.3 (2023-09-15) + +**Features** + + - Added operation group FleetUpdateStrategies + - Added Interface FleetUpdateStrategiesCreateOrUpdateHeaders + - Added Interface FleetUpdateStrategiesCreateOrUpdateOptionalParams + - Added Interface FleetUpdateStrategiesDeleteHeaders + - Added Interface FleetUpdateStrategiesDeleteOptionalParams + - Added Interface FleetUpdateStrategiesGetOptionalParams + - Added Interface FleetUpdateStrategiesListByFleetNextOptionalParams + - Added Interface FleetUpdateStrategiesListByFleetOptionalParams + - Added Interface FleetUpdateStrategy + - Added Interface FleetUpdateStrategyListResult + - Added Type Alias FleetUpdateStrategiesCreateOrUpdateResponse + - Added Type Alias FleetUpdateStrategiesGetResponse + - Added Type Alias FleetUpdateStrategiesListByFleetNextResponse + - Added Type Alias FleetUpdateStrategiesListByFleetResponse + - Added Type Alias FleetUpdateStrategyProvisioningState + - Interface AgentProfile has a new optional parameter vmSize + - Interface FleetHubProfile has a new optional parameter portalFqdn + - Interface UpdateRun has a new optional parameter updateStrategyId + - Added Enum KnownFleetUpdateStrategyProvisioningState + + ## 1.0.0-beta.2 (2023-09-08) **Features** diff --git a/sdk/containerservice/arm-containerservicefleet/_meta.json b/sdk/containerservice/arm-containerservicefleet/_meta.json index b1ca8bda2d3b..97f33ec8c191 100644 --- a/sdk/containerservice/arm-containerservicefleet/_meta.json +++ b/sdk/containerservice/arm-containerservicefleet/_meta.json @@ -1,8 +1,8 @@ { - "commit": "241397aafd74aaad6161cd0058449f9eb6d5163c", + "commit": "28528c8d636178ba5ed1ea21e4f7e117de503b35", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\fleet\\readme.md --use=@autorest/typescript@6.0.8 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.8" + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservicefleet/package.json b/sdk/containerservice/arm-containerservicefleet/package.json index 2e99f4e1025d..0c522e698c13 100644 --- a/sdk/containerservice/arm-containerservicefleet/package.json +++ b/sdk/containerservice/arm-containerservicefleet/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceFleetClient.", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "engines": { "node": ">=14.0.0" }, @@ -38,7 +38,7 @@ "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", @@ -84,7 +84,7 @@ "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", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,13 +112,5 @@ ] }, "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" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md b/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md index ee2f262cbce5..a8bf88d3a8b2 100644 --- a/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md +++ b/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md @@ -16,6 +16,7 @@ export type ActionType = string; // @public export interface AgentProfile { subnetId?: string; + vmSize?: string; } // @public @@ -37,6 +38,8 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient { // (undocumented) fleets: Fleets; // (undocumented) + fleetUpdateStrategies: FleetUpdateStrategies; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -100,6 +103,7 @@ export interface FleetHubProfile { dnsPrefix?: string; readonly fqdn?: string; readonly kubernetesVersion?: string; + readonly portalFqdn?: string; } // @public @@ -320,6 +324,82 @@ export interface FleetsUpdateOptionalParams extends coreClient.OperationOptions // @public export type FleetsUpdateResponse = Fleet; +// @public +export interface FleetUpdateStrategies { + beginCreateOrUpdate(resourceGroupName: string, fleetName: string, updateStrategyName: string, resource: FleetUpdateStrategy, options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams): Promise, FleetUpdateStrategiesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, fleetName: string, updateStrategyName: string, resource: FleetUpdateStrategy, options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, fleetName: string, updateStrategyName: string, options?: FleetUpdateStrategiesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, fleetName: string, updateStrategyName: string, options?: FleetUpdateStrategiesDeleteOptionalParams): Promise; + get(resourceGroupName: string, fleetName: string, updateStrategyName: string, options?: FleetUpdateStrategiesGetOptionalParams): Promise; + listByFleet(resourceGroupName: string, fleetName: string, options?: FleetUpdateStrategiesListByFleetOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FleetUpdateStrategiesCreateOrUpdateHeaders { + retryAfter?: number; +} + +// @public +export interface FleetUpdateStrategiesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FleetUpdateStrategiesCreateOrUpdateResponse = FleetUpdateStrategy; + +// @public +export interface FleetUpdateStrategiesDeleteHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FleetUpdateStrategiesDeleteOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FleetUpdateStrategiesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetUpdateStrategiesGetResponse = FleetUpdateStrategy; + +// @public +export interface FleetUpdateStrategiesListByFleetNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetUpdateStrategiesListByFleetNextResponse = FleetUpdateStrategyListResult; + +// @public +export interface FleetUpdateStrategiesListByFleetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetUpdateStrategiesListByFleetResponse = FleetUpdateStrategyListResult; + +// @public +export interface FleetUpdateStrategy extends ProxyResource { + readonly eTag?: string; + readonly provisioningState?: FleetUpdateStrategyProvisioningState; + strategy?: UpdateRunStrategy; +} + +// @public +export interface FleetUpdateStrategyListResult { + nextLink?: string; + value: FleetUpdateStrategy[]; +} + +// @public +export type FleetUpdateStrategyProvisioningState = string; + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -356,6 +436,13 @@ export enum KnownFleetProvisioningState { Updating = "Updating" } +// @public +export enum KnownFleetUpdateStrategyProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + // @public export enum KnownManagedClusterUpgradeType { Full = "Full", @@ -550,6 +637,7 @@ export interface UpdateRun extends ProxyResource { readonly provisioningState?: UpdateRunProvisioningState; readonly status?: UpdateRunStatus; strategy?: UpdateRunStrategy; + updateStrategyId?: string; } // @public diff --git a/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts b/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts index ea68914e80f0..09444b0554a6 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts @@ -18,13 +18,15 @@ import { OperationsImpl, FleetsImpl, FleetMembersImpl, - UpdateRunsImpl + UpdateRunsImpl, + FleetUpdateStrategiesImpl } from "./operations"; import { Operations, Fleets, FleetMembers, - UpdateRuns + UpdateRuns, + FleetUpdateStrategies } from "./operationsInterfaces"; import { ContainerServiceFleetClientOptionalParams } from "./models"; @@ -60,7 +62,7 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservicefleet/1.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-containerservicefleet/1.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -113,11 +115,12 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-06-15-preview"; + this.apiVersion = options.apiVersion || "2023-08-15-preview"; this.operations = new OperationsImpl(this); this.fleets = new FleetsImpl(this); this.fleetMembers = new FleetMembersImpl(this); this.updateRuns = new UpdateRunsImpl(this); + this.fleetUpdateStrategies = new FleetUpdateStrategiesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -153,4 +156,5 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient { fleets: Fleets; fleetMembers: FleetMembers; updateRuns: UpdateRuns; + fleetUpdateStrategies: FleetUpdateStrategies; } diff --git a/sdk/containerservice/arm-containerservicefleet/src/models/index.ts b/sdk/containerservice/arm-containerservicefleet/src/models/index.ts index b39ab6518e73..a40fddc69906 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/models/index.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/models/index.ts @@ -147,6 +147,11 @@ export interface FleetHubProfile { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly kubernetesVersion?: string; + /** + * The Azure Portal FQDN of the Fleet hub. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalFqdn?: string; } /** Access profile for the Fleet hub API server. */ @@ -163,6 +168,8 @@ export interface APIServerAccessProfile { export interface AgentProfile { /** The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. */ subnetId?: string; + /** The virtual machine size of the Fleet hub. */ + vmSize?: string; } /** Managed service identity (system assigned and/or user assigned identities) */ @@ -290,26 +297,25 @@ export interface UpdateRunListResult { nextLink?: string; } -/** The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. */ +/** + * Defines the update sequence of the clusters via stages and groups. + * + * Stages within a run are executed sequentially one after another. + * Groups within a stage are executed in parallel. + * Member clusters within a group are updated sequentially one after another. + * + * A valid strategy contains no duplicate groups within or across stages. + */ export interface UpdateRunStrategy { - /** The list of stages that compose this update run. */ + /** The list of stages that compose this update run. Min size: 1. */ 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. - */ +/** Defines a stage which contains the groups to update and the steps to take (e.g., wait for a time period) before starting the next stage. */ 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. - */ + /** Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1. */ 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; @@ -318,9 +324,8 @@ export interface UpdateStage { /** 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 of the group. + * It must match a group name of an existing fleet member. */ name: string; } @@ -498,6 +503,14 @@ export interface NodeImageVersion { readonly version?: string; } +/** The response of a FleetUpdateStrategy list operation. */ +export interface FleetUpdateStrategyListResult { + /** The FleetUpdateStrategy items on this page */ + value: FleetUpdateStrategy[]; + /** The link to the next page of items */ + nextLink?: string; +} + /** 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. */ @@ -545,7 +558,7 @@ export interface FleetMember extends ProxyResource { readonly provisioningState?: FleetMemberProvisioningState; } -/** An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. */ +/** 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. @@ -557,6 +570,21 @@ export interface UpdateRun extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: UpdateRunProvisioningState; + /** + * The resource id of the FleetUpdateStrategy resource to reference. + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + */ + updateStrategyId?: string; /** * 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. @@ -572,6 +600,22 @@ export interface UpdateRun extends ProxyResource { readonly status?: UpdateRunStatus; } +/** Defines a multi-stage process to perform update operations across members of a Fleet. */ +export interface FleetUpdateStrategy 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 UpdateStrategy resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: FleetUpdateStrategyProvisioningState; + /** Defines the update sequence of the clusters. */ + strategy?: UpdateRunStrategy; +} + /** 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. */ @@ -646,6 +690,20 @@ export interface UpdateRunsStopHeaders { location?: string; } +/** Defines headers for FleetUpdateStrategies_createOrUpdate operation. */ +export interface FleetUpdateStrategiesCreateOrUpdateHeaders { + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for FleetUpdateStrategies_delete operation. */ +export interface FleetUpdateStrategiesDeleteHeaders { + /** 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 */ @@ -880,6 +938,27 @@ export enum KnownUpdateState { */ export type UpdateState = string; +/** Known values of {@link FleetUpdateStrategyProvisioningState} that the service accepts. */ +export enum KnownFleetUpdateStrategyProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled" +} + +/** + * Defines values for FleetUpdateStrategyProvisioningState. \ + * {@link KnownFleetUpdateStrategyProvisioningState} can be used interchangeably with FleetUpdateStrategyProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type FleetUpdateStrategyProvisioningState = string; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -1114,6 +1193,54 @@ export interface UpdateRunsListByFleetNextOptionalParams /** Contains response data for the listByFleetNext operation. */ export type UpdateRunsListByFleetNextResponse = UpdateRunListResult; +/** Optional parameters. */ +export interface FleetUpdateStrategiesListByFleetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFleet operation. */ +export type FleetUpdateStrategiesListByFleetResponse = FleetUpdateStrategyListResult; + +/** Optional parameters. */ +export interface FleetUpdateStrategiesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FleetUpdateStrategiesGetResponse = FleetUpdateStrategy; + +/** Optional parameters. */ +export interface FleetUpdateStrategiesCreateOrUpdateOptionalParams + 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 FleetUpdateStrategiesCreateOrUpdateResponse = FleetUpdateStrategy; + +/** Optional parameters. */ +export interface FleetUpdateStrategiesDeleteOptionalParams + 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 FleetUpdateStrategiesListByFleetNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFleetNext operation. */ +export type FleetUpdateStrategiesListByFleetNextResponse = FleetUpdateStrategyListResult; + /** Optional parameters. */ export interface ContainerServiceFleetClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts b/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts index 89f0add422bd..ba6f91f14dda 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts @@ -287,6 +287,13 @@ export const FleetHubProfile: coreClient.CompositeMapper = { type: { name: "String" } + }, + portalFqdn: { + serializedName: "portalFqdn", + readOnly: true, + type: { + name: "String" + } } } } @@ -329,6 +336,12 @@ export const AgentProfile: coreClient.CompositeMapper = { type: { name: "String" } + }, + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } } } } @@ -1022,6 +1035,34 @@ export const NodeImageVersion: coreClient.CompositeMapper = { } }; +export const FleetUpdateStrategyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetUpdateStrategyListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FleetUpdateStrategy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1155,6 +1196,12 @@ export const UpdateRun: coreClient.CompositeMapper = { name: "String" } }, + updateStrategyId: { + serializedName: "properties.updateStrategyId", + type: { + name: "String" + } + }, strategy: { serializedName: "properties.strategy", type: { @@ -1180,6 +1227,37 @@ export const UpdateRun: coreClient.CompositeMapper = { } }; +export const FleetUpdateStrategy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetUpdateStrategy", + modelProperties: { + ...ProxyResource.type.modelProperties, + eTag: { + serializedName: "eTag", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + strategy: { + serializedName: "properties.strategy", + type: { + name: "Composite", + className: "UpdateRunStrategy" + } + } + } + } +}; + export const FleetsCreateOrUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1371,3 +1449,39 @@ export const UpdateRunsStopHeaders: coreClient.CompositeMapper = { } } }; + +export const FleetUpdateStrategiesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetUpdateStrategiesCreateOrUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const FleetUpdateStrategiesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetUpdateStrategiesDeleteHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/containerservice/arm-containerservicefleet/src/models/parameters.ts b/sdk/containerservice/arm-containerservicefleet/src/models/parameters.ts index 3e50f21704f8..e10314f461ae 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/models/parameters.ts @@ -16,7 +16,8 @@ import { FleetPatch as FleetPatchMapper, FleetMember as FleetMemberMapper, FleetMemberUpdate as FleetMemberUpdateMapper, - UpdateRun as UpdateRunMapper + UpdateRun as UpdateRunMapper, + FleetUpdateStrategy as FleetUpdateStrategyMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -46,7 +47,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-06-15-preview", + defaultValue: "2023-08-15-preview", isConstant: true, serializedName: "api-version", type: { @@ -200,3 +201,24 @@ export const resource2: OperationParameter = { parameterPath: "resource", mapper: UpdateRunMapper }; + +export const updateStrategyName: OperationURLParameter = { + parameterPath: "updateStrategyName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"), + MaxLength: 50, + MinLength: 1 + }, + serializedName: "updateStrategyName", + required: true, + type: { + name: "String" + } + } +}; + +export const resource3: OperationParameter = { + parameterPath: "resource", + mapper: FleetUpdateStrategyMapper +}; diff --git a/sdk/containerservice/arm-containerservicefleet/src/operations/fleetUpdateStrategies.ts b/sdk/containerservice/arm-containerservicefleet/src/operations/fleetUpdateStrategies.ts new file mode 100644 index 000000000000..4252a83e3216 --- /dev/null +++ b/sdk/containerservice/arm-containerservicefleet/src/operations/fleetUpdateStrategies.ts @@ -0,0 +1,509 @@ +/* + * 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 { FleetUpdateStrategies } 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 { + FleetUpdateStrategy, + FleetUpdateStrategiesListByFleetNextOptionalParams, + FleetUpdateStrategiesListByFleetOptionalParams, + FleetUpdateStrategiesListByFleetResponse, + FleetUpdateStrategiesGetOptionalParams, + FleetUpdateStrategiesGetResponse, + FleetUpdateStrategiesCreateOrUpdateOptionalParams, + FleetUpdateStrategiesCreateOrUpdateResponse, + FleetUpdateStrategiesDeleteOptionalParams, + FleetUpdateStrategiesListByFleetNextResponse +} from "../models"; + +/// +/** Class containing FleetUpdateStrategies operations. */ +export class FleetUpdateStrategiesImpl implements FleetUpdateStrategies { + private readonly client: ContainerServiceFleetClient; + + /** + * Initialize a new instance of the class FleetUpdateStrategies class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceFleetClient) { + this.client = client; + } + + /** + * List FleetUpdateStrategy 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?: FleetUpdateStrategiesListByFleetOptionalParams + ): PagedAsyncIterableIterator { + 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?: FleetUpdateStrategiesListByFleetOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FleetUpdateStrategiesListByFleetResponse; + 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?: FleetUpdateStrategiesListByFleetOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByFleetPagingPage( + resourceGroupName, + fleetName, + options + )) { + yield* page; + } + } + + /** + * List FleetUpdateStrategy 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?: FleetUpdateStrategiesListByFleetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, options }, + listByFleetOperationSpec + ); + } + + /** + * Get a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, updateStrategyName, options }, + getOperationSpec + ); + } + + /** + * Create a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + resource: FleetUpdateStrategy, + options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FleetUpdateStrategiesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + 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, + updateStrategyName, + resource, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + FleetUpdateStrategiesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + resource: FleetUpdateStrategy, + options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + fleetName, + updateStrategyName, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + 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, updateStrategyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + fleetName, + updateStrategyName, + 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?: FleetUpdateStrategiesListByFleetNextOptionalParams + ): Promise { + 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}/updateStrategies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetUpdateStrategyListResult + }, + 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}/updateStrategies/{updateStrategyName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetUpdateStrategy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.updateStrategyName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FleetUpdateStrategy + }, + 201: { + bodyMapper: Mappers.FleetUpdateStrategy + }, + 202: { + bodyMapper: Mappers.FleetUpdateStrategy + }, + 204: { + bodyMapper: Mappers.FleetUpdateStrategy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.updateStrategyName + ], + 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}/updateStrategies/{updateStrategyName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.updateStrategyName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch], + serializer +}; +const listByFleetNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetUpdateStrategyListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservicefleet/src/operations/index.ts b/sdk/containerservice/arm-containerservicefleet/src/operations/index.ts index c3bd93002e47..6f4281d1da5b 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/operations/index.ts @@ -10,3 +10,4 @@ export * from "./operations"; export * from "./fleets"; export * from "./fleetMembers"; export * from "./updateRuns"; +export * from "./fleetUpdateStrategies"; diff --git a/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/fleetUpdateStrategies.ts b/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/fleetUpdateStrategies.ts new file mode 100644 index 000000000000..911652d7bbdf --- /dev/null +++ b/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/fleetUpdateStrategies.ts @@ -0,0 +1,109 @@ +/* + * 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 { + FleetUpdateStrategy, + FleetUpdateStrategiesListByFleetOptionalParams, + FleetUpdateStrategiesGetOptionalParams, + FleetUpdateStrategiesGetResponse, + FleetUpdateStrategiesCreateOrUpdateOptionalParams, + FleetUpdateStrategiesCreateOrUpdateResponse, + FleetUpdateStrategiesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a FleetUpdateStrategies. */ +export interface FleetUpdateStrategies { + /** + * List FleetUpdateStrategy 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?: FleetUpdateStrategiesListByFleetOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesGetOptionalParams + ): Promise; + /** + * Create a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + resource: FleetUpdateStrategy, + options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FleetUpdateStrategiesCreateOrUpdateResponse + > + >; + /** + * Create a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + resource: FleetUpdateStrategy, + options?: FleetUpdateStrategiesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a FleetUpdateStrategy + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + updateStrategyName: string, + options?: FleetUpdateStrategiesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/index.ts index c3bd93002e47..6f4281d1da5b 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/operationsInterfaces/index.ts @@ -10,3 +10,4 @@ export * from "./operations"; export * from "./fleets"; export * from "./fleetMembers"; export * from "./updateRuns"; +export * from "./fleetUpdateStrategies"; diff --git a/sdk/containerservice/arm-containerservicefleet/test/sampleTest.ts b/sdk/containerservice/arm-containerservicefleet/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerservice/arm-containerservicefleet/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + 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 +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerservice/arm-containerservicefleet/tsconfig.json b/sdk/containerservice/arm-containerservicefleet/tsconfig.json index c25c8faa4dad..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservicefleet/tsconfig.json +++ b/sdk/containerservice/arm-containerservicefleet/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservicefleet": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"