diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 901d224a379a..a7acdfba9ffb 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2305,6 +2305,24 @@ packages: - supports-color dev: false + /@rollup/plugin-commonjs@24.1.0(rollup@2.79.1): + resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.27.0 + rollup: 2.79.1 + dev: false + /@rollup/plugin-commonjs@25.0.7(rollup@3.29.4): resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} engines: {node: '>=14.0.0'} @@ -2338,6 +2356,19 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-json@6.0.1(rollup@2.79.1): + resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + rollup: 2.79.1 + dev: false + /@rollup/plugin-json@6.0.1(rollup@3.29.4): resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} engines: {node: '>=14.0.0'} @@ -2351,6 +2382,20 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-multi-entry@6.0.1(rollup@2.79.1): + resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@2.79.1) + matched: 5.0.1 + rollup: 2.79.1 + dev: false + /@rollup/plugin-multi-entry@6.0.1(rollup@3.29.4): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} @@ -2365,6 +2410,21 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-node-resolve@13.3.0(rollup@2.79.1): + resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@types/resolve': 1.17.1 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.8 + rollup: 2.79.1 + dev: false + /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -2383,6 +2443,18 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-virtual@3.0.2(rollup@2.79.1): + resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 2.79.1 + dev: false + /@rollup/plugin-virtual@3.0.2(rollup@3.29.4): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} @@ -2395,6 +2467,33 @@ packages: rollup: 3.29.4 dev: false + /@rollup/pluginutils@3.1.0(rollup@2.79.1): + resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: false + + /@rollup/pluginutils@5.0.5(rollup@2.79.1): + resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.3 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: false + /@rollup/pluginutils@5.0.5(rollup@3.29.4): resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} engines: {node: '>=14.0.0'} @@ -2576,7 +2675,7 @@ packages: /@types/cors@2.8.15: resolution: {integrity: sha512-n91JxbNLD8eQIuXDIChAN1tCKNWCEgpceU9b7ZMbFA+P+Q4yIeh80jizFLEvolRPc1ES0VdwFlGv+kJTSirogw==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/debug@4.1.10: @@ -2598,6 +2697,10 @@ packages: '@types/json-schema': 7.0.13 dev: false + /@types/estree@0.0.39: + resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} + dev: false + /@types/estree@1.0.3: resolution: {integrity: sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==} dev: false @@ -2623,7 +2726,7 @@ packages: /@types/fs-extra@8.1.3: resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/fs-extra@9.0.13: @@ -2717,7 +2820,7 @@ packages: /@types/mysql@2.15.22: resolution: {integrity: sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/node-fetch@2.6.6: @@ -2748,7 +2851,7 @@ packages: /@types/pg@8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2773,6 +2876,12 @@ packages: resolution: {integrity: sha512-xrO9OoVPqFuYyR/loIHjnbvvyRZREYKLjxV4+dY6v3FQR3stQ9ZxIGkaclF7YhI9hfjpuTbu14hZEy94qKLtOA==} dev: false + /@types/resolve@1.17.1: + resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} + dependencies: + '@types/node': 18.18.6 + dev: false + /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: false @@ -2827,7 +2936,7 @@ packages: /@types/through@0.0.31: resolution: {integrity: sha512-LpKpmb7FGevYgXnBXYs6HWnmiFyVG07Pt1cnbgM1IhEacITTiUaBXXvOR3Y50ksaJWGSfhbEvQFivQEFGCC55w==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/tough-cookie@4.0.3: @@ -3267,6 +3376,12 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false + /atob@2.1.2: + resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} + engines: {node: '>= 4.5.0'} + hasBin: true + dev: false + /autorest@3.6.3: resolution: {integrity: sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==} engines: {node: '>=12.0.0'} @@ -3921,6 +4036,11 @@ packages: engines: {node: '>=10'} dev: false + /decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} + dev: false + /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -4131,7 +4251,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231018 + typescript: 5.3.0-dev.20231019 dev: false /eastasianwidth@0.2.0: @@ -4190,7 +4310,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.15 - '@types/node': 16.18.58 + '@types/node': 18.18.6 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4575,6 +4695,10 @@ packages: engines: {node: '>=4.0'} dev: false + /estree-walker@1.0.1: + resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} + dev: false + /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: false @@ -7813,6 +7937,22 @@ packages: rollup: 3.29.4 dev: false + /rollup-plugin-sourcemaps@0.6.3(@types/node@16.18.58)(rollup@2.79.1): + resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} + engines: {node: '>=10.0.0'} + peerDependencies: + '@types/node': '>=10.0.0' + rollup: '>=0.31.2' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@types/node': 16.18.58 + rollup: 2.79.1 + source-map-resolve: 0.6.0 + dev: false + /rollup-plugin-visualizer@5.9.2(rollup@3.29.4): resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} @@ -7830,6 +7970,14 @@ packages: yargs: 17.7.2 dev: false + /rollup@2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: false + /rollup@3.29.4: resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -8103,6 +8251,14 @@ packages: - utf-8-validate dev: false + /source-map-resolve@0.6.0: + resolution: {integrity: sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==} + deprecated: See https://github.com/lydell/source-map-resolve#deprecated + dependencies: + atob: 2.1.2 + decode-uri-component: 0.2.2 + dev: false + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -8687,8 +8843,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231018: - resolution: {integrity: sha512-qBPaVi+ntB9Ys4T3uP1ZYCtxFWIV/1ieooBDhFEd8nw4IqAoB/Us7XobF3xb756bnX8cS/zIt9fgukde4MG4bA==} + /typescript@5.3.0-dev.20231019: + resolution: {integrity: sha512-fdexB8vj46ZSMsAg6g5aSNjThPegwT73WYwNM1DLmEnt0+fKPmmyft3LzfUR1CMHtcQNic5hl+0FeNTv7l232Q==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -11028,19 +11184,27 @@ packages: dev: false file:projects/arm-containerservicefleet.tgz: - resolution: {integrity: sha512-5VC5HT8MInpuL79XeEv0C8we8OkmhTzJeu8QCtmG7OQ/XsGf2eZjQ+ZfsrLAmud+CgwVk5/K3xDOqZ0Yacf5TA==, tarball: file:projects/arm-containerservicefleet.tgz} + resolution: {integrity: sha512-QD6y4+MK67fgC4TIudjxHnmY/C9fPx8BUabUNOz/t5YWGbxs8rr6d0N2T2fmkuqBcbhFmukBbYCv7RHssKd4gQ==, tarball: file:projects/arm-containerservicefleet.tgz} name: '@rush-temp/arm-containerservicefleet' version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) + '@rollup/plugin-json': 6.0.1(rollup@2.79.1) + '@rollup/plugin-multi-entry': 6.0.1(rollup@2.79.1) + '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.9 + '@types/mocha': 10.0.2 '@types/node': 16.18.58 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.58)(rollup@2.79.1) ts-node: 10.9.1(@types/node@16.18.58)(typescript@5.0.4) tslib: 2.6.2 typescript: 5.0.4 diff --git a/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md b/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md index 53babf91a8e3..11704b63f583 100644 --- a/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservicefleet/CHANGELOG.md @@ -1,45 +1,5 @@ # Release History -## 1.0.0-beta.2 (2023-09-08) - -**Features** - - - Added operation FleetMembers.beginUpdate - - Added operation FleetMembers.beginUpdateAndWait - - Added operation Fleets.beginUpdate - - Added operation Fleets.beginUpdateAndWait - - Added Interface AgentProfile - - Added Interface APIServerAccessProfile - - Added Interface FleetMembersUpdateHeaders - - Added Interface FleetsUpdateHeaders - - Added Interface ManagedServiceIdentity - - Added Interface NodeImageSelection - - Added Interface NodeImageSelectionStatus - - Added Interface NodeImageVersion - - Added Interface UserAssignedIdentity - - Added Type Alias ManagedServiceIdentityType - - Added Type Alias NodeImageSelectionType - - Interface Fleet has a new optional parameter identity - - Interface FleetHubProfile has a new optional parameter agentProfile - - Interface FleetHubProfile has a new optional parameter apiServerAccessProfile - - Interface FleetMembersUpdateOptionalParams has a new optional parameter resumeFrom - - Interface FleetMembersUpdateOptionalParams has a new optional parameter updateIntervalInMs - - Interface FleetPatch has a new optional parameter identity - - Interface FleetsUpdateOptionalParams has a new optional parameter resumeFrom - - Interface FleetsUpdateOptionalParams has a new optional parameter updateIntervalInMs - - Interface ManagedClusterUpdate has a new optional parameter nodeImageSelection - - Interface MemberUpdateStatus has a new optional parameter message - - Interface UpdateRunStatus has a new optional parameter nodeImageSelection - - Added Enum KnownManagedServiceIdentityType - - Added Enum KnownNodeImageSelectionType - - Enum KnownUpdateState has a new value Skipped - -**Breaking Changes** - - - Removed operation FleetMembers.update - - Removed operation Fleets.update - - -## 1.0.0-beta.1 (2023-06-01) +## 1.0.0 (2023-10-19) -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/azsdk/js/mgmt/quickstart ). +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). diff --git a/sdk/containerservice/arm-containerservicefleet/README.md b/sdk/containerservice/arm-containerservicefleet/README.md index 12ea86bbe15c..8ae337adf1ac 100644 --- a/sdk/containerservice/arm-containerservicefleet/README.md +++ b/sdk/containerservice/arm-containerservicefleet/README.md @@ -6,7 +6,7 @@ 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) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/containerservice/arm-containerservicefleet/_meta.json b/sdk/containerservice/arm-containerservicefleet/_meta.json index b1ca8bda2d3b..811437b34a18 100644 --- a/sdk/containerservice/arm-containerservicefleet/_meta.json +++ b/sdk/containerservice/arm-containerservicefleet/_meta.json @@ -1,8 +1,8 @@ { - "commit": "241397aafd74aaad6161cd0058449f9eb6d5163c", + "commit": "747d06e0c07504fc3cdbf6bcd5f5850499cb9021", "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.11", "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.11" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservicefleet/package.json b/sdk/containerservice/arm-containerservicefleet/package.json index a48a5407f0b0..363291363e32 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", "engines": { "node": ">=16.0.0" }, @@ -29,15 +29,23 @@ "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", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", @@ -64,20 +72,21 @@ "src/**/*.ts", "README.md", "LICENSE", + "rollup.config.js", "tsconfig.json", "review/*", "CHANGELOG.md", "types/*" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "prepack": "npm run build", "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "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", @@ -105,13 +114,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..2b89444a61cf 100644 --- a/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md +++ b/sdk/containerservice/arm-containerservicefleet/review/arm-containerservicefleet.api.md @@ -13,18 +13,6 @@ import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; -// @public -export interface AgentProfile { - subnetId?: string; -} - -// @public -export interface APIServerAccessProfile { - enablePrivateCluster?: boolean; - enableVnetIntegration?: boolean; - subnetId?: string; -} - // @public (undocumented) export class ContainerServiceFleetClient extends coreClient.ServiceClient { // (undocumented) @@ -37,6 +25,8 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient { // (undocumented) fleets: Fleets; // (undocumented) + fleetUpdateStrategies: FleetUpdateStrategies; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -77,7 +67,6 @@ export interface ErrorResponse { // @public export interface Fleet extends TrackedResource { readonly eTag?: string; - hubProfile?: FleetHubProfile; identity?: ManagedServiceIdentity; readonly provisioningState?: FleetProvisioningState; } @@ -93,15 +82,6 @@ export interface FleetCredentialResults { readonly kubeconfigs?: FleetCredentialResult[]; } -// @public -export interface FleetHubProfile { - agentProfile?: AgentProfile; - apiServerAccessProfile?: APIServerAccessProfile; - dnsPrefix?: string; - readonly fqdn?: string; - readonly kubernetesVersion?: string; -} - // @public export interface FleetListResult { nextLink?: string; @@ -320,6 +300,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 +412,13 @@ export enum KnownFleetProvisioningState { Updating = "Updating" } +// @public +export enum KnownFleetUpdateStrategyProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + // @public export enum KnownManagedClusterUpgradeType { Full = "Full", @@ -550,6 +613,7 @@ export interface UpdateRun extends ProxyResource { readonly provisioningState?: UpdateRunProvisioningState; readonly status?: UpdateRunStatus; strategy?: UpdateRunStrategy; + updateStrategyId?: string; } // @public diff --git a/sdk/containerservice/arm-containerservicefleet/rollup.config.js b/sdk/containerservice/arm-containerservicefleet/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/containerservice/arm-containerservicefleet/rollup.config.js @@ -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")); diff --git a/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts b/sdk/containerservice/arm-containerservicefleet/src/containerServiceFleetClient.ts index ea68914e80f0..9f7bda765cc5 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`; 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-10-15"; 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..096983a09b21 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/models/index.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/models/index.ts @@ -129,42 +129,6 @@ export interface FleetListResult { 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 access profile for the Fleet hub API server. */ - apiServerAccessProfile?: APIServerAccessProfile; - /** The agent profile for the Fleet hub. */ - agentProfile?: AgentProfile; - /** - * 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; -} - -/** Access profile for the Fleet hub API server. */ -export interface APIServerAccessProfile { - /** Whether to create the Fleet hub as a private cluster or not. */ - enablePrivateCluster?: boolean; - /** Whether to enable apiserver vnet integration for the Fleet hub or not. */ - enableVnetIntegration?: boolean; - /** The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. */ - subnetId?: string; -} - -/** Agent profile for the Fleet hub. */ -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; -} - /** Managed service identity (system assigned and/or user assigned identities) */ export interface ManagedServiceIdentity { /** @@ -290,26 +254,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 +281,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 +460,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. */ @@ -523,8 +493,6 @@ export interface Fleet extends TrackedResource { * 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. */ @@ -545,7 +513,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 +525,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 +555,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 +645,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 +893,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 +1148,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..f6680cefd449 100644 --- a/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservicefleet/src/models/mappers.ts @@ -242,98 +242,6 @@ export const FleetListResult: coreClient.CompositeMapper = { } }; -export const FleetHubProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FleetHubProfile", - modelProperties: { - dnsPrefix: { - constraints: { - Pattern: new RegExp( - "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-]{0,52}[a-zA-Z0-9]$" - ), - MaxLength: 54, - MinLength: 1 - }, - serializedName: "dnsPrefix", - type: { - name: "String" - } - }, - apiServerAccessProfile: { - serializedName: "apiServerAccessProfile", - type: { - name: "Composite", - className: "APIServerAccessProfile" - } - }, - agentProfile: { - serializedName: "agentProfile", - type: { - name: "Composite", - className: "AgentProfile" - } - }, - fqdn: { - serializedName: "fqdn", - readOnly: true, - type: { - name: "String" - } - }, - kubernetesVersion: { - serializedName: "kubernetesVersion", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const APIServerAccessProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "APIServerAccessProfile", - modelProperties: { - enablePrivateCluster: { - serializedName: "enablePrivateCluster", - type: { - name: "Boolean" - } - }, - enableVnetIntegration: { - serializedName: "enableVnetIntegration", - type: { - name: "Boolean" - } - }, - subnetId: { - serializedName: "subnetId", - type: { - name: "String" - } - } - } - } -}; - -export const AgentProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentProfile", - modelProperties: { - subnetId: { - serializedName: "subnetId", - type: { - name: "String" - } - } - } - } -}; - export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1022,6 +930,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", @@ -1082,13 +1018,6 @@ export const Fleet: coreClient.CompositeMapper = { type: { name: "String" } - }, - hubProfile: { - serializedName: "properties.hubProfile", - type: { - name: "Composite", - className: "FleetHubProfile" - } } } } @@ -1155,6 +1084,12 @@ export const UpdateRun: coreClient.CompositeMapper = { name: "String" } }, + updateStrategyId: { + serializedName: "properties.updateStrategyId", + type: { + name: "String" + } + }, strategy: { serializedName: "properties.strategy", type: { @@ -1180,6 +1115,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 +1337,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..5c65faf53a92 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-10-15", 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"