From 5354bedbe0c681450e411c4bfdef20a479b221bf Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 17 Nov 2023 19:07:46 +0000 Subject: [PATCH] CodeGen from PR 26741 in Azure/azure-rest-api-specs Merge 2982f564aae7455744e104d7b9ba0b4ff0b53ca8 into eaf8b6f8e3ae429c8100471a9772a4bee9a5e472 --- common/config/rush/pnpm-lock.yaml | 67 +- .../arm-hybridcontainerservice/CHANGELOG.md | 210 +- .../arm-hybridcontainerservice/_meta.json | 8 +- .../arm-hybridcontainerservice/assets.json | 6 - .../arm-hybridcontainerservice/package.json | 24 +- .../review/arm-hybridcontainerservice.api.md | 1081 +++++---- .../agentPoolCreateOrUpdateSample.ts | 56 - .../samples-dev/agentPoolDeleteSample.ts | 46 - .../samples-dev/agentPoolGetSample.ts | 46 - ...agentPoolListByProvisionedClusterSample.ts | 44 - .../samples-dev/agentPoolUpdateSample.ts | 51 - ...ContainerServiceListOrchestratorsSample.ts | 41 - .../hybridContainerServiceListVMSkusSample.ts | 41 - .../hybridIdentityMetadataDeleteSample.ts | 45 - .../hybridIdentityMetadataGetSample.ts | 45 - ...bridIdentityMetadataListByClusterSample.ts | 46 - .../hybridIdentityMetadataPutSample.ts | 53 - .../samples-dev/operationsListSample.ts | 40 - ...provisionedClustersCreateOrUpdateSample.ts | 115 - .../provisionedClustersDeleteSample.ts | 44 - .../provisionedClustersGetSample.ts | 44 - ...visionedClustersGetUpgradeProfileSample.ts | 44 - ...sionedClustersListByResourceGroupSample.ts | 45 - ...isionedClustersListBySubscriptionSample.ts | 40 - .../provisionedClustersUpdateSample.ts | 51 - ...eNodeImageVersionForEntireClusterSample.ts | 44 - .../storageSpacesCreateOrUpdateSample.ts | 63 - .../samples-dev/storageSpacesDeleteSample.ts | 44 - .../storageSpacesListByResourceGroupSample.ts | 45 - .../storageSpacesListBySubscriptionSample.ts | 40 - .../storageSpacesRetrieveSample.ts | 44 - .../samples-dev/storageSpacesUpdateSample.ts | 51 - .../virtualNetworksCreateOrUpdateSample.ts | 67 - .../virtualNetworksDeleteSample.ts | 44 - ...irtualNetworksListByResourceGroupSample.ts | 45 - ...virtualNetworksListBySubscriptionSample.ts | 40 - .../virtualNetworksRetrieveSample.ts | 44 - .../virtualNetworksUpdateSample.ts | 51 - .../samples/v1-beta/javascript/README.md | 112 - .../agentPoolCreateOrUpdateSample.js | 49 - .../javascript/agentPoolDeleteSample.js | 42 - .../v1-beta/javascript/agentPoolGetSample.js | 42 - ...agentPoolListByProvisionedClusterSample.js | 40 - .../javascript/agentPoolUpdateSample.js | 44 - ...ContainerServiceListOrchestratorsSample.js | 36 - .../hybridContainerServiceListVMSkusSample.js | 36 - .../hybridIdentityMetadataDeleteSample.js | 41 - .../hybridIdentityMetadataGetSample.js | 41 - ...bridIdentityMetadataListByClusterSample.js | 42 - .../hybridIdentityMetadataPutSample.js | 46 - .../javascript/operationsListSample.js | 37 - .../samples/v1-beta/javascript/package.json | 32 - ...provisionedClustersCreateOrUpdateSample.js | 101 - .../provisionedClustersDeleteSample.js | 37 - .../provisionedClustersGetSample.js | 37 - ...visionedClustersGetUpgradeProfileSample.js | 40 - ...sionedClustersListByResourceGroupSample.js | 41 - ...isionedClustersListBySubscriptionSample.js | 37 - .../provisionedClustersUpdateSample.js | 44 - ...eNodeImageVersionForEntireClusterSample.js | 41 - .../samples/v1-beta/javascript/sample.env | 4 - .../storageSpacesCreateOrUpdateSample.js | 55 - .../javascript/storageSpacesDeleteSample.js | 37 - .../storageSpacesListByResourceGroupSample.js | 39 - .../storageSpacesListBySubscriptionSample.js | 37 - .../javascript/storageSpacesRetrieveSample.js | 40 - .../javascript/storageSpacesUpdateSample.js | 44 - .../virtualNetworksCreateOrUpdateSample.js | 59 - .../javascript/virtualNetworksDeleteSample.js | 40 - ...irtualNetworksListByResourceGroupSample.js | 39 - ...virtualNetworksListBySubscriptionSample.js | 37 - .../virtualNetworksRetrieveSample.js | 40 - .../javascript/virtualNetworksUpdateSample.js | 44 - .../samples/v1-beta/typescript/README.md | 125 -- .../samples/v1-beta/typescript/package.json | 41 - .../samples/v1-beta/typescript/sample.env | 4 - .../src/agentPoolCreateOrUpdateSample.ts | 56 - .../typescript/src/agentPoolDeleteSample.ts | 46 - .../typescript/src/agentPoolGetSample.ts | 46 - ...agentPoolListByProvisionedClusterSample.ts | 44 - .../typescript/src/agentPoolUpdateSample.ts | 51 - ...ContainerServiceListOrchestratorsSample.ts | 41 - .../hybridContainerServiceListVMSkusSample.ts | 41 - .../src/hybridIdentityMetadataDeleteSample.ts | 45 - .../src/hybridIdentityMetadataGetSample.ts | 45 - ...bridIdentityMetadataListByClusterSample.ts | 46 - .../src/hybridIdentityMetadataPutSample.ts | 53 - .../typescript/src/operationsListSample.ts | 40 - ...provisionedClustersCreateOrUpdateSample.ts | 115 - .../src/provisionedClustersDeleteSample.ts | 44 - .../src/provisionedClustersGetSample.ts | 44 - ...visionedClustersGetUpgradeProfileSample.ts | 44 - ...sionedClustersListByResourceGroupSample.ts | 45 - ...isionedClustersListBySubscriptionSample.ts | 40 - .../src/provisionedClustersUpdateSample.ts | 51 - ...eNodeImageVersionForEntireClusterSample.ts | 44 - .../src/storageSpacesCreateOrUpdateSample.ts | 63 - .../src/storageSpacesDeleteSample.ts | 44 - .../storageSpacesListByResourceGroupSample.ts | 45 - .../storageSpacesListBySubscriptionSample.ts | 40 - .../src/storageSpacesRetrieveSample.ts | 44 - .../src/storageSpacesUpdateSample.ts | 51 - .../virtualNetworksCreateOrUpdateSample.ts | 67 - .../src/virtualNetworksDeleteSample.ts | 44 - ...irtualNetworksListByResourceGroupSample.ts | 45 - ...virtualNetworksListBySubscriptionSample.ts | 40 - .../src/virtualNetworksRetrieveSample.ts | 44 - .../src/virtualNetworksUpdateSample.ts | 51 - .../samples/v1-beta/typescript/tsconfig.json | 17 - .../src/hybridContainerServiceClient.ts | 621 +++++- .../src/models/index.ts | 1381 ++++++------ .../src/models/mappers.ts | 1924 ++++++----------- .../src/models/parameters.ts | 139 +- .../src/operations/agentPoolOperations.ts | 301 ++- .../src/operations/hybridContainerService.ts | 101 - .../hybridIdentityMetadataOperations.ts | 251 ++- .../src/operations/index.ts | 8 +- .../src/operations/kubernetesVersions.ts | 179 ++ .../src/operations/operations.ts | 12 +- .../operations/provisionedClusterInstances.ts | 728 +++++++ .../provisionedClustersOperations.ts | 804 ------- .../src/operations/storageSpacesOperations.ts | 652 ------ .../src/operations/vMSkus.ts | 179 ++ ...tworksOperations.ts => virtualNetworks.ts} | 212 +- .../agentPoolOperations.ts | 102 +- .../hybridContainerService.ts | 38 - .../hybridIdentityMetadataOperations.ts | 62 +- .../src/operationsInterfaces/index.ts | 8 +- .../kubernetesVersions.ts | 28 + .../src/operationsInterfaces/operations.ts | 7 +- .../provisionedClusterInstances.ts | 165 ++ .../provisionedClustersOperations.ts | 167 -- .../storageSpacesOperations.ts | 128 -- .../src/operationsInterfaces/vMSkus.ts | 25 + ...tworksOperations.ts => virtualNetworks.ts} | 59 +- .../arm-hybridcontainerservice/tsconfig.json | 10 +- 136 files changed, 4738 insertions(+), 9787 deletions(-) delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/assets.json delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolListByProvisionedClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListOrchestratorsSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListVMSkusSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataListByClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataPutSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/operationsListSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetUpgradeProfileSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesRetrieveSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksRetrieveSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/README.md delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolCreateOrUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolDeleteSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolGetSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolListByProvisionedClusterSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListOrchestratorsSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListVMSkusSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataListByClusterSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataPutSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/operationsListSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/package.json delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersCreateOrUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersDeleteSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetUpgradeProfileSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListByResourceGroupSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListBySubscriptionSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesCreateOrUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesDeleteSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListByResourceGroupSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListBySubscriptionSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesRetrieveSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksCreateOrUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksDeleteSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListBySubscriptionSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksRetrieveSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksUpdateSample.js delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/README.md delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/package.json delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolListByProvisionedClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListOrchestratorsSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListVMSkusSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataListByClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataPutSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetUpgradeProfileSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesRetrieveSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksCreateOrUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListBySubscriptionSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksRetrieveSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/tsconfig.json delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridContainerService.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/kubernetesVersions.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClusterInstances.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClustersOperations.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/storageSpacesOperations.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/vMSkus.ts rename sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/{virtualNetworksOperations.ts => virtualNetworks.ts} (78%) delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridContainerService.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/kubernetesVersions.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClusterInstances.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClustersOperations.ts delete mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/storageSpacesOperations.ts create mode 100644 sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/vMSkus.ts rename sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/{virtualNetworksOperations.ts => virtualNetworks.ts} (71%) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ed856921ae45..a8cca015ba71 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3509,6 +3509,13 @@ packages: requiresBuild: true dev: false + /autorest@3.7.0: + resolution: {integrity: sha512-E6RXXd6S8Kyc0oNY7Ar0IARSMTodIrww7FBR0FZSuQT0J8P3udvqXFexr2K290fr8qm7kAl7OUsWq08FTbIJoA==} + engines: {node: '>=12.0.0'} + hasBin: true + requiresBuild: true + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -4440,7 +4447,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.4.0-dev.20231116 + typescript: 5.4.0-dev.20231117 dev: false /downlevel-dts@0.11.0: @@ -4449,7 +4456,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.4.0-dev.20231116 + typescript: 5.4.0-dev.20231117 dev: false /eastasianwidth@0.2.0: @@ -9163,8 +9170,8 @@ packages: hasBin: true dev: false - /typescript@5.4.0-dev.20231116: - resolution: {integrity: sha512-arT/MwHnosyqo1MQ2xN9VzwvWo1jxrhUpa1iQX1yZACfBRJb1dQ1D2MU/Ijotjr6eXw8BZ3RFdj9X/9O56iOgw==} + /typescript@5.4.0-dev.20231117: + resolution: {integrity: sha512-qJs5vq279esPS+UX+NlDaSB8aDc9NiC1VLo6cHGrEVMUV8e9WTMic5T92KgDsExf239vViwmKNvtSMGf90aDOA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9792,7 +9799,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -9838,7 +9845,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -9880,7 +9887,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10113,7 +10120,7 @@ packages: dependencies: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 dotenv: 8.6.0 eslint: 8.53.0 @@ -10185,7 +10192,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10277,7 +10284,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10757,7 +10764,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11417,7 +11424,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11637,7 +11644,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -12909,20 +12916,22 @@ packages: dev: false file:projects/arm-hybridcontainerservice.tgz: - resolution: {integrity: sha512-rHQwbUTpcESBUr9hZEWnD5JURWIfu2fkE6bJlyGpE/Hqi/W33lvWieN2qPXtPOH0Tlzmeu+soq+7eVgg5h2qWA==, tarball: file:projects/arm-hybridcontainerservice.tgz} + resolution: {integrity: sha512-mkvAuhKp3IFPy0zDa8Gob421fTnwJrVcjOnJq99qW3bK4MIoXB2Ql9j0FjKSoY5sGommgf1QFkDXwlo05H4A4Q==, tarball: file:projects/arm-hybridcontainerservice.tgz} name: '@rush-temp/arm-hybridcontainerservice' version: 0.0.0 dependencies: '@azure/identity': 3.4.1 '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 + '@types/mocha': 10.0.4 '@types/node': 18.18.9 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 ts-node: 10.9.1(@types/node@18.18.9)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -13906,7 +13915,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15188,7 +15197,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -16383,7 +16392,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 @@ -17611,7 +17620,7 @@ packages: '@microsoft/api-extractor': 7.38.3(@types/node@18.18.9) '@types/chai': 4.3.10 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18017,7 +18026,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18062,7 +18071,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18565,7 +18574,7 @@ packages: '@types/mocha': 10.0.4 '@types/node': 18.18.9 '@types/uuid': 8.3.4 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18674,7 +18683,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18720,7 +18729,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18766,7 +18775,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18812,7 +18821,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -19938,7 +19947,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -19983,7 +19992,7 @@ packages: '@types/chai': 4.3.10 '@types/mocha': 10.0.4 '@types/node': 18.18.9 - autorest: 3.6.3 + autorest: 3.7.0 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20472,7 +20481,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-cElx8OY4OhnGLeTTxL6P+Y9+1krsptOCY82lNRi1RFirPFEYptgQO4uu3PzSSi10nVD7XZCUufej5e5CJvCQ0A==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-40V28wv/bYrwzBpkO7wTPesmR3f+iSe2KZUv762kyxG36GJDzBRLmcNkAw6SyV+o7RRA/XCTgGB/sCQc7gK2ZQ==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/CHANGELOG.md b/sdk/hybridcontainerservice/arm-hybridcontainerservice/CHANGELOG.md index 0cf30508b04c..4c58a9377217 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/CHANGELOG.md +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/CHANGELOG.md @@ -1,15 +1,207 @@ # Release History + +## 1.0.0-beta.3 (2023-11-17) + +**Features** -## 1.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group KubernetesVersions + - Added operation group ProvisionedClusterInstances + - Added operation group VirtualNetworks + - Added operation group VMSkus + - Added operation AgentPoolOperations.beginDelete + - Added operation AgentPoolOperations.beginDeleteAndWait + - Added operation AgentPoolOperations.beginUpdate + - Added operation AgentPoolOperations.beginUpdateAndWait + - Added operation HybridIdentityMetadataOperations.beginDelete + - Added operation HybridIdentityMetadataOperations.beginDeleteAndWait + - Added Interface AddonStatusProfile + - Added Interface AgentPoolDeleteHeaders + - Added Interface AgentPoolPatch + - Added Interface AgentPoolProvisioningStatusOperationStatus + - Added Interface AgentPoolProvisioningStatusOperationStatusError + - Added Interface AgentPoolUpdateHeaders + - Added Interface AgentPoolUpdateProfile + - Added Interface CredentialResult + - Added Interface DeleteKubernetesVersionsOptionalParams + - Added Interface DeleteVMSkusOptionalParams + - Added Interface ExtendedLocation + - Added Interface GetKubernetesVersionsOptionalParams + - Added Interface GetVMSkusOptionalParams + - Added Interface HybridContainerServiceClientDeleteKubernetesVersionsHeaders + - Added Interface HybridContainerServiceClientDeleteVMSkusHeaders + - Added Interface HybridIdentityMetadataDeleteHeaders + - Added Interface KubernetesPatchVersions + - Added Interface KubernetesVersionCapabilities + - Added Interface KubernetesVersionProfile + - Added Interface KubernetesVersionProfileList + - Added Interface KubernetesVersionProfileProperties + - Added Interface KubernetesVersionProperties + - Added Interface KubernetesVersionReadiness + - Added Interface KubernetesVersionsListNextOptionalParams + - Added Interface KubernetesVersionsListOptionalParams + - Added Interface ListCredentialResponse + - Added Interface ListCredentialResponseError + - Added Interface ListCredentialResponseProperties + - Added Interface NetworkProfileLoadBalancerProfile + - Added Interface Operation + - Added Interface OperationDisplay + - Added Interface OperationListResult + - Added Interface ProvisionedClusterInstancesCreateOrUpdateOptionalParams + - Added Interface ProvisionedClusterInstancesDeleteHeaders + - Added Interface ProvisionedClusterInstancesDeleteOptionalParams + - Added Interface ProvisionedClusterInstancesGetOptionalParams + - Added Interface ProvisionedClusterInstancesGetUpgradeProfileOptionalParams + - Added Interface ProvisionedClusterInstancesListAdminKubeconfigHeaders + - Added Interface ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + - Added Interface ProvisionedClusterInstancesListNextOptionalParams + - Added Interface ProvisionedClusterInstancesListOptionalParams + - Added Interface ProvisionedClusterInstancesListUserKubeconfigHeaders + - Added Interface ProvisionedClusterInstancesListUserKubeconfigOptionalParams + - Added Interface ProvisionedClusterLicenseProfile + - Added Interface ProvisionedClusterProperties + - Added Interface ProvisionedClusterPropertiesStatus + - Added Interface ProvisionedClusterPropertiesStatusOperationStatus + - Added Interface ProvisionedClusterPropertiesStatusOperationStatusError + - Added Interface ProvisionedClustersListResult + - Added Interface PutKubernetesVersionsOptionalParams + - Added Interface PutVMSkusOptionalParams + - Added Interface VirtualNetwork + - Added Interface VirtualNetworkExtendedLocation + - Added Interface VirtualNetworkProperties + - Added Interface VirtualNetworkPropertiesInfraVnetProfile + - Added Interface VirtualNetworkPropertiesInfraVnetProfileHci + - Added Interface VirtualNetworkPropertiesInfraVnetProfileVmware + - Added Interface VirtualNetworkPropertiesStatus + - Added Interface VirtualNetworkPropertiesStatusOperationStatus + - Added Interface VirtualNetworkPropertiesStatusOperationStatusError + - Added Interface VirtualNetworkPropertiesVipPoolItem + - Added Interface VirtualNetworkPropertiesVmipPoolItem + - Added Interface VirtualNetworksDeleteHeaders + - Added Interface VirtualNetworksUpdateHeaders + - Added Interface VmSkuCapabilities + - Added Interface VmSkuProfile + - Added Interface VmSkuProfileList + - Added Interface VmSkuProfileProperties + - Added Interface VmSkuProperties + - Added Interface VMSkusListNextOptionalParams + - Added Interface VMSkusListOptionalParams + - Added Type Alias ActionType + - Added Type Alias AddonPhase + - Added Type Alias AgentPoolDeleteResponse + - Added Type Alias AzureHybridBenefit + - Added Type Alias DeleteKubernetesVersionsResponse + - Added Type Alias DeleteVMSkusResponse + - Added Type Alias ExtendedLocationTypes + - Added Type Alias GetKubernetesVersionsResponse + - Added Type Alias GetVMSkusResponse + - Added Type Alias HybridIdentityMetadataDeleteResponse + - Added Type Alias KubernetesVersionsListNextResponse + - Added Type Alias KubernetesVersionsListResponse + - Added Type Alias Origin + - Added Type Alias Ossku + - Added Type Alias ProvisionedClusterInstancesCreateOrUpdateResponse + - Added Type Alias ProvisionedClusterInstancesDeleteResponse + - Added Type Alias ProvisionedClusterInstancesGetResponse + - Added Type Alias ProvisionedClusterInstancesGetUpgradeProfileResponse + - Added Type Alias ProvisionedClusterInstancesListAdminKubeconfigResponse + - Added Type Alias ProvisionedClusterInstancesListNextResponse + - Added Type Alias ProvisionedClusterInstancesListResponse + - Added Type Alias ProvisionedClusterInstancesListUserKubeconfigResponse + - Added Type Alias PutKubernetesVersionsResponse + - Added Type Alias PutVMSkusResponse + - Added Type Alias ResourceProvisioningState + - Added Type Alias VirtualNetworksDeleteResponse + - Added Type Alias VMSkusListNextResponse + - Added Type Alias VMSkusListResponse + - Interface AgentPool has a new optional parameter osSKU + - Interface AgentPoolDeleteOptionalParams has a new optional parameter resumeFrom + - Interface AgentPoolDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface AgentPoolProfile has a new optional parameter osSKU + - Interface AgentPoolProvisioningStatusStatus has a new optional parameter operationStatus + - Interface AgentPoolUpdateOptionalParams has a new optional parameter resumeFrom + - Interface AgentPoolUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface HybridIdentityMetadataDeleteOptionalParams has a new optional parameter resumeFrom + - Interface HybridIdentityMetadataDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface Resource has a new optional parameter systemData + - Interface VirtualNetworksDeleteOptionalParams has a new optional parameter resumeFrom + - Interface VirtualNetworksDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Added Enum KnownActionType + - Added Enum KnownAddonPhase + - Added Enum KnownAzureHybridBenefit + - Added Enum KnownExtendedLocationTypes + - Added Enum KnownOrigin + - Added Enum KnownOssku + - Added Enum KnownResourceProvisioningState -### Other Changes +**Breaking Changes** + - Removed operation group HybridContainerService + - Removed operation group ProvisionedClustersOperations + - Removed operation group StorageSpacesOperations + - Removed operation group VirtualNetworksOperations + - Removed operation AgentPoolOperations.delete + - Removed operation AgentPoolOperations.update + - Removed operation HybridIdentityMetadataOperations.delete + - Operation AgentPoolOperations.beginCreateOrUpdate has a new signature + - Operation AgentPoolOperations.beginCreateOrUpdateAndWait has a new signature + - Operation AgentPoolOperations.get has a new signature + - Operation AgentPoolOperations.listByProvisionedCluster has a new signature + - Operation HybridIdentityMetadataOperations.get has a new signature + - Operation HybridIdentityMetadataOperations.listByCluster has a new signature + - Operation HybridIdentityMetadataOperations.put has a new signature + - Class HybridContainerServiceClient has a new signature + - Interface AgentPool no longer has parameter cloudProviderProfile + - Interface AgentPool no longer has parameter maxCount + - Interface AgentPool no longer has parameter maxPods + - Interface AgentPool no longer has parameter minCount + - Interface AgentPool no longer has parameter mode + - Interface AgentPool no longer has parameter nodeLabels + - Interface AgentPool no longer has parameter nodeTaints + - Interface AgentPoolProfile no longer has parameter cloudProviderProfile + - Interface AgentPoolProfile no longer has parameter count + - Interface AgentPoolProfile no longer has parameter maxCount + - Interface AgentPoolProfile no longer has parameter maxPods + - Interface AgentPoolProfile no longer has parameter minCount + - Interface AgentPoolProfile no longer has parameter mode + - Interface AgentPoolProfile no longer has parameter nodeLabels + - Interface AgentPoolProfile no longer has parameter nodeTaints + - Interface AgentPoolProfile no longer has parameter vmSize + - Interface AgentPoolProvisioningStatusStatus no longer has parameter provisioningStatus + - Interface AgentPoolProvisioningStatusStatus no longer has parameter replicas + - Interface CloudProviderProfile no longer has parameter infraStorageProfile + - Interface HybridIdentityMetadata no longer has parameter identity + - Interface HybridIdentityMetadata no longer has parameter systemData + - Interface LinuxProfileProperties no longer has parameter adminUsername + - Interface NetworkProfile no longer has parameter dnsServiceIP + - Interface NetworkProfile no longer has parameter loadBalancerSku + - Interface NetworkProfile no longer has parameter podCidrs + - Interface NetworkProfile no longer has parameter serviceCidr + - Interface NetworkProfile no longer has parameter serviceCidrs + - Interface ProvisionedClusters no longer has parameter identity + - Interface ProvisionedClusters no longer has parameter systemData + - Type of parameter extendedLocation of interface AgentPool is changed from AgentPoolExtendedLocation to ExtendedLocation + - Type of parameter provisioningState of interface AgentPool is changed from AgentPoolProvisioningState to ResourceProvisioningState + - Type of parameter provisioningState of interface AgentPoolProvisioningStatus is changed from AgentPoolProvisioningState to ResourceProvisioningState + - Type of parameter readyReplicas of interface AgentPoolProvisioningStatusStatus is changed from number to AgentPoolUpdateProfile[] + - Type of parameter port of interface ControlPlaneEndpointProfileControlPlaneEndpoint is changed from string to number + - Type of parameter provisioningState of interface HybridIdentityMetadata is changed from string to ResourceProvisioningState + - Type of parameter loadBalancerProfile of interface NetworkProfile is changed from LoadBalancerProfile to NetworkProfileLoadBalancerProfile + - Type of parameter extendedLocation of interface ProvisionedClusters is changed from ProvisionedClustersExtendedLocation to ExtendedLocation + - Type of parameter properties of interface ProvisionedClusters is changed from ProvisionedClustersAllProperties to ProvisionedClusterProperties + - Type of parameter provisioningState of interface ProvisionedClusterUpgradeProfile is changed from string to ResourceProvisioningState + - Type of parameter value of interface VirtualNetworksListResult is changed from VirtualNetworks[] to VirtualNetwork[] + - Class HybridContainerServiceClient no longer has parameter hybridContainerService + - Class HybridContainerServiceClient no longer has parameter provisionedClustersOperations + - Class HybridContainerServiceClient no longer has parameter storageSpacesOperations + - Class HybridContainerServiceClient no longer has parameter virtualNetworksOperations + - Removed Enum KnownAgentPoolProvisioningState + - Removed Enum KnownAutoUpgradeOptions + - Removed Enum KnownDeploymentState + - Removed Enum KnownLicenseType + - Removed Enum KnownLoadBalancerSku + - Removed Enum KnownMode + + ## 1.0.0-beta.2 (2023-03-03) **Features** @@ -33,4 +225,4 @@ ## 1.0.0-beta.1 (2022-11-09) -The package of @azure/arm-hybridcontainerservice 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-hybridcontainerservice 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/hybridcontainerservice/arm-hybridcontainerservice/_meta.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/_meta.json index c17183048bf3..33c6cdb6e109 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/_meta.json +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3a2c320161b3576c6282189535602cb541a254b9", + "commit": "2336c670d76e69d23cf17720c454820a096a458a", "readme": "specification/hybridaks/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hybridaks\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.9 --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/hybridaks/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/assets.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/assets.json deleted file mode 100644 index ebd2ba16c0b6..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/hybridcontainerservice/arm-hybridcontainerservice", - "Tag": "js/hybridcontainerservice/arm-hybridcontainerservice_2b033667d6" -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json index 3056071ac952..e0ba8da79303 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json @@ -8,12 +8,12 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -32,17 +32,19 @@ "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.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", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -77,7 +79,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", @@ -105,13 +107,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hybridcontainerservice?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice" +} \ No newline at end of file diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/review/arm-hybridcontainerservice.api.md b/sdk/hybridcontainerservice/arm-hybridcontainerservice/review/arm-hybridcontainerservice.api.md index 23343b51dbcb..dcd2484847c5 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/review/arm-hybridcontainerservice.api.md +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/review/arm-hybridcontainerservice.api.md @@ -11,61 +11,31 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; // @public -export interface AADProfile extends AADProfileSecret, AADProfileResponse { -} - -// @public -export interface AADProfileResponse { - adminGroupObjectIDs?: string[]; - clientAppID?: string; - enableAzureRbac?: boolean; - managed?: boolean; - serverAppID?: string; - tenantID?: string; -} +export type ActionType = string; // @public -export interface AADProfileSecret { - serverAppSecret?: string; -} - -// @public -export interface AddonProfiles { - config?: { - [propertyName: string]: string; - }; - enabled?: boolean; -} +export type AddonPhase = string; // @public -export interface AddonStatus { +export interface AddonStatusProfile { errorMessage?: string; - phase?: string; - // (undocumented) + name?: string; + phase?: AddonPhase; ready?: boolean; } // @public export interface AgentPool { availabilityZones?: string[]; - cloudProviderProfile?: CloudProviderProfile; count?: number; - // (undocumented) - extendedLocation?: AgentPoolExtendedLocation; + extendedLocation?: ExtendedLocation; readonly id?: string; location?: string; - maxCount?: number; - maxPods?: number; - minCount?: number; - mode?: Mode; readonly name?: string; nodeImageVersion?: string; - nodeLabels?: { - [propertyName: string]: string; - }; - nodeTaints?: string[]; + osSKU?: Ossku; osType?: OsType; - readonly provisioningState?: AgentPoolProvisioningState; + readonly provisioningState?: ResourceProvisioningState; status?: AgentPoolProvisioningStatusStatus; readonly systemData?: SystemData; tags?: { @@ -85,15 +55,20 @@ export interface AgentPoolCreateOrUpdateOptionalParams extends coreClient.Operat export type AgentPoolCreateOrUpdateResponse = AgentPool; // @public -export interface AgentPoolDeleteOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolDeleteHeaders { + // (undocumented) + location?: string; } -// @public (undocumented) -export interface AgentPoolExtendedLocation { - name?: string; - type?: string; +// @public +export interface AgentPoolDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export type AgentPoolDeleteResponse = AgentPoolDeleteHeaders; + // @public export interface AgentPoolGetOptionalParams extends coreClient.OperationOptions { } @@ -108,7 +83,7 @@ export interface AgentPoolListByProvisionedClusterOptionalParams extends coreCli // @public export type AgentPoolListByProvisionedClusterResponse = AgentPoolListResult; -// @public (undocumented) +// @public export interface AgentPoolListResult { // (undocumented) nextLink?: string; @@ -123,47 +98,53 @@ export interface AgentPoolName { // @public export interface AgentPoolOperations { - beginCreateOrUpdate(resourceGroupName: string, resourceName: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams): Promise, AgentPoolCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolDeleteOptionalParams): Promise; - get(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolGetOptionalParams): Promise; - listByProvisionedCluster(resourceGroupName: string, resourceName: string, options?: AgentPoolListByProvisionedClusterOptionalParams): Promise; - update(resourceGroupName: string, resourceName: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolUpdateOptionalParams): Promise; + beginCreateOrUpdate(connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams): Promise, AgentPoolCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams): Promise; + beginDelete(connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolDeleteOptionalParams): Promise, AgentPoolDeleteResponse>>; + beginDeleteAndWait(connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolDeleteOptionalParams): Promise; + beginUpdate(connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPoolPatch, options?: AgentPoolUpdateOptionalParams): Promise, AgentPoolUpdateResponse>>; + beginUpdateAndWait(connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPoolPatch, options?: AgentPoolUpdateOptionalParams): Promise; + get(connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolGetOptionalParams): Promise; + listByProvisionedCluster(connectedClusterResourceUri: string, options?: AgentPoolListByProvisionedClusterOptionalParams): Promise; +} + +// @public +export interface AgentPoolPatch { + tags?: { + [propertyName: string]: string; + }; } // @public export interface AgentPoolProfile { availabilityZones?: string[]; - cloudProviderProfile?: CloudProviderProfile; - count?: number; - maxCount?: number; - maxPods?: number; - minCount?: number; - mode?: Mode; nodeImageVersion?: string; - nodeLabels?: { - [propertyName: string]: string; - }; - nodeTaints?: string[]; + osSKU?: Ossku; osType?: OsType; - vmSize?: string; } // @public (undocumented) -export interface AgentPoolProperties extends AgentPoolProfile, AgentPoolProvisioningStatus { +export interface AgentPoolProperties extends AgentPoolProfile, AgentPoolUpdateProfile, AgentPoolProvisioningStatus { } -// @public -export type AgentPoolProvisioningState = string; - // @public export interface AgentPoolProvisioningStatus { - readonly provisioningState?: AgentPoolProvisioningState; + readonly provisioningState?: ResourceProvisioningState; status?: AgentPoolProvisioningStatusStatus; } +// @public +export interface AgentPoolProvisioningStatusOperationStatus { + // (undocumented) + error?: AgentPoolProvisioningStatusOperationStatusError; + // (undocumented) + operationId?: string; + // (undocumented) + status?: string; +} + // @public (undocumented) -export interface AgentPoolProvisioningStatusError { +export interface AgentPoolProvisioningStatusOperationStatusError { // (undocumented) code?: string; // (undocumented) @@ -173,53 +154,38 @@ export interface AgentPoolProvisioningStatusError { // @public export interface AgentPoolProvisioningStatusStatus { errorMessage?: string; - provisioningStatus?: AgentPoolProvisioningStatusStatusProvisioningStatus; - readyReplicas?: number; - replicas?: number; + operationStatus?: AgentPoolProvisioningStatusOperationStatus; + // (undocumented) + readyReplicas?: AgentPoolUpdateProfile[]; } // @public -export interface AgentPoolProvisioningStatusStatusProvisioningStatus { - // (undocumented) - error?: AgentPoolProvisioningStatusError; - // (undocumented) - operationId?: string; - phase?: string; +export interface AgentPoolUpdateHeaders { // (undocumented) - status?: string; + location?: string; } // @public export interface AgentPoolUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type AgentPoolUpdateResponse = AgentPool; - -// @public -export interface ArcAgentProfile { - agentAutoUpgrade?: AutoUpgradeOptions; - agentVersion?: string; +export interface AgentPoolUpdateProfile { + count?: number; + vmSize?: string; } // @public -export interface ArcAgentStatus { - agentVersion?: string; - coreCount?: number; - deploymentState?: DeploymentState; - errorMessage?: string; - lastConnectivityTime?: Date; - managedIdentityCertificateExpirationTime?: Date; - onboardingPublicKey?: string; -} +export type AgentPoolUpdateResponse = AgentPool; // @public -export type AutoUpgradeOptions = string; +export type AzureHybridBenefit = string; // @public export interface CloudProviderProfile { infraNetworkProfile?: CloudProviderProfileInfraNetworkProfile; - infraStorageProfile?: CloudProviderProfileInfraStorageProfile; } // @public @@ -227,11 +193,6 @@ export interface CloudProviderProfileInfraNetworkProfile { vnetSubnetIds?: string[]; } -// @public -export interface CloudProviderProfileInfraStorageProfile { - storageSpaceIds?: string[]; -} - // @public export interface ControlPlaneEndpointProfile { controlPlaneEndpoint?: ControlPlaneEndpointProfileControlPlaneEndpoint; @@ -240,7 +201,7 @@ export interface ControlPlaneEndpointProfile { // @public export interface ControlPlaneEndpointProfileControlPlaneEndpoint { hostIP?: string; - port?: string; + port?: number; } // @public @@ -251,7 +212,28 @@ export interface ControlPlaneProfile extends NamedAgentPoolProfile, ControlPlane export type CreatedByType = string; // @public -export type DeploymentState = string; +export interface CredentialResult { + readonly name?: string; + readonly value?: Uint8Array; +} + +// @public +export interface DeleteKubernetesVersionsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DeleteKubernetesVersionsResponse = HybridContainerServiceClientDeleteKubernetesVersionsHeaders; + +// @public +export interface DeleteVMSkusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DeleteVMSkusResponse = HybridContainerServiceClientDeleteVMSkusHeaders; // @public export interface ErrorAdditionalInfo { @@ -273,92 +255,109 @@ export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ExtendedLocation { + name?: string; + type?: ExtendedLocationTypes; +} + +// @public +export type ExtendedLocationTypes = string; + // @public export function getContinuationToken(page: unknown): string | undefined; // @public -export interface HttpProxyConfig extends HttpProxyConfigResponse, HttpProxyConfigPassword { +export interface GetKubernetesVersionsOptionalParams extends coreClient.OperationOptions { } -// @public (undocumented) -export interface HttpProxyConfigPassword { - password?: string; -} +// @public +export type GetKubernetesVersionsResponse = KubernetesVersionProfile; // @public -export interface HttpProxyConfigResponse { - httpProxy?: string; - httpsProxy?: string; - noProxy?: string[]; - trustedCa?: string; - username?: string; +export interface GetVMSkusOptionalParams extends coreClient.OperationOptions { } // @public -export interface HybridContainerService { - listOrchestrators(customLocationResourceUri: string, options?: HybridContainerServiceListOrchestratorsOptionalParams): Promise; - listVMSkus(customLocationResourceUri: string, options?: HybridContainerServiceListVMSkusOptionalParams): Promise; -} +export type GetVMSkusResponse = VmSkuProfile; // @public (undocumented) export class HybridContainerServiceClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridContainerServiceClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: HybridContainerServiceClientOptionalParams); // (undocumented) agentPoolOperations: AgentPoolOperations; // (undocumented) apiVersion: string; - // (undocumented) - hybridContainerService: HybridContainerService; + beginDeleteKubernetesVersions(customLocationResourceUri: string, options?: DeleteKubernetesVersionsOptionalParams): Promise, DeleteKubernetesVersionsResponse>>; + beginDeleteKubernetesVersionsAndWait(customLocationResourceUri: string, options?: DeleteKubernetesVersionsOptionalParams): Promise; + beginDeleteVMSkus(customLocationResourceUri: string, options?: DeleteVMSkusOptionalParams): Promise, DeleteVMSkusResponse>>; + beginDeleteVMSkusAndWait(customLocationResourceUri: string, options?: DeleteVMSkusOptionalParams): Promise; + beginPutKubernetesVersions(customLocationResourceUri: string, kubernetesVersions: KubernetesVersionProfile, options?: PutKubernetesVersionsOptionalParams): Promise, PutKubernetesVersionsResponse>>; + beginPutKubernetesVersionsAndWait(customLocationResourceUri: string, kubernetesVersions: KubernetesVersionProfile, options?: PutKubernetesVersionsOptionalParams): Promise; + beginPutVMSkus(customLocationResourceUri: string, skus: VmSkuProfile, options?: PutVMSkusOptionalParams): Promise, PutVMSkusResponse>>; + beginPutVMSkusAndWait(customLocationResourceUri: string, skus: VmSkuProfile, options?: PutVMSkusOptionalParams): Promise; + getKubernetesVersions(customLocationResourceUri: string, options?: GetKubernetesVersionsOptionalParams): Promise; + getVMSkus(customLocationResourceUri: string, options?: GetVMSkusOptionalParams): Promise; // (undocumented) hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; // (undocumented) + kubernetesVersions: KubernetesVersions; + // (undocumented) operations: Operations; // (undocumented) - provisionedClustersOperations: ProvisionedClustersOperations; + provisionedClusterInstances: ProvisionedClusterInstances; // (undocumented) - storageSpacesOperations: StorageSpacesOperations; + subscriptionId?: string; // (undocumented) - subscriptionId: string; + virtualNetworks: VirtualNetworks; // (undocumented) - virtualNetworksOperations: VirtualNetworksOperations; + vMSkus: VMSkus; } // @public -export interface HybridContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; +export interface HybridContainerServiceClientDeleteKubernetesVersionsHeaders { + // (undocumented) + location?: string; } // @public -export interface HybridContainerServiceListOrchestratorsOptionalParams extends coreClient.OperationOptions { +export interface HybridContainerServiceClientDeleteVMSkusHeaders { + // (undocumented) + location?: string; } // @public -export type HybridContainerServiceListOrchestratorsResponse = OrchestratorVersionProfileListResult; - -// @public -export interface HybridContainerServiceListVMSkusOptionalParams extends coreClient.OperationOptions { +export interface HybridContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; } -// @public -export type HybridContainerServiceListVMSkusResponse = VMSkuListResult; - // @public export interface HybridIdentityMetadata extends ProxyResource { - identity?: ProvisionedClusterIdentity; - readonly provisioningState?: string; + readonly provisioningState?: ResourceProvisioningState; publicKey?: string; resourceUid?: string; - readonly systemData?: SystemData; +} + +// @public +export interface HybridIdentityMetadataDeleteHeaders { + // (undocumented) + location?: string; } // @public export interface HybridIdentityMetadataDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export type HybridIdentityMetadataDeleteResponse = HybridIdentityMetadataDeleteHeaders; + // @public export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { } @@ -388,10 +387,11 @@ export type HybridIdentityMetadataListByClusterResponse = HybridIdentityMetadata // @public export interface HybridIdentityMetadataOperations { - delete(resourceGroupName: string, resourceName: string, hybridIdentityMetadataResourceName: string, options?: HybridIdentityMetadataDeleteOptionalParams): Promise; - get(resourceGroupName: string, resourceName: string, hybridIdentityMetadataResourceName: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, resourceName: string, options?: HybridIdentityMetadataListByClusterOptionalParams): PagedAsyncIterableIterator; - put(resourceGroupName: string, resourceName: string, hybridIdentityMetadataResourceName: string, body: HybridIdentityMetadata, options?: HybridIdentityMetadataPutOptionalParams): Promise; + beginDelete(connectedClusterResourceUri: string, options?: HybridIdentityMetadataDeleteOptionalParams): Promise, HybridIdentityMetadataDeleteResponse>>; + beginDeleteAndWait(connectedClusterResourceUri: string, options?: HybridIdentityMetadataDeleteOptionalParams): Promise; + get(connectedClusterResourceUri: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; + listByCluster(connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams): PagedAsyncIterableIterator; + put(connectedClusterResourceUri: string, body: HybridIdentityMetadata, options?: HybridIdentityMetadataPutOptionalParams): Promise; } // @public @@ -402,57 +402,40 @@ export interface HybridIdentityMetadataPutOptionalParams extends coreClient.Oper export type HybridIdentityMetadataPutResponse = HybridIdentityMetadata; // @public -export enum KnownAgentPoolProvisioningState { - Canceled = "Canceled", - Deleting = "Deleting", - Failed = "Failed", - InProgress = "InProgress", - Succeeded = "Succeeded" -} - -// @public -export enum KnownAutoUpgradeOptions { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" +export enum KnownActionType { + Internal = "Internal" } // @public -export enum KnownDeploymentState { +export enum KnownAddonPhase { Deleting = "deleting", Failed = "failed", Pending = "pending", Provisioned = "provisioned", Provisioning = "provisioning", + ProvisioningHelmChartInstalled = "provisioning {HelmChartInstalled}", + ProvisioningMSICertificateDownloaded = "provisioning {MSICertificateDownloaded}", Upgrading = "upgrading" } // @public -export enum KnownLicenseType { - None = "None", - WindowsServer = "Windows_Server" +export enum KnownAzureHybridBenefit { + False = "False", + NotApplicable = "NotApplicable", + True = "True" } // @public -export enum KnownLoadBalancerSku { - StackedKubeVip = "stacked-kube-vip", - StackedMetallb = "stacked-metallb", - Unmanaged = "unmanaged", - UnstackedHaproxy = "unstacked-haproxy" +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" } // @public -export enum KnownMode { - LB = "LB", - System = "System", - User = "User" +export enum KnownExtendedLocationTypes { + CustomLocation = "CustomLocation" } // @public @@ -461,6 +444,20 @@ export enum KnownNetworkPolicy { Flannel = "flannel" } +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownOssku { + CBLMariner = "CBLMariner", + Windows2019 = "Windows2019", + Windows2022 = "Windows2022" +} + // @public export enum KnownOsType { Linux = "Linux", @@ -480,491 +477,488 @@ export enum KnownProvisioningState { } // @public -export type LicenseType = string; - -// @public -export interface LinuxProfile { - linuxProfile?: LinuxProfileProperties; +export enum KnownResourceProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Created = "Created", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded", + Updating = "Updating", + Upgrading = "Upgrading" } // @public -export interface LinuxProfileProperties { - adminUsername?: string; - ssh?: LinuxProfilePropertiesSsh; +export interface KubernetesPatchVersions { + readiness?: KubernetesVersionReadiness[]; + upgrades?: string[]; } // @public -export interface LinuxProfilePropertiesSsh { - publicKeys?: LinuxProfilePropertiesSshPublicKeysItem[]; +export interface KubernetesVersionCapabilities { + // (undocumented) + supportPlan?: string[]; } -// @public (undocumented) -export interface LinuxProfilePropertiesSshPublicKeysItem { - keyData?: string; +// @public +export interface KubernetesVersionProfile extends ProxyResource { + extendedLocation?: ExtendedLocation; + readonly properties?: KubernetesVersionProfileProperties; } // @public -export interface LoadBalancerProfile extends NamedAgentPoolProfile, LinuxProfile { +export interface KubernetesVersionProfileList { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: KubernetesVersionProfile[]; } -// @public -export type LoadBalancerSku = string; +// @public (undocumented) +export interface KubernetesVersionProfileProperties { + readonly provisioningState?: ResourceProvisioningState; + values?: KubernetesVersionProperties[]; +} // @public -export type Mode = string; +export interface KubernetesVersionProperties { + readonly capabilities?: KubernetesVersionCapabilities; + readonly isPreview?: boolean; + readonly patchVersions?: { + [propertyName: string]: KubernetesPatchVersions; + }; + readonly version?: string; +} // @public -export interface NamedAgentPoolProfile extends AgentPoolProfile, AgentPoolName { +export interface KubernetesVersionReadiness { + readonly errorMessage?: string; + osSku?: Ossku; + readonly osType?: OsType; + readonly ready?: boolean; } // @public -export type NetworkPolicy = string; +export interface KubernetesVersions { + list(customLocationResourceUri: string, options?: KubernetesVersionsListOptionalParams): PagedAsyncIterableIterator; +} // @public -export interface NetworkProfile { - dnsServiceIP?: string; - loadBalancerProfile?: LoadBalancerProfile; - loadBalancerSku?: LoadBalancerSku; - networkPolicy?: NetworkPolicy; - podCidr?: string; - podCidrs?: string[]; - serviceCidr?: string; - serviceCidrs?: string[]; +export interface KubernetesVersionsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface Operations { - // (undocumented) - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} +export type KubernetesVersionsListNextResponse = KubernetesVersionProfileList; // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface KubernetesVersionsListOptionalParams extends coreClient.OperationOptions { } // @public -export type OperationsListNextResponse = ResourceProviderOperationList; +export type KubernetesVersionsListResponse = KubernetesVersionProfileList; // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface LinuxProfile { + linuxProfile?: LinuxProfileProperties; } // @public -export type OperationsListResponse = ResourceProviderOperationList; +export interface LinuxProfileProperties { + ssh?: LinuxProfilePropertiesSsh; +} // @public -export interface OrchestratorProfile { - readonly isPreview?: boolean; - readonly orchestratorType?: string; - readonly orchestratorVersion?: string; +export interface LinuxProfilePropertiesSsh { + publicKeys?: LinuxProfilePropertiesSshPublicKeysItem[]; } -// @public -export interface OrchestratorVersionProfile { - readonly default?: boolean; - readonly isPreview?: boolean; - readonly orchestratorType?: string; - readonly orchestratorVersion?: string; - upgrades?: OrchestratorProfile[]; +// @public (undocumented) +export interface LinuxProfilePropertiesSshPublicKeysItem { + keyData?: string; } // @public -export interface OrchestratorVersionProfileListResult { +export interface ListCredentialResponse { + // (undocumented) + error?: ListCredentialResponseError; readonly id?: string; readonly name?: string; - orchestrators?: OrchestratorVersionProfile[]; - readonly type?: string; + // (undocumented) + properties?: ListCredentialResponseProperties; + readonly resourceId?: string; + readonly status?: ResourceProvisioningState; } -// @public -export type OsType = string; - -// @public -export interface ProvisionedClusterIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ResourceIdentityType; +// @public (undocumented) +export interface ListCredentialResponseError { + // (undocumented) + code?: string; + // (undocumented) + message?: string; } -// @public -export interface ProvisionedClusterPoolUpgradeProfile { - readonly kubernetesVersion?: string; - readonly name?: string; - readonly osType?: OsType; - upgrades?: ProvisionedClusterPoolUpgradeProfileProperties[]; +// @public (undocumented) +export interface ListCredentialResponseProperties { + readonly kubeconfigs?: CredentialResult[]; } // @public -export interface ProvisionedClusterPoolUpgradeProfileProperties { - readonly isPreview?: boolean; - readonly kubernetesVersion?: string; +export interface NamedAgentPoolProfile extends AgentPoolProfile, AgentPoolUpdateProfile, AgentPoolName { } // @public -export interface ProvisionedClusters extends TrackedResource { - // (undocumented) - extendedLocation?: ProvisionedClustersExtendedLocation; - identity?: ProvisionedClusterIdentity; - properties?: ProvisionedClustersAllProperties; - readonly systemData?: SystemData; -} +export type NetworkPolicy = string; // @public -export interface ProvisionedClustersAllProperties extends ProvisionedClustersPropertiesWithSecrets, ProvisionedClustersCommonProperties { +export interface NetworkProfile { + loadBalancerProfile?: NetworkProfileLoadBalancerProfile; + networkPolicy?: NetworkPolicy; + podCidr?: string; } // @public -export interface ProvisionedClustersCommonProperties { - addonProfiles?: { - [propertyName: string]: AddonProfiles; - }; - agentPoolProfiles?: NamedAgentPoolProfile[]; - cloudProviderProfile?: CloudProviderProfile; - controlPlane?: ControlPlaneProfile; - enableRbac?: boolean; - features?: ProvisionedClustersCommonPropertiesFeatures; - kubernetesVersion?: string; - linuxProfile?: LinuxProfileProperties; - networkProfile?: NetworkProfile; - nodeResourceGroup?: string; - readonly provisioningState?: ProvisioningState; - readonly status?: ProvisionedClustersCommonPropertiesStatus; +export interface NetworkProfileLoadBalancerProfile { + count?: number; } // @public -export interface ProvisionedClustersCommonPropertiesFeatures { - arcAgentProfile?: ArcAgentProfile; +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; } // @public -export interface ProvisionedClustersCommonPropertiesStatus { - addonStatus?: { - [propertyName: string]: AddonStatus; - }; - errorMessage?: string; - featuresStatus?: ProvisionedClustersCommonPropertiesStatusFeaturesStatus; - provisioningStatus?: ProvisionedClustersCommonPropertiesStatusProvisioningStatus; +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; } // @public -export interface ProvisionedClustersCommonPropertiesStatusFeaturesStatus { - arcAgentStatus?: ArcAgentStatus; +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; } // @public -export interface ProvisionedClustersCommonPropertiesStatusProvisioningStatus { - // (undocumented) - error?: ProvisionedClustersCommonPropertiesStatusProvisioningStatusError; - // (undocumented) - operationId?: string; - phase?: string; - // (undocumented) - status?: string; -} - -// @public (undocumented) -export interface ProvisionedClustersCommonPropertiesStatusProvisioningStatusError { - // (undocumented) - code?: string; +export interface Operations { // (undocumented) - message?: string; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface ProvisionedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ProvisionedClustersCreateOrUpdateResponse = ProvisionedClustersResponse; +export type OperationsListNextResponse = OperationListResult; // @public -export interface ProvisionedClustersDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public (undocumented) -export interface ProvisionedClustersExtendedLocation { - name?: string; - type?: string; +export interface OperationsListOptionalParams extends coreClient.OperationOptions { } // @public -export interface ProvisionedClustersGetOptionalParams extends coreClient.OperationOptions { -} +export type OperationsListResponse = OperationListResult; // @public -export type ProvisionedClustersGetResponse = ProvisionedClustersResponse; +export type Origin = string; // @public -export interface ProvisionedClustersGetUpgradeProfileOptionalParams extends coreClient.OperationOptions { -} +export type Ossku = string; // @public -export type ProvisionedClustersGetUpgradeProfileResponse = ProvisionedClusterUpgradeProfile; +export type OsType = string; // @public -export interface ProvisionedClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ProvisionedClusterInstances { + beginCreateOrUpdate(connectedClusterResourceUri: string, provisionedClusterInstance: ProvisionedClusters, options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams): Promise, ProvisionedClusterInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(connectedClusterResourceUri: string, provisionedClusterInstance: ProvisionedClusters, options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams): Promise; + beginDelete(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesDeleteOptionalParams): Promise, ProvisionedClusterInstancesDeleteResponse>>; + beginDeleteAndWait(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesDeleteOptionalParams): Promise; + beginListAdminKubeconfig(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams): Promise, ProvisionedClusterInstancesListAdminKubeconfigResponse>>; + beginListAdminKubeconfigAndWait(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams): Promise; + beginListUserKubeconfig(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams): Promise, ProvisionedClusterInstancesListUserKubeconfigResponse>>; + beginListUserKubeconfigAndWait(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams): Promise; + get(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesGetOptionalParams): Promise; + getUpgradeProfile(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesGetUpgradeProfileOptionalParams): Promise; + list(connectedClusterResourceUri: string, options?: ProvisionedClusterInstancesListOptionalParams): PagedAsyncIterableIterator; } // @public -export type ProvisionedClustersListByResourceGroupNextResponse = ProvisionedClustersResponseListResult; - -// @public -export interface ProvisionedClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ProvisionedClusterInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ProvisionedClustersListByResourceGroupResponse = ProvisionedClustersResponseListResult; +export type ProvisionedClusterInstancesCreateOrUpdateResponse = ProvisionedClusters; // @public -export interface ProvisionedClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface ProvisionedClusterInstancesDeleteHeaders { + // (undocumented) + location?: string; } // @public -export type ProvisionedClustersListBySubscriptionNextResponse = ProvisionedClustersResponseListResult; - -// @public -export interface ProvisionedClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface ProvisionedClusterInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ProvisionedClustersListBySubscriptionResponse = ProvisionedClustersResponseListResult; +export type ProvisionedClusterInstancesDeleteResponse = ProvisionedClusterInstancesDeleteHeaders; // @public -export interface ProvisionedClustersOperations { - beginCreateOrUpdate(resourceGroupName: string, resourceName: string, provisionedClusters: ProvisionedClusters, options?: ProvisionedClustersCreateOrUpdateOptionalParams): Promise, ProvisionedClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, provisionedClusters: ProvisionedClusters, options?: ProvisionedClustersCreateOrUpdateOptionalParams): Promise; - beginUpdate(resourceGroupName: string, resourceName: string, provisionedClusters: ProvisionedClustersPatch, options?: ProvisionedClustersUpdateOptionalParams): Promise, ProvisionedClustersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, resourceName: string, provisionedClusters: ProvisionedClustersPatch, options?: ProvisionedClustersUpdateOptionalParams): Promise; - beginUpgradeNodeImageVersionForEntireCluster(resourceGroupName: string, resourceName: string, options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams): Promise, void>>; - beginUpgradeNodeImageVersionForEntireClusterAndWait(resourceGroupName: string, resourceName: string, options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams): Promise; - delete(resourceGroupName: string, resourceName: string, options?: ProvisionedClustersDeleteOptionalParams): Promise; - get(resourceGroupName: string, resourceName: string, options?: ProvisionedClustersGetOptionalParams): Promise; - getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: ProvisionedClustersGetUpgradeProfileOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ProvisionedClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ProvisionedClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface ProvisionedClusterInstancesGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface ProvisionedClustersPatch { - tags?: { - [propertyName: string]: string; - }; -} +export type ProvisionedClusterInstancesGetResponse = ProvisionedClusters; // @public -export interface ProvisionedClustersPropertiesWithoutSecrets { - aadProfile?: AADProfileResponse; - httpProxyConfig?: HttpProxyConfigResponse; - windowsProfile?: WindowsProfileResponse; +export interface ProvisionedClusterInstancesGetUpgradeProfileOptionalParams extends coreClient.OperationOptions { } // @public -export interface ProvisionedClustersPropertiesWithSecrets { - aadProfile?: AADProfile; - httpProxyConfig?: HttpProxyConfig; - windowsProfile?: WindowsProfile; -} +export type ProvisionedClusterInstancesGetUpgradeProfileResponse = ProvisionedClusterUpgradeProfile; // @public -export interface ProvisionedClustersResponse extends TrackedResource { +export interface ProvisionedClusterInstancesListAdminKubeconfigHeaders { // (undocumented) - extendedLocation?: ProvisionedClustersResponseExtendedLocation; - identity?: ProvisionedClusterIdentity; - // (undocumented) - properties?: ProvisionedClustersResponseProperties; - readonly systemData?: SystemData; + location?: string; } -// @public (undocumented) -export interface ProvisionedClustersResponseExtendedLocation { - name?: string; - type?: string; +// @public +export interface ProvisionedClusterInstancesListAdminKubeconfigOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } -// @public (undocumented) -export interface ProvisionedClustersResponseListResult { - // (undocumented) - nextLink?: string; - // (undocumented) - value?: ProvisionedClustersResponse[]; -} +// @public +export type ProvisionedClusterInstancesListAdminKubeconfigResponse = ListCredentialResponse; -// @public (undocumented) -export interface ProvisionedClustersResponseProperties extends ProvisionedClustersPropertiesWithoutSecrets, ProvisionedClustersCommonProperties { +// @public +export interface ProvisionedClusterInstancesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ProvisionedClustersUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export type ProvisionedClusterInstancesListNextResponse = ProvisionedClustersListResult; + +// @public +export interface ProvisionedClusterInstancesListOptionalParams extends coreClient.OperationOptions { } // @public -export type ProvisionedClustersUpdateResponse = ProvisionedClustersResponse; +export type ProvisionedClusterInstancesListResponse = ProvisionedClustersListResult; // @public -export interface ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ProvisionedClusterInstancesListUserKubeconfigHeaders { + // (undocumented) + location?: string; } // @public -export interface ProvisionedClusterUpgradeProfile extends ProxyResource { - agentPoolProfiles: ProvisionedClusterPoolUpgradeProfile[]; - controlPlaneProfile: ProvisionedClusterPoolUpgradeProfile; - readonly provisioningState?: string; +export interface ProvisionedClusterInstancesListUserKubeconfigOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ProvisioningState = string; +export type ProvisionedClusterInstancesListUserKubeconfigResponse = ListCredentialResponse; // @public -export interface ProxyResource extends Resource { +export interface ProvisionedClusterLicenseProfile { + azureHybridBenefit?: AzureHybridBenefit; } // @public -export interface Resource { - readonly id?: string; +export interface ProvisionedClusterPoolUpgradeProfile { + readonly kubernetesVersion?: string; readonly name?: string; - readonly type?: string; + readonly osType?: OsType; + upgrades?: ProvisionedClusterPoolUpgradeProfileProperties[]; } // @public -export type ResourceIdentityType = "None" | "SystemAssigned"; +export interface ProvisionedClusterPoolUpgradeProfileProperties { + readonly isPreview?: boolean; + readonly kubernetesVersion?: string; +} // @public -export interface ResourceProviderOperation { - display?: ResourceProviderOperationDisplay; - isDataAction?: string; - name?: string; +export interface ProvisionedClusterProperties { + agentPoolProfiles?: NamedAgentPoolProfile[]; + cloudProviderProfile?: CloudProviderProfile; + controlPlane?: ControlPlaneProfile; + kubernetesVersion?: string; + licenseProfile?: ProvisionedClusterLicenseProfile; + linuxProfile?: LinuxProfileProperties; + networkProfile?: NetworkProfile; + readonly provisioningState?: ResourceProvisioningState; + readonly status?: ProvisionedClusterPropertiesStatus; } // @public -export interface ResourceProviderOperationDisplay { - description?: string; - operation?: string; - provider?: string; - resource?: string; +export interface ProvisionedClusterPropertiesStatus { + controlPlaneStatus?: AddonStatusProfile[]; + errorMessage?: string; + operationStatus?: ProvisionedClusterPropertiesStatusOperationStatus; } // @public -export interface ResourceProviderOperationList { +export interface ProvisionedClusterPropertiesStatusOperationStatus { // (undocumented) - nextLink?: string; + error?: ProvisionedClusterPropertiesStatusOperationStatusError; + // (undocumented) + operationId?: string; // (undocumented) - value?: ResourceProviderOperation[]; + status?: string; } -// @public -export interface StorageSpaces extends TrackedResource { +// @public (undocumented) +export interface ProvisionedClusterPropertiesStatusOperationStatusError { // (undocumented) - extendedLocation?: StorageSpacesExtendedLocation; - properties?: StorageSpacesProperties; - readonly systemData?: SystemData; + code?: string; + // (undocumented) + message?: string; } // @public -export interface StorageSpacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ProvisionedClusters extends ProxyResource { + extendedLocation?: ExtendedLocation; + properties?: ProvisionedClusterProperties; } // @public -export type StorageSpacesCreateOrUpdateResponse = StorageSpaces; - -// @public -export interface StorageSpacesDeleteOptionalParams extends coreClient.OperationOptions { +export interface ProvisionedClustersListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: ProvisionedClusters[]; } -// @public (undocumented) -export interface StorageSpacesExtendedLocation { - name?: string; - type?: string; +// @public +export interface ProvisionedClusterUpgradeProfile extends ProxyResource { + agentPoolProfiles: ProvisionedClusterPoolUpgradeProfile[]; + controlPlaneProfile: ProvisionedClusterPoolUpgradeProfile; + readonly provisioningState?: ResourceProvisioningState; } // @public -export interface StorageSpacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} +export type ProvisioningState = string; // @public -export type StorageSpacesListByResourceGroupNextResponse = StorageSpacesListResult; +export interface ProxyResource extends Resource { +} // @public -export interface StorageSpacesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface PutKubernetesVersionsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type StorageSpacesListByResourceGroupResponse = StorageSpacesListResult; +export type PutKubernetesVersionsResponse = KubernetesVersionProfile; // @public -export interface StorageSpacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface PutVMSkusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type StorageSpacesListBySubscriptionNextResponse = StorageSpacesListResult; +export type PutVMSkusResponse = VmSkuProfile; // @public -export interface StorageSpacesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; } // @public -export type StorageSpacesListBySubscriptionResponse = StorageSpacesListResult; - -// @public (undocumented) -export interface StorageSpacesListResult { - // (undocumented) - nextLink?: string; - // (undocumented) - value?: StorageSpaces[]; -} +export type ResourceProvisioningState = string; // @public -export interface StorageSpacesOperations { - beginCreateOrUpdate(resourceGroupName: string, storageSpacesName: string, storageSpaces: StorageSpaces, options?: StorageSpacesCreateOrUpdateOptionalParams): Promise, StorageSpacesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, storageSpacesName: string, storageSpaces: StorageSpaces, options?: StorageSpacesCreateOrUpdateOptionalParams): Promise; - beginUpdate(resourceGroupName: string, storageSpacesName: string, storageSpaces: StorageSpacesPatch, options?: StorageSpacesUpdateOptionalParams): Promise, StorageSpacesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, storageSpacesName: string, storageSpaces: StorageSpacesPatch, options?: StorageSpacesUpdateOptionalParams): Promise; - delete(resourceGroupName: string, storageSpacesName: string, options?: StorageSpacesDeleteOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: StorageSpacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: StorageSpacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - retrieve(resourceGroupName: string, storageSpacesName: string, options?: StorageSpacesRetrieveOptionalParams): Promise; +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; } // @public -export interface StorageSpacesPatch { +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; } // @public -export interface StorageSpacesProperties { +export interface VirtualNetwork extends TrackedResource { // (undocumented) - hciStorageProfile?: StorageSpacesPropertiesHciStorageProfile; - readonly provisioningState?: ProvisioningState; - status?: StorageSpacesPropertiesStatus; + extendedLocation?: VirtualNetworkExtendedLocation; + properties?: VirtualNetworkProperties; +} + +// @public (undocumented) +export interface VirtualNetworkExtendedLocation { + name?: string; + type?: string; +} + +// @public +export interface VirtualNetworkProperties { + dhcpServers?: string[]; + dnsServers?: string[]; + gateway?: string; // (undocumented) - vmwareStorageProfile?: StorageSpacesPropertiesVmwareStorageProfile; + infraVnetProfile?: VirtualNetworkPropertiesInfraVnetProfile; + ipAddressPrefix?: string; + readonly provisioningState?: ProvisioningState; + readonly status?: VirtualNetworkPropertiesStatus; + vipPool?: VirtualNetworkPropertiesVipPoolItem[]; + vlanID?: number; + vmipPool?: VirtualNetworkPropertiesVmipPoolItem[]; } // @public (undocumented) -export interface StorageSpacesPropertiesHciStorageProfile { +export interface VirtualNetworkPropertiesInfraVnetProfile { + hci?: VirtualNetworkPropertiesInfraVnetProfileHci; + vmware?: VirtualNetworkPropertiesInfraVnetProfileVmware; +} + +// @public +export interface VirtualNetworkPropertiesInfraVnetProfileHci { mocGroup?: string; mocLocation?: string; - mocStorageContainer?: string; + mocVnetName?: string; +} + +// @public +export interface VirtualNetworkPropertiesInfraVnetProfileVmware { + segmentName?: string; } // @public -export interface StorageSpacesPropertiesStatus { - provisioningStatus?: StorageSpacesPropertiesStatusProvisioningStatus; +export interface VirtualNetworkPropertiesStatus { + operationStatus?: VirtualNetworkPropertiesStatusOperationStatus; } // @public -export interface StorageSpacesPropertiesStatusProvisioningStatus { +export interface VirtualNetworkPropertiesStatusOperationStatus { // (undocumented) - error?: StorageSpacesPropertiesStatusProvisioningStatusError; + error?: VirtualNetworkPropertiesStatusOperationStatusError; // (undocumented) operationId?: string; phase?: string; @@ -973,7 +967,7 @@ export interface StorageSpacesPropertiesStatusProvisioningStatus { } // @public (undocumented) -export interface StorageSpacesPropertiesStatusProvisioningStatusError { +export interface VirtualNetworkPropertiesStatusOperationStatusError { // (undocumented) code?: string; // (undocumented) @@ -981,73 +975,53 @@ export interface StorageSpacesPropertiesStatusProvisioningStatusError { } // @public (undocumented) -export interface StorageSpacesPropertiesVmwareStorageProfile { - datacenter?: string; - datastore?: string; - folder?: string; - resourcePool?: string; +export interface VirtualNetworkPropertiesVipPoolItem { + endIP?: string; + startIP?: string; } -// @public -export interface StorageSpacesRetrieveOptionalParams extends coreClient.OperationOptions { +// @public (undocumented) +export interface VirtualNetworkPropertiesVmipPoolItem { + endIP?: string; + startIP?: string; } // @public -export type StorageSpacesRetrieveResponse = StorageSpaces; +export interface VirtualNetworks { + beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, VirtualNetworksDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: VirtualNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + retrieve(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksRetrieveOptionalParams): Promise; +} // @public -export interface StorageSpacesUpdateOptionalParams extends coreClient.OperationOptions { +export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type StorageSpacesUpdateResponse = StorageSpaces; +export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; // @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VirtualNetworks extends TrackedResource { +export interface VirtualNetworksDeleteHeaders { // (undocumented) - extendedLocation?: VirtualNetworksExtendedLocation; - properties?: VirtualNetworksProperties; - readonly systemData?: SystemData; + location?: string; } // @public -export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualNetworksCreateOrUpdateResponse = VirtualNetworks; - -// @public -export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public (undocumented) -export interface VirtualNetworksExtendedLocation { - name?: string; - type?: string; -} +export type VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; // @public export interface VirtualNetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { @@ -1082,19 +1056,7 @@ export interface VirtualNetworksListResult { // (undocumented) nextLink?: string; // (undocumented) - value?: VirtualNetworks[]; -} - -// @public -export interface VirtualNetworksOperations { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworksName: string, virtualNetworks: VirtualNetworks, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworksName: string, virtualNetworks: VirtualNetworks, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualNetworksName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualNetworksName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams): Promise; - delete(resourceGroupName: string, virtualNetworksName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VirtualNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - retrieve(resourceGroupName: string, virtualNetworksName: string, options?: VirtualNetworksRetrieveOptionalParams): Promise; + value?: VirtualNetwork[]; } // @public @@ -1105,119 +1067,80 @@ export interface VirtualNetworksPatch { } // @public -export interface VirtualNetworksProperties { - readonly dhcpServers?: string[]; - dnsServers?: string[]; - gateway?: string; - // (undocumented) - infraVnetProfile?: VirtualNetworksPropertiesInfraVnetProfile; - ipAddressPrefix?: string; - readonly provisioningState?: ProvisioningState; - readonly status?: VirtualNetworksPropertiesStatus; - vipPool?: VirtualNetworksPropertiesVipPoolItem[]; - readonly vlanID?: string; - vmipPool?: VirtualNetworksPropertiesVmipPoolItem[]; +export interface VirtualNetworksRetrieveOptionalParams extends coreClient.OperationOptions { } -// @public (undocumented) -export interface VirtualNetworksPropertiesInfraVnetProfile { - hci?: VirtualNetworksPropertiesInfraVnetProfileHci; - networkCloud?: VirtualNetworksPropertiesInfraVnetProfileNetworkCloud; - vmware?: VirtualNetworksPropertiesInfraVnetProfileVmware; -} +// @public +export type VirtualNetworksRetrieveResponse = VirtualNetwork; // @public -export interface VirtualNetworksPropertiesInfraVnetProfileHci { - mocGroup?: string; - mocLocation?: string; - mocVnetName?: string; +export interface VirtualNetworksUpdateHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualNetworksPropertiesInfraVnetProfileNetworkCloud { - networkId?: string; +export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface VirtualNetworksPropertiesInfraVnetProfileVmware { - segmentName?: string; -} +export type VirtualNetworksUpdateResponse = VirtualNetwork; // @public -export interface VirtualNetworksPropertiesStatus { - provisioningStatus?: VirtualNetworksPropertiesStatusProvisioningStatus; +export interface VmSkuCapabilities { + readonly name?: string; + readonly value?: string; } // @public -export interface VirtualNetworksPropertiesStatusProvisioningStatus { - // (undocumented) - error?: VirtualNetworksPropertiesStatusProvisioningStatusError; - // (undocumented) - operationId?: string; - phase?: string; - // (undocumented) - status?: string; +export interface VmSkuProfile extends ProxyResource { + extendedLocation?: ExtendedLocation; + readonly properties?: VmSkuProfileProperties; } -// @public (undocumented) -export interface VirtualNetworksPropertiesStatusProvisioningStatusError { +// @public +export interface VmSkuProfileList { // (undocumented) - code?: string; + nextLink?: string; // (undocumented) - message?: string; + value?: VmSkuProfile[]; } // @public (undocumented) -export interface VirtualNetworksPropertiesVipPoolItem { - endIP?: string; - startIP?: string; -} - -// @public (undocumented) -export interface VirtualNetworksPropertiesVmipPoolItem { - endIP?: string; - startIP?: string; +export interface VmSkuProfileProperties { + readonly provisioningState?: ResourceProvisioningState; + values?: VmSkuProperties[]; } // @public -export interface VirtualNetworksRetrieveOptionalParams extends coreClient.OperationOptions { +export interface VmSkuProperties { + readonly capabilities?: VmSkuCapabilities[]; + readonly name?: string; + readonly resourceType?: string; + readonly size?: string; + readonly tier?: string; } // @public -export type VirtualNetworksRetrieveResponse = VirtualNetworks; - -// @public -export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VMSkus { + list(customLocationResourceUri: string, options?: VMSkusListOptionalParams): PagedAsyncIterableIterator; } // @public -export type VirtualNetworksUpdateResponse = VirtualNetworks; - -// @public -export interface VMSkuListResult { - readonly id?: string; - readonly name?: string; - readonly type?: string; - readonly vmSKUs?: string[]; +export interface VMSkusListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface WindowsProfile extends WindowsProfileResponse, WindowsProfilePassword { -} +export type VMSkusListNextResponse = VmSkuProfileList; // @public -export interface WindowsProfilePassword { - adminPassword?: string; +export interface VMSkusListOptionalParams extends coreClient.OperationOptions { } // @public -export interface WindowsProfileResponse { - adminUsername?: string; - enableCsiProxy?: boolean; - licenseType?: LicenseType; -} +export type VMSkusListResponse = VmSkuProfileList; // (No @packageDocumentation comment for this package) diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolCreateOrUpdateSample.ts deleted file mode 100644 index a31077323410..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPool, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Creates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutAgentPool.json - */ -async function putAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool: AgentPool = { - count: 1, - location: "westus", - osType: "Linux", - vmSize: "Standard_A4_v2" - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - putAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolDeleteSample.ts deleted file mode 100644 index 0db4b933c84b..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Deletes the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteAgentPool.json - */ -async function deleteAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.delete( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - deleteAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolGetSample.ts deleted file mode 100644 index f6950071b881..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetAgentPool.json - */ -async function getAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.get( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - getAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolListByProvisionedClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolListByProvisionedClusterSample.ts deleted file mode 100644 index 44ecd86d04e8..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolListByProvisionedClusterSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the agent pools in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pools in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListAgentPoolByProvisionedCluster.json - */ -async function listAgentPoolByProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.listByProvisionedCluster( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - listAgentPoolByProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolUpdateSample.ts deleted file mode 100644 index 4ae99933a810..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/agentPoolUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPool, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Updates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateAgentPool.json - */ -async function updateAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool: AgentPool = { count: 3, location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.update( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - updateAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListOrchestratorsSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListOrchestratorsSample.ts deleted file mode 100644 index d4c99dd17707..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListOrchestratorsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the available orchestrators in a custom location for HybridAKS - * - * @summary Lists the available orchestrators in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOrchestrators.json - */ -async function listOrchestrators() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listOrchestrators( - customLocationResourceUri - ); - console.log(result); -} - -async function main() { - listOrchestrators(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListVMSkusSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListVMSkusSample.ts deleted file mode 100644 index 87b4ef417862..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridContainerServiceListVMSkusSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the available VM SKUs in a custom location for HybridAKS - * - * @summary Lists the available VM SKUs in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVMSkus.json - */ -async function listVMSkus() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listVMSkus( - customLocationResourceUri - ); - console.log(result); -} - -async function main() { - listVMSkus(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataDeleteSample.ts deleted file mode 100644 index e2df5c7caaeb..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the hybrid identity metadata proxy resource. - * - * @summary Deletes the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataGetSample.ts deleted file mode 100644 index d67db4928132..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the hybrid identity metadata proxy resource. - * - * @summary Get the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetHybridIdentityMetadata.json - */ -async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - getHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataListByClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataListByClusterSample.ts deleted file mode 100644 index df8c8227e2c8..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the hybrid identity metadata proxy resource in a cluster. - * - * @summary Lists the hybrid identity metadata proxy resource in a cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/HybridIdentityMetadataListByCluster.json - */ -async function hybridIdentityMetadataListByCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByCluster( - resourceGroupName, - resourceName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hybridIdentityMetadataListByCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataPutSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataPutSample.ts deleted file mode 100644 index 2b75ca916f88..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/hybridIdentityMetadataPutSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HybridIdentityMetadata, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * - * @summary Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const body: HybridIdentityMetadata = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - resourceUid: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c" - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.put( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - body - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/operationsListSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/operationsListSample.ts deleted file mode 100644 index 9c9b1e00ba99..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to - * - * @summary - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOperations.json - */ -async function listOperations() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersCreateOrUpdateSample.ts deleted file mode 100644 index fa9acfd4c2fc..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProvisionedClusters, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the Hybrid AKS provisioned cluster - * - * @summary Creates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutProvisionedCluster.json - */ -async function putProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters: ProvisionedClusters = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - agentPoolProfiles: [ - { - name: "default-nodepool-1", - count: 1, - osType: "Linux", - vmSize: "Standard_A4_v2" - } - ], - cloudProviderProfile: { - infraNetworkProfile: { - vnetSubnetIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static" - ] - }, - infraStorageProfile: { - storageSpaceIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/storageSpaces/test-storage" - ] - } - }, - controlPlane: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......" } - ] - } - }, - osType: "Linux", - vmSize: "Standard_A4_v2" - }, - kubernetesVersion: "v1.20.5", - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......." } - ] - } - }, - networkProfile: { - loadBalancerProfile: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB2NzaC1yc2EAAAADAQABAAACAQCY......" } - ] - } - }, - osType: "Linux", - vmSize: "Standard_K8S3_v1" - }, - loadBalancerSku: "unstacked-haproxy", - networkPolicy: "calico", - podCidr: "10.244.0.0/16" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - putProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersDeleteSample.ts deleted file mode 100644 index f0419cdf136d..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS provisioned cluster - * - * @summary Deletes the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteProvisionedCluster.json - */ -async function deleteProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.delete( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - deleteProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetSample.ts deleted file mode 100644 index eef11b817978..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster - * - * @summary Gets the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetProvisionedCluster.json - */ -async function getProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.get( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - getProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetUpgradeProfileSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetUpgradeProfileSample.ts deleted file mode 100644 index 1eaef15ad061..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersGetUpgradeProfileSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the upgrade profile of a provisioned cluster. - * - * @summary Gets the upgrade profile of a provisioned cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersGetUpgradeProfile.json - */ -async function getUpgradeProfileForProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.getUpgradeProfile( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - getUpgradeProfileForProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListByResourceGroupSample.ts deleted file mode 100644 index b71415a0a104..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a resource group - * - * @summary Gets the Hybrid AKS provisioned cluster in a resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterByResourceGroup.json - */ -async function listProvisionedClusterByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListBySubscriptionSample.ts deleted file mode 100644 index 199a9aadf706..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a subscription - * - * @summary Gets the Hybrid AKS provisioned cluster in a subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterBySubscription.json - */ -async function listProvisionedClusterBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpdateSample.ts deleted file mode 100644 index dead5340f95e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProvisionedClustersPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates the Hybrid AKS provisioned cluster - * - * @summary Updates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateProvisionedCluster.json - */ -async function updateProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters: ProvisionedClustersPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - updateProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts deleted file mode 100644 index 2494d7120b4e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * - * @summary Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersUpgradeNodeImageVersionForEntireCluster.json - */ -async function upgradeClusterNodeImageVersion() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginUpgradeNodeImageVersionForEntireClusterAndWait( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - upgradeClusterNodeImageVersion(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesCreateOrUpdateSample.ts deleted file mode 100644 index 70dff9e96199..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageSpaces, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS storage object - * - * @summary Puts the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutStorageSpace.json - */ -async function putStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces: StorageSpaces = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - hciStorageProfile: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocStorageContainer: "WssdStorageContainer" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - putStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesDeleteSample.ts deleted file mode 100644 index 75e6f8a01706..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS storage object - * - * @summary Deletes the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteStorageSpace.json - */ -async function deleteStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.delete( - resourceGroupName, - storageSpacesName - ); - console.log(result); -} - -async function main() { - deleteStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListByResourceGroupSample.ts deleted file mode 100644 index b772b64f2b19..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by resource group - * - * @summary List the Hybrid AKS storage object by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceByResourceGroup.json - */ -async function listStorageSpaceByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListBySubscriptionSample.ts deleted file mode 100644 index 885c0058294e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by subscription - * - * @summary List the Hybrid AKS storage object by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceBySubscription.json - */ -async function listStorageSpaceBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesRetrieveSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesRetrieveSample.ts deleted file mode 100644 index 2c23057df7e9..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesRetrieveSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS storage space object - * - * @summary Gets the Hybrid AKS storage space object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetStorageSpace.json - */ -async function getStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.retrieve( - resourceGroupName, - storageSpacesName - ); - console.log(result); -} - -async function main() { - getStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesUpdateSample.ts deleted file mode 100644 index 44947117c4bd..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/storageSpacesUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageSpacesPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS storage object - * - * @summary Patches the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateStorageSpace.json - */ -async function updateStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces: StorageSpacesPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - updateStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 19245f0e9171..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualNetworks, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS virtual network - * - * @summary Puts the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutVirtualNetwork.json - */ -async function putVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks: VirtualNetworks = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - infraVnetProfile: { - hci: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocVnetName: "test-vnet" - } - }, - vipPool: [{ endIP: "192.168.0.50", startIP: "192.168.0.10" }], - vmipPool: [{ endIP: "192.168.0.130", startIP: "192.168.0.110" }] - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - putVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksDeleteSample.ts deleted file mode 100644 index cfb751c62769..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS virtual network - * - * @summary Deletes the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteVirtualNetwork.json - */ -async function deleteVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.delete( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListByResourceGroupSample.ts deleted file mode 100644 index 146f24fba3bc..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by resource group - * - * @summary Lists the Hybrid AKS virtual networks by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkByResourceGroup.json - */ -async function listVirtualNetworkByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListBySubscriptionSample.ts deleted file mode 100644 index 0b0714c82049..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by subscription - * - * @summary Lists the Hybrid AKS virtual networks by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkBySubscription.json - */ -async function listVirtualNetworkBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksRetrieveSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksRetrieveSample.ts deleted file mode 100644 index d0dc59ce94f0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksRetrieveSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS virtual network - * - * @summary Gets the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetVirtualNetwork.json - */ -async function getVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.retrieve( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - getVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksUpdateSample.ts deleted file mode 100644 index 6542be84a004..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples-dev/virtualNetworksUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualNetworksPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS virtual network - * - * @summary Patches the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateVirtualNetwork.json - */ -async function updateVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks: VirtualNetworksPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - updateVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/README.md b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/README.md deleted file mode 100644 index afd0771f3ef5..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolCreateOrUpdateSample.js][agentpoolcreateorupdatesample] | Creates the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutAgentPool.json | -| [agentPoolDeleteSample.js][agentpooldeletesample] | Deletes the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteAgentPool.json | -| [agentPoolGetSample.js][agentpoolgetsample] | Gets the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetAgentPool.json | -| [agentPoolListByProvisionedClusterSample.js][agentpoollistbyprovisionedclustersample] | Gets the agent pools in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListAgentPoolByProvisionedCluster.json | -| [agentPoolUpdateSample.js][agentpoolupdatesample] | Updates the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateAgentPool.json | -| [hybridContainerServiceListOrchestratorsSample.js][hybridcontainerservicelistorchestratorssample] | Lists the available orchestrators in a custom location for HybridAKS x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOrchestrators.json | -| [hybridContainerServiceListVMSkusSample.js][hybridcontainerservicelistvmskussample] | Lists the available VM SKUs in a custom location for HybridAKS x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVMSkus.json | -| [hybridIdentityMetadataDeleteSample.js][hybrididentitymetadatadeletesample] | Deletes the hybrid identity metadata proxy resource. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteHybridIdentityMetadata.json | -| [hybridIdentityMetadataGetSample.js][hybrididentitymetadatagetsample] | Get the hybrid identity metadata proxy resource. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetHybridIdentityMetadata.json | -| [hybridIdentityMetadataListByClusterSample.js][hybrididentitymetadatalistbyclustersample] | Lists the hybrid identity metadata proxy resource in a cluster. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/HybridIdentityMetadataListByCluster.json | -| [hybridIdentityMetadataPutSample.js][hybrididentitymetadataputsample] | Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/CreateHybridIdentityMetadata.json | -| [operationsListSample.js][operationslistsample] | x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOperations.json | -| [provisionedClustersCreateOrUpdateSample.js][provisionedclusterscreateorupdatesample] | Creates the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutProvisionedCluster.json | -| [provisionedClustersDeleteSample.js][provisionedclustersdeletesample] | Deletes the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteProvisionedCluster.json | -| [provisionedClustersGetSample.js][provisionedclustersgetsample] | Gets the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetProvisionedCluster.json | -| [provisionedClustersGetUpgradeProfileSample.js][provisionedclustersgetupgradeprofilesample] | Gets the upgrade profile of a provisioned cluster. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersGetUpgradeProfile.json | -| [provisionedClustersListByResourceGroupSample.js][provisionedclusterslistbyresourcegroupsample] | Gets the Hybrid AKS provisioned cluster in a resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterByResourceGroup.json | -| [provisionedClustersListBySubscriptionSample.js][provisionedclusterslistbysubscriptionsample] | Gets the Hybrid AKS provisioned cluster in a subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterBySubscription.json | -| [provisionedClustersUpdateSample.js][provisionedclustersupdatesample] | Updates the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateProvisionedCluster.json | -| [provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js][provisionedclustersupgradenodeimageversionforentireclustersample] | Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersUpgradeNodeImageVersionForEntireCluster.json | -| [storageSpacesCreateOrUpdateSample.js][storagespacescreateorupdatesample] | Puts the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutStorageSpace.json | -| [storageSpacesDeleteSample.js][storagespacesdeletesample] | Deletes the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteStorageSpace.json | -| [storageSpacesListByResourceGroupSample.js][storagespaceslistbyresourcegroupsample] | List the Hybrid AKS storage object by resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceByResourceGroup.json | -| [storageSpacesListBySubscriptionSample.js][storagespaceslistbysubscriptionsample] | List the Hybrid AKS storage object by subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceBySubscription.json | -| [storageSpacesRetrieveSample.js][storagespacesretrievesample] | Gets the Hybrid AKS storage space object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetStorageSpace.json | -| [storageSpacesUpdateSample.js][storagespacesupdatesample] | Patches the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateStorageSpace.json | -| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Puts the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutVirtualNetwork.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deletes the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteVirtualNetwork.json | -| [virtualNetworksListByResourceGroupSample.js][virtualnetworkslistbyresourcegroupsample] | Lists the Hybrid AKS virtual networks by resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkByResourceGroup.json | -| [virtualNetworksListBySubscriptionSample.js][virtualnetworkslistbysubscriptionsample] | Lists the Hybrid AKS virtual networks by subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkBySubscription.json | -| [virtualNetworksRetrieveSample.js][virtualnetworksretrievesample] | Gets the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetVirtualNetwork.json | -| [virtualNetworksUpdateSample.js][virtualnetworksupdatesample] | Patches the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateVirtualNetwork.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node agentPoolCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID="" HYBRIDCONTAINERSERVICE_RESOURCE_GROUP="" node agentPoolCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolCreateOrUpdateSample.js -[agentpooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolDeleteSample.js -[agentpoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolGetSample.js -[agentpoollistbyprovisionedclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolListByProvisionedClusterSample.js -[agentpoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolUpdateSample.js -[hybridcontainerservicelistorchestratorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListOrchestratorsSample.js -[hybridcontainerservicelistvmskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListVMSkusSample.js -[hybrididentitymetadatadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js -[hybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js -[hybrididentitymetadatalistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataListByClusterSample.js -[hybrididentitymetadataputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataPutSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/operationsListSample.js -[provisionedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersCreateOrUpdateSample.js -[provisionedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersDeleteSample.js -[provisionedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetSample.js -[provisionedclustersgetupgradeprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetUpgradeProfileSample.js -[provisionedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListByResourceGroupSample.js -[provisionedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListBySubscriptionSample.js -[provisionedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpdateSample.js -[provisionedclustersupgradenodeimageversionforentireclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js -[storagespacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesCreateOrUpdateSample.js -[storagespacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesDeleteSample.js -[storagespaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListByResourceGroupSample.js -[storagespaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListBySubscriptionSample.js -[storagespacesretrievesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesRetrieveSample.js -[storagespacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesUpdateSample.js -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksCreateOrUpdateSample.js -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksDeleteSample.js -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js -[virtualnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListBySubscriptionSample.js -[virtualnetworksretrievesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksRetrieveSample.js -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-hybridcontainerservice?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/README.md diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolCreateOrUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolCreateOrUpdateSample.js deleted file mode 100644 index 98092d35e95b..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Creates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutAgentPool.json - */ -async function putAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool = { - count: 1, - location: "westus", - osType: "Linux", - vmSize: "Standard_A4_v2", - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - putAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolDeleteSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolDeleteSample.js deleted file mode 100644 index bae971d72356..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolDeleteSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Deletes the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteAgentPool.json - */ -async function deleteAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.delete( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - deleteAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolGetSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolGetSample.js deleted file mode 100644 index 5d95fca5cbf9..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolGetSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetAgentPool.json - */ -async function getAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.get( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - getAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolListByProvisionedClusterSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolListByProvisionedClusterSample.js deleted file mode 100644 index a5102227d57f..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolListByProvisionedClusterSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the agent pools in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pools in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListAgentPoolByProvisionedCluster.json - */ -async function listAgentPoolByProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.listByProvisionedCluster( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - listAgentPoolByProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolUpdateSample.js deleted file mode 100644 index 1f98c70267c8..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/agentPoolUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Updates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateAgentPool.json - */ -async function updateAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool = { count: 3, location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.update( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - updateAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListOrchestratorsSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListOrchestratorsSample.js deleted file mode 100644 index 8dd09f29cee3..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListOrchestratorsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the available orchestrators in a custom location for HybridAKS - * - * @summary Lists the available orchestrators in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOrchestrators.json - */ -async function listOrchestrators() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listOrchestrators(customLocationResourceUri); - console.log(result); -} - -async function main() { - listOrchestrators(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListVMSkusSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListVMSkusSample.js deleted file mode 100644 index bfbab06ec1e9..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridContainerServiceListVMSkusSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the available VM SKUs in a custom location for HybridAKS - * - * @summary Lists the available VM SKUs in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVMSkus.json - */ -async function listVMSkus() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listVMSkus(customLocationResourceUri); - console.log(result); -} - -async function main() { - listVMSkus(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js deleted file mode 100644 index 3c648d47fbb5..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the hybrid identity metadata proxy resource. - * - * @summary Deletes the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js deleted file mode 100644 index dab2023fe7d4..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the hybrid identity metadata proxy resource. - * - * @summary Get the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetHybridIdentityMetadata.json - */ -async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - getHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataListByClusterSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataListByClusterSample.js deleted file mode 100644 index bb730d0184f5..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataListByClusterSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the hybrid identity metadata proxy resource in a cluster. - * - * @summary Lists the hybrid identity metadata proxy resource in a cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/HybridIdentityMetadataListByCluster.json - */ -async function hybridIdentityMetadataListByCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByCluster( - resourceGroupName, - resourceName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hybridIdentityMetadataListByCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataPutSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataPutSample.js deleted file mode 100644 index 39d6e00b91bf..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/hybridIdentityMetadataPutSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * - * @summary Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const body = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - resourceUid: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c", - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.put( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - body - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/operationsListSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 85c2237ee972..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to - * - * @summary - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOperations.json - */ -async function listOperations() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/package.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/package.json deleted file mode 100644 index a6097e481d62..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-hybridcontainerservice-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/hybridcontainerservice/arm-hybridcontainerservice" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice", - "dependencies": { - "@azure/arm-hybridcontainerservice": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersCreateOrUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersCreateOrUpdateSample.js deleted file mode 100644 index 8c7a6acbb3e7..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersCreateOrUpdateSample.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates the Hybrid AKS provisioned cluster - * - * @summary Creates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutProvisionedCluster.json - */ -async function putProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters = { - extendedLocation: { - name: "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation", - }, - location: "westus", - properties: { - agentPoolProfiles: [ - { - name: "default-nodepool-1", - count: 1, - osType: "Linux", - vmSize: "Standard_A4_v2", - }, - ], - cloudProviderProfile: { - infraNetworkProfile: { - vnetSubnetIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static", - ], - }, - infraStorageProfile: { - storageSpaceIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/storageSpaces/test-storage", - ], - }, - }, - controlPlane: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [{ keyData: "ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......" }], - }, - }, - osType: "Linux", - vmSize: "Standard_A4_v2", - }, - kubernetesVersion: "v1.20.5", - linuxProfile: { - ssh: { - publicKeys: [{ keyData: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......." }], - }, - }, - networkProfile: { - loadBalancerProfile: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [{ keyData: "ssh-rsa AAAAB2NzaC1yc2EAAAADAQABAAACAQCY......" }], - }, - }, - osType: "Linux", - vmSize: "Standard_K8S3_v1", - }, - loadBalancerSku: "unstacked-haproxy", - networkPolicy: "calico", - podCidr: "10.244.0.0/16", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - putProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersDeleteSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersDeleteSample.js deleted file mode 100644 index e1cd551e692a..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS provisioned cluster - * - * @summary Deletes the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteProvisionedCluster.json - */ -async function deleteProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.delete(resourceGroupName, resourceName); - console.log(result); -} - -async function main() { - deleteProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetSample.js deleted file mode 100644 index 15b620130fda..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster - * - * @summary Gets the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetProvisionedCluster.json - */ -async function getProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.get(resourceGroupName, resourceName); - console.log(result); -} - -async function main() { - getProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetUpgradeProfileSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetUpgradeProfileSample.js deleted file mode 100644 index c6ef32422c51..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersGetUpgradeProfileSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the upgrade profile of a provisioned cluster. - * - * @summary Gets the upgrade profile of a provisioned cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersGetUpgradeProfile.json - */ -async function getUpgradeProfileForProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.getUpgradeProfile( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - getUpgradeProfileForProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListByResourceGroupSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListByResourceGroupSample.js deleted file mode 100644 index 00306dd5d5ee..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListByResourceGroupSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a resource group - * - * @summary Gets the Hybrid AKS provisioned cluster in a resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterByResourceGroup.json - */ -async function listProvisionedClusterByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListBySubscriptionSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListBySubscriptionSample.js deleted file mode 100644 index bb21cf3bf2dc..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a subscription - * - * @summary Gets the Hybrid AKS provisioned cluster in a subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterBySubscription.json - */ -async function listProvisionedClusterBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpdateSample.js deleted file mode 100644 index dca8a7e30d71..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the Hybrid AKS provisioned cluster - * - * @summary Updates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateProvisionedCluster.json - */ -async function updateProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters = { - tags: { additionalProperties: "sample" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - updateProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js deleted file mode 100644 index 7ea3580f9dd7..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * - * @summary Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersUpgradeNodeImageVersionForEntireCluster.json - */ -async function upgradeClusterNodeImageVersion() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = - await client.provisionedClustersOperations.beginUpgradeNodeImageVersionForEntireClusterAndWait( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - upgradeClusterNodeImageVersion(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/sample.env b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesCreateOrUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesCreateOrUpdateSample.js deleted file mode 100644 index 3f066db5e015..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS storage object - * - * @summary Puts the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutStorageSpace.json - */ -async function putStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces = { - extendedLocation: { - name: "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation", - }, - location: "westus", - properties: { - hciStorageProfile: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocStorageContainer: "WssdStorageContainer", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - putStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesDeleteSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesDeleteSample.js deleted file mode 100644 index 27a8b58b85e3..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS storage object - * - * @summary Deletes the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteStorageSpace.json - */ -async function deleteStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.delete(resourceGroupName, storageSpacesName); - console.log(result); -} - -async function main() { - deleteStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListByResourceGroupSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListByResourceGroupSample.js deleted file mode 100644 index 6d5b02e79cb4..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListByResourceGroupSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by resource group - * - * @summary List the Hybrid AKS storage object by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceByResourceGroup.json - */ -async function listStorageSpaceByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListBySubscriptionSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListBySubscriptionSample.js deleted file mode 100644 index a953e16688da..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by subscription - * - * @summary List the Hybrid AKS storage object by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceBySubscription.json - */ -async function listStorageSpaceBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesRetrieveSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesRetrieveSample.js deleted file mode 100644 index 53effd0b5561..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesRetrieveSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS storage space object - * - * @summary Gets the Hybrid AKS storage space object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetStorageSpace.json - */ -async function getStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.retrieve( - resourceGroupName, - storageSpacesName - ); - console.log(result); -} - -async function main() { - getStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesUpdateSample.js deleted file mode 100644 index 429fa0c9e520..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/storageSpacesUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS storage object - * - * @summary Patches the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateStorageSpace.json - */ -async function updateStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces = { - tags: { additionalProperties: "sample" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - updateStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksCreateOrUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksCreateOrUpdateSample.js deleted file mode 100644 index ea0424c55820..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS virtual network - * - * @summary Puts the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutVirtualNetwork.json - */ -async function putVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks = { - extendedLocation: { - name: "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation", - }, - location: "westus", - properties: { - infraVnetProfile: { - hci: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocVnetName: "test-vnet", - }, - }, - vipPool: [{ endIP: "192.168.0.50", startIP: "192.168.0.10" }], - vmipPool: [{ endIP: "192.168.0.130", startIP: "192.168.0.110" }], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - putVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksDeleteSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksDeleteSample.js deleted file mode 100644 index 78d393e06472..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS virtual network - * - * @summary Deletes the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteVirtualNetwork.json - */ -async function deleteVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.delete( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js deleted file mode 100644 index 8cbb96e64349..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by resource group - * - * @summary Lists the Hybrid AKS virtual networks by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkByResourceGroup.json - */ -async function listVirtualNetworkByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListBySubscriptionSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListBySubscriptionSample.js deleted file mode 100644 index 57c3eb27ef8b..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by subscription - * - * @summary Lists the Hybrid AKS virtual networks by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkBySubscription.json - */ -async function listVirtualNetworkBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksRetrieveSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksRetrieveSample.js deleted file mode 100644 index d79e1d436e43..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksRetrieveSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS virtual network - * - * @summary Gets the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetVirtualNetwork.json - */ -async function getVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.retrieve( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - getVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksUpdateSample.js b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksUpdateSample.js deleted file mode 100644 index 74f07faa519e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/javascript/virtualNetworksUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HybridContainerServiceClient } = require("@azure/arm-hybridcontainerservice"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS virtual network - * - * @summary Patches the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateVirtualNetwork.json - */ -async function updateVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks = { - tags: { additionalProperties: "sample" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - updateVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/README.md b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/README.md deleted file mode 100644 index 53c577630418..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolCreateOrUpdateSample.ts][agentpoolcreateorupdatesample] | Creates the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutAgentPool.json | -| [agentPoolDeleteSample.ts][agentpooldeletesample] | Deletes the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteAgentPool.json | -| [agentPoolGetSample.ts][agentpoolgetsample] | Gets the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetAgentPool.json | -| [agentPoolListByProvisionedClusterSample.ts][agentpoollistbyprovisionedclustersample] | Gets the agent pools in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListAgentPoolByProvisionedCluster.json | -| [agentPoolUpdateSample.ts][agentpoolupdatesample] | Updates the agent pool in the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateAgentPool.json | -| [hybridContainerServiceListOrchestratorsSample.ts][hybridcontainerservicelistorchestratorssample] | Lists the available orchestrators in a custom location for HybridAKS x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOrchestrators.json | -| [hybridContainerServiceListVMSkusSample.ts][hybridcontainerservicelistvmskussample] | Lists the available VM SKUs in a custom location for HybridAKS x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVMSkus.json | -| [hybridIdentityMetadataDeleteSample.ts][hybrididentitymetadatadeletesample] | Deletes the hybrid identity metadata proxy resource. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteHybridIdentityMetadata.json | -| [hybridIdentityMetadataGetSample.ts][hybrididentitymetadatagetsample] | Get the hybrid identity metadata proxy resource. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetHybridIdentityMetadata.json | -| [hybridIdentityMetadataListByClusterSample.ts][hybrididentitymetadatalistbyclustersample] | Lists the hybrid identity metadata proxy resource in a cluster. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/HybridIdentityMetadataListByCluster.json | -| [hybridIdentityMetadataPutSample.ts][hybrididentitymetadataputsample] | Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/CreateHybridIdentityMetadata.json | -| [operationsListSample.ts][operationslistsample] | x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOperations.json | -| [provisionedClustersCreateOrUpdateSample.ts][provisionedclusterscreateorupdatesample] | Creates the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutProvisionedCluster.json | -| [provisionedClustersDeleteSample.ts][provisionedclustersdeletesample] | Deletes the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteProvisionedCluster.json | -| [provisionedClustersGetSample.ts][provisionedclustersgetsample] | Gets the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetProvisionedCluster.json | -| [provisionedClustersGetUpgradeProfileSample.ts][provisionedclustersgetupgradeprofilesample] | Gets the upgrade profile of a provisioned cluster. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersGetUpgradeProfile.json | -| [provisionedClustersListByResourceGroupSample.ts][provisionedclusterslistbyresourcegroupsample] | Gets the Hybrid AKS provisioned cluster in a resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterByResourceGroup.json | -| [provisionedClustersListBySubscriptionSample.ts][provisionedclusterslistbysubscriptionsample] | Gets the Hybrid AKS provisioned cluster in a subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterBySubscription.json | -| [provisionedClustersUpdateSample.ts][provisionedclustersupdatesample] | Updates the Hybrid AKS provisioned cluster x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateProvisionedCluster.json | -| [provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts][provisionedclustersupgradenodeimageversionforentireclustersample] | Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersUpgradeNodeImageVersionForEntireCluster.json | -| [storageSpacesCreateOrUpdateSample.ts][storagespacescreateorupdatesample] | Puts the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutStorageSpace.json | -| [storageSpacesDeleteSample.ts][storagespacesdeletesample] | Deletes the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteStorageSpace.json | -| [storageSpacesListByResourceGroupSample.ts][storagespaceslistbyresourcegroupsample] | List the Hybrid AKS storage object by resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceByResourceGroup.json | -| [storageSpacesListBySubscriptionSample.ts][storagespaceslistbysubscriptionsample] | List the Hybrid AKS storage object by subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceBySubscription.json | -| [storageSpacesRetrieveSample.ts][storagespacesretrievesample] | Gets the Hybrid AKS storage space object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetStorageSpace.json | -| [storageSpacesUpdateSample.ts][storagespacesupdatesample] | Patches the Hybrid AKS storage object x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateStorageSpace.json | -| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Puts the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutVirtualNetwork.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deletes the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteVirtualNetwork.json | -| [virtualNetworksListByResourceGroupSample.ts][virtualnetworkslistbyresourcegroupsample] | Lists the Hybrid AKS virtual networks by resource group x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkByResourceGroup.json | -| [virtualNetworksListBySubscriptionSample.ts][virtualnetworkslistbysubscriptionsample] | Lists the Hybrid AKS virtual networks by subscription x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkBySubscription.json | -| [virtualNetworksRetrieveSample.ts][virtualnetworksretrievesample] | Gets the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetVirtualNetwork.json | -| [virtualNetworksUpdateSample.ts][virtualnetworksupdatesample] | Patches the Hybrid AKS virtual network x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateVirtualNetwork.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/agentPoolCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID="" HYBRIDCONTAINERSERVICE_RESOURCE_GROUP="" node dist/agentPoolCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolCreateOrUpdateSample.ts -[agentpooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolDeleteSample.ts -[agentpoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolGetSample.ts -[agentpoollistbyprovisionedclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolListByProvisionedClusterSample.ts -[agentpoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolUpdateSample.ts -[hybridcontainerservicelistorchestratorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListOrchestratorsSample.ts -[hybridcontainerservicelistvmskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListVMSkusSample.ts -[hybrididentitymetadatadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts -[hybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts -[hybrididentitymetadatalistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataListByClusterSample.ts -[hybrididentitymetadataputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataPutSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/operationsListSample.ts -[provisionedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersCreateOrUpdateSample.ts -[provisionedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersDeleteSample.ts -[provisionedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetSample.ts -[provisionedclustersgetupgradeprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetUpgradeProfileSample.ts -[provisionedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListByResourceGroupSample.ts -[provisionedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListBySubscriptionSample.ts -[provisionedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpdateSample.ts -[provisionedclustersupgradenodeimageversionforentireclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts -[storagespacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesCreateOrUpdateSample.ts -[storagespacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesDeleteSample.ts -[storagespaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListByResourceGroupSample.ts -[storagespaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListBySubscriptionSample.ts -[storagespacesretrievesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesRetrieveSample.ts -[storagespacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesUpdateSample.ts -[virtualnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksCreateOrUpdateSample.ts -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts -[virtualnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListBySubscriptionSample.ts -[virtualnetworksretrievesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksRetrieveSample.ts -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-hybridcontainerservice?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/package.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/package.json deleted file mode 100644 index fe4c7dbdb7e0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-hybridcontainerservice-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/hybridcontainerservice/arm-hybridcontainerservice" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcontainerservice/arm-hybridcontainerservice", - "dependencies": { - "@azure/arm-hybridcontainerservice": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.2.0", - "rimraf": "latest" - } -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/sample.env b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolCreateOrUpdateSample.ts deleted file mode 100644 index a31077323410..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPool, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Creates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutAgentPool.json - */ -async function putAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool: AgentPool = { - count: 1, - location: "westus", - osType: "Linux", - vmSize: "Standard_A4_v2" - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - putAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolDeleteSample.ts deleted file mode 100644 index 0db4b933c84b..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Deletes the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteAgentPool.json - */ -async function deleteAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.delete( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - deleteAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolGetSample.ts deleted file mode 100644 index f6950071b881..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetAgentPool.json - */ -async function getAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.get( - resourceGroupName, - resourceName, - agentPoolName - ); - console.log(result); -} - -async function main() { - getAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolListByProvisionedClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolListByProvisionedClusterSample.ts deleted file mode 100644 index 44ecd86d04e8..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolListByProvisionedClusterSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the agent pools in the Hybrid AKS provisioned cluster - * - * @summary Gets the agent pools in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListAgentPoolByProvisionedCluster.json - */ -async function listAgentPoolByProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.listByProvisionedCluster( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - listAgentPoolByProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolUpdateSample.ts deleted file mode 100644 index 4ae99933a810..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/agentPoolUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPool, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates the agent pool in the Hybrid AKS provisioned cluster - * - * @summary Updates the agent pool in the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateAgentPool.json - */ -async function updateAgentPool() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const agentPoolName = "test-hybridaksnodepool"; - const agentPool: AgentPool = { count: 3, location: "westus" }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.agentPoolOperations.update( - resourceGroupName, - resourceName, - agentPoolName, - agentPool - ); - console.log(result); -} - -async function main() { - updateAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListOrchestratorsSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListOrchestratorsSample.ts deleted file mode 100644 index d4c99dd17707..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListOrchestratorsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the available orchestrators in a custom location for HybridAKS - * - * @summary Lists the available orchestrators in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOrchestrators.json - */ -async function listOrchestrators() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listOrchestrators( - customLocationResourceUri - ); - console.log(result); -} - -async function main() { - listOrchestrators(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListVMSkusSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListVMSkusSample.ts deleted file mode 100644 index 87b4ef417862..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridContainerServiceListVMSkusSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the available VM SKUs in a custom location for HybridAKS - * - * @summary Lists the available VM SKUs in a custom location for HybridAKS - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVMSkus.json - */ -async function listVMSkus() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const customLocationResourceUri = - "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridContainerService.listVMSkus( - customLocationResourceUri - ); - console.log(result); -} - -async function main() { - listVMSkus(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts deleted file mode 100644 index e2df5c7caaeb..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the hybrid identity metadata proxy resource. - * - * @summary Deletes the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts deleted file mode 100644 index d67db4928132..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the hybrid identity metadata proxy resource. - * - * @summary Get the hybrid identity metadata proxy resource. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetHybridIdentityMetadata.json - */ -async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName - ); - console.log(result); -} - -async function main() { - getHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataListByClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataListByClusterSample.ts deleted file mode 100644 index df8c8227e2c8..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the hybrid identity metadata proxy resource in a cluster. - * - * @summary Lists the hybrid identity metadata proxy resource in a cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/HybridIdentityMetadataListByCluster.json - */ -async function hybridIdentityMetadataListByCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByCluster( - resourceGroupName, - resourceName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hybridIdentityMetadataListByCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataPutSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataPutSample.ts deleted file mode 100644 index 2b75ca916f88..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/hybridIdentityMetadataPutSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HybridIdentityMetadata, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * - * @summary Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || "testrg"; - const resourceName = "ContosoTargetCluster"; - const hybridIdentityMetadataResourceName = "default"; - const body: HybridIdentityMetadata = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - resourceUid: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c" - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.put( - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - body - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 9c9b1e00ba99..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to - * - * @summary - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListOperations.json - */ -async function listOperations() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersCreateOrUpdateSample.ts deleted file mode 100644 index fa9acfd4c2fc..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProvisionedClusters, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates the Hybrid AKS provisioned cluster - * - * @summary Creates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutProvisionedCluster.json - */ -async function putProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters: ProvisionedClusters = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - agentPoolProfiles: [ - { - name: "default-nodepool-1", - count: 1, - osType: "Linux", - vmSize: "Standard_A4_v2" - } - ], - cloudProviderProfile: { - infraNetworkProfile: { - vnetSubnetIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static" - ] - }, - infraStorageProfile: { - storageSpaceIds: [ - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/storageSpaces/test-storage" - ] - } - }, - controlPlane: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......" } - ] - } - }, - osType: "Linux", - vmSize: "Standard_A4_v2" - }, - kubernetesVersion: "v1.20.5", - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......." } - ] - } - }, - networkProfile: { - loadBalancerProfile: { - count: 1, - linuxProfile: { - ssh: { - publicKeys: [ - { keyData: "ssh-rsa AAAAB2NzaC1yc2EAAAADAQABAAACAQCY......" } - ] - } - }, - osType: "Linux", - vmSize: "Standard_K8S3_v1" - }, - loadBalancerSku: "unstacked-haproxy", - networkPolicy: "calico", - podCidr: "10.244.0.0/16" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - putProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersDeleteSample.ts deleted file mode 100644 index f0419cdf136d..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS provisioned cluster - * - * @summary Deletes the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteProvisionedCluster.json - */ -async function deleteProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.delete( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - deleteProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetSample.ts deleted file mode 100644 index eef11b817978..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster - * - * @summary Gets the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetProvisionedCluster.json - */ -async function getProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.get( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - getProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetUpgradeProfileSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetUpgradeProfileSample.ts deleted file mode 100644 index 1eaef15ad061..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersGetUpgradeProfileSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the upgrade profile of a provisioned cluster. - * - * @summary Gets the upgrade profile of a provisioned cluster. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersGetUpgradeProfile.json - */ -async function getUpgradeProfileForProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.getUpgradeProfile( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - getUpgradeProfileForProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListByResourceGroupSample.ts deleted file mode 100644 index b71415a0a104..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a resource group - * - * @summary Gets the Hybrid AKS provisioned cluster in a resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterByResourceGroup.json - */ -async function listProvisionedClusterByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListBySubscriptionSample.ts deleted file mode 100644 index 199a9aadf706..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS provisioned cluster in a subscription - * - * @summary Gets the Hybrid AKS provisioned cluster in a subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListProvisionedClusterBySubscription.json - */ -async function listProvisionedClusterBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.provisionedClustersOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listProvisionedClusterBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpdateSample.ts deleted file mode 100644 index dead5340f95e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProvisionedClustersPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates the Hybrid AKS provisioned cluster - * - * @summary Updates the Hybrid AKS provisioned cluster - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateProvisionedCluster.json - */ -async function updateProvisionedCluster() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const provisionedClusters: ProvisionedClustersPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginUpdateAndWait( - resourceGroupName, - resourceName, - provisionedClusters - ); - console.log(result); -} - -async function main() { - updateProvisionedCluster(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts deleted file mode 100644 index 2494d7120b4e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/provisionedClustersUpgradeNodeImageVersionForEntireClusterSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * - * @summary Upgrading the node image version of a cluster applies the newest OS and runtime updates to the nodes. - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ProvisionedClustersUpgradeNodeImageVersionForEntireCluster.json - */ -async function upgradeClusterNodeImageVersion() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const resourceName = "test-hybridakscluster"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.provisionedClustersOperations.beginUpgradeNodeImageVersionForEntireClusterAndWait( - resourceGroupName, - resourceName - ); - console.log(result); -} - -async function main() { - upgradeClusterNodeImageVersion(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesCreateOrUpdateSample.ts deleted file mode 100644 index 70dff9e96199..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageSpaces, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS storage object - * - * @summary Puts the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutStorageSpace.json - */ -async function putStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces: StorageSpaces = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - hciStorageProfile: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocStorageContainer: "WssdStorageContainer" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - putStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesDeleteSample.ts deleted file mode 100644 index 75e6f8a01706..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS storage object - * - * @summary Deletes the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteStorageSpace.json - */ -async function deleteStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.delete( - resourceGroupName, - storageSpacesName - ); - console.log(result); -} - -async function main() { - deleteStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListByResourceGroupSample.ts deleted file mode 100644 index b772b64f2b19..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by resource group - * - * @summary List the Hybrid AKS storage object by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceByResourceGroup.json - */ -async function listStorageSpaceByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListBySubscriptionSample.ts deleted file mode 100644 index 885c0058294e..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the Hybrid AKS storage object by subscription - * - * @summary List the Hybrid AKS storage object by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListStorageSpaceBySubscription.json - */ -async function listStorageSpaceBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageSpacesOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageSpaceBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesRetrieveSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesRetrieveSample.ts deleted file mode 100644 index 2c23057df7e9..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesRetrieveSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS storage space object - * - * @summary Gets the Hybrid AKS storage space object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetStorageSpace.json - */ -async function getStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.retrieve( - resourceGroupName, - storageSpacesName - ); - console.log(result); -} - -async function main() { - getStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesUpdateSample.ts deleted file mode 100644 index 44947117c4bd..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/storageSpacesUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageSpacesPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS storage object - * - * @summary Patches the Hybrid AKS storage object - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateStorageSpace.json - */ -async function updateStorageSpace() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const storageSpacesName = "test-storage"; - const storageSpaces: StorageSpacesPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.storageSpacesOperations.beginUpdateAndWait( - resourceGroupName, - storageSpacesName, - storageSpaces - ); - console.log(result); -} - -async function main() { - updateStorageSpace(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksCreateOrUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 19245f0e9171..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualNetworks, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Puts the Hybrid AKS virtual network - * - * @summary Puts the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/PutVirtualNetwork.json - */ -async function putVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks: VirtualNetworks = { - extendedLocation: { - name: - "/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation", - type: "CustomLocation" - }, - location: "westus", - properties: { - infraVnetProfile: { - hci: { - mocGroup: "target-group", - mocLocation: "MocLocation", - mocVnetName: "test-vnet" - } - }, - vipPool: [{ endIP: "192.168.0.50", startIP: "192.168.0.10" }], - vmipPool: [{ endIP: "192.168.0.130", startIP: "192.168.0.110" }] - } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - putVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts deleted file mode 100644 index cfb751c62769..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the Hybrid AKS virtual network - * - * @summary Deletes the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/DeleteVirtualNetwork.json - */ -async function deleteVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.delete( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - deleteVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts deleted file mode 100644 index 146f24fba3bc..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by resource group - * - * @summary Lists the Hybrid AKS virtual networks by resource group - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkByResourceGroup.json - */ -async function listVirtualNetworkByResourceGroup() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListBySubscriptionSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListBySubscriptionSample.ts deleted file mode 100644 index 0b0714c82049..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the Hybrid AKS virtual networks by subscription - * - * @summary Lists the Hybrid AKS virtual networks by subscription - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/ListVirtualNetworkBySubscription.json - */ -async function listVirtualNetworkBySubscription() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualNetworksOperations.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualNetworkBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksRetrieveSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksRetrieveSample.ts deleted file mode 100644 index d0dc59ce94f0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksRetrieveSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HybridContainerServiceClient } from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Hybrid AKS virtual network - * - * @summary Gets the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/GetVirtualNetwork.json - */ -async function getVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.retrieve( - resourceGroupName, - virtualNetworksName - ); - console.log(result); -} - -async function main() { - getVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts deleted file mode 100644 index 6542be84a004..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualNetworksPatch, - HybridContainerServiceClient -} from "@azure/arm-hybridcontainerservice"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches the Hybrid AKS virtual network - * - * @summary Patches the Hybrid AKS virtual network - * x-ms-original-file: specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2022-09-01-preview/examples/UpdateVirtualNetwork.json - */ -async function updateVirtualNetwork() { - const subscriptionId = - process.env["HYBRIDCONTAINERSERVICE_SUBSCRIPTION_ID"] || - "a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b"; - const resourceGroupName = - process.env["HYBRIDCONTAINERSERVICE_RESOURCE_GROUP"] || - "test-arcappliance-resgrp"; - const virtualNetworksName = "test-vnet-static"; - const virtualNetworks: VirtualNetworksPatch = { - tags: { additionalProperties: "sample" } - }; - const credential = new DefaultAzureCredential(); - const client = new HybridContainerServiceClient(credential, subscriptionId); - const result = await client.virtualNetworksOperations.beginUpdateAndWait( - resourceGroupName, - virtualNetworksName, - virtualNetworks - ); - console.log(result); -} - -async function main() { - updateVirtualNetwork(); -} - -main().catch(console.error); diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/tsconfig.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/hybridContainerServiceClient.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/hybridContainerServiceClient.ts index 0c4f330aa191..59e1798fcc58 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/hybridContainerServiceClient.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/hybridContainerServiceClient.ts @@ -15,46 +15,86 @@ import { } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { - ProvisionedClustersOperationsImpl, + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "./lroImpl"; +import { + ProvisionedClusterInstancesImpl, HybridIdentityMetadataOperationsImpl, AgentPoolOperationsImpl, - HybridContainerServiceImpl, + KubernetesVersionsImpl, + VMSkusImpl, OperationsImpl, - StorageSpacesOperationsImpl, - VirtualNetworksOperationsImpl + VirtualNetworksImpl } from "./operations"; import { - ProvisionedClustersOperations, + ProvisionedClusterInstances, HybridIdentityMetadataOperations, AgentPoolOperations, - HybridContainerService, + KubernetesVersions, + VMSkus, Operations, - StorageSpacesOperations, - VirtualNetworksOperations + VirtualNetworks } from "./operationsInterfaces"; -import { HybridContainerServiceClientOptionalParams } from "./models"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + HybridContainerServiceClientOptionalParams, + GetKubernetesVersionsOptionalParams, + GetKubernetesVersionsResponse, + KubernetesVersionProfile, + PutKubernetesVersionsOptionalParams, + PutKubernetesVersionsResponse, + DeleteKubernetesVersionsOptionalParams, + DeleteKubernetesVersionsResponse, + GetVMSkusOptionalParams, + GetVMSkusResponse, + VmSkuProfile, + PutVMSkusOptionalParams, + PutVMSkusResponse, + DeleteVMSkusOptionalParams, + DeleteVMSkusResponse +} from "./models"; export class HybridContainerServiceClient extends coreClient.ServiceClient { $host: string; - subscriptionId: string; apiVersion: string; + subscriptionId?: string; /** * Initializes a new instance of the HybridContainerServiceClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridContainerServiceClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: HybridContainerServiceClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: + | HybridContainerServiceClientOptionalParams + | string, + options?: HybridContainerServiceClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -119,18 +159,18 @@ export class HybridContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-09-01-preview"; - this.provisionedClustersOperations = new ProvisionedClustersOperationsImpl( + this.apiVersion = options.apiVersion || "2023-11-15-preview"; + this.provisionedClusterInstances = new ProvisionedClusterInstancesImpl( this ); this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( this ); this.agentPoolOperations = new AgentPoolOperationsImpl(this); - this.hybridContainerService = new HybridContainerServiceImpl(this); + this.kubernetesVersions = new KubernetesVersionsImpl(this); + this.vMSkus = new VMSkusImpl(this); this.operations = new OperationsImpl(this); - this.storageSpacesOperations = new StorageSpacesOperationsImpl(this); - this.virtualNetworksOperations = new VirtualNetworksOperationsImpl(this); + this.virtualNetworks = new VirtualNetworksImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -162,11 +202,548 @@ export class HybridContainerServiceClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } - provisionedClustersOperations: ProvisionedClustersOperations; + /** + * Gets the supported kubernetes versions from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + getKubernetesVersions( + customLocationResourceUri: string, + options?: GetKubernetesVersionsOptionalParams + ): Promise { + return this.sendOperationRequest( + { customLocationResourceUri, options }, + getKubernetesVersionsOperationSpec + ); + } + + /** + * Puts the kubernetes version resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param kubernetesVersions Kubernetes Versions resource definition + * @param options The options parameters. + */ + async beginPutKubernetesVersions( + customLocationResourceUri: string, + kubernetesVersions: KubernetesVersionProfile, + options?: PutKubernetesVersionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PutKubernetesVersionsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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: { customLocationResourceUri, kubernetesVersions, options }, + spec: putKubernetesVersionsOperationSpec + }); + const poller = await createHttpPoller< + PutKubernetesVersionsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the kubernetes version resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param kubernetesVersions Kubernetes Versions resource definition + * @param options The options parameters. + */ + async beginPutKubernetesVersionsAndWait( + customLocationResourceUri: string, + kubernetesVersions: KubernetesVersionProfile, + options?: PutKubernetesVersionsOptionalParams + ): Promise { + const poller = await this.beginPutKubernetesVersions( + customLocationResourceUri, + kubernetesVersions, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete the kubernetes versions resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + async beginDeleteKubernetesVersions( + customLocationResourceUri: string, + options?: DeleteKubernetesVersionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DeleteKubernetesVersionsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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: { customLocationResourceUri, options }, + spec: deleteKubernetesVersionsOperationSpec + }); + const poller = await createHttpPoller< + DeleteKubernetesVersionsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete the kubernetes versions resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + async beginDeleteKubernetesVersionsAndWait( + customLocationResourceUri: string, + options?: DeleteKubernetesVersionsOptionalParams + ): Promise { + const poller = await this.beginDeleteKubernetesVersions( + customLocationResourceUri, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the supported VM skus from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + getVMSkus( + customLocationResourceUri: string, + options?: GetVMSkusOptionalParams + ): Promise { + return this.sendOperationRequest( + { customLocationResourceUri, options }, + getVMSkusOperationSpec + ); + } + + /** + * Puts the VM SKUs resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param skus VM SKUs resource definition + * @param options The options parameters. + */ + async beginPutVMSkus( + customLocationResourceUri: string, + skus: VmSkuProfile, + options?: PutVMSkusOptionalParams + ): Promise< + SimplePollerLike, PutVMSkusResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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: { customLocationResourceUri, skus, options }, + spec: putVMSkusOperationSpec + }); + const poller = await createHttpPoller< + PutVMSkusResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the VM SKUs resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param skus VM SKUs resource definition + * @param options The options parameters. + */ + async beginPutVMSkusAndWait( + customLocationResourceUri: string, + skus: VmSkuProfile, + options?: PutVMSkusOptionalParams + ): Promise { + const poller = await this.beginPutVMSkus( + customLocationResourceUri, + skus, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the Vm Sku resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + async beginDeleteVMSkus( + customLocationResourceUri: string, + options?: DeleteVMSkusOptionalParams + ): Promise< + SimplePollerLike, DeleteVMSkusResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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: { customLocationResourceUri, options }, + spec: deleteVMSkusOperationSpec + }); + const poller = await createHttpPoller< + DeleteVMSkusResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the Vm Sku resource type + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + async beginDeleteVMSkusAndWait( + customLocationResourceUri: string, + options?: DeleteVMSkusOptionalParams + ): Promise { + const poller = await this.beginDeleteVMSkus( + customLocationResourceUri, + options + ); + return poller.pollUntilDone(); + } + + provisionedClusterInstances: ProvisionedClusterInstances; hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; agentPoolOperations: AgentPoolOperations; - hybridContainerService: HybridContainerService; + kubernetesVersions: KubernetesVersions; + vMSkus: VMSkus; operations: Operations; - storageSpacesOperations: StorageSpacesOperations; - virtualNetworksOperations: VirtualNetworksOperations; + virtualNetworks: VirtualNetworks; } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getKubernetesVersionsOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/kubernetesVersions/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.KubernetesVersionProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const putKubernetesVersionsOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/kubernetesVersions/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.KubernetesVersionProfile + }, + 201: { + bodyMapper: Mappers.KubernetesVersionProfile + }, + 202: { + bodyMapper: Mappers.KubernetesVersionProfile + }, + 204: { + bodyMapper: Mappers.KubernetesVersionProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.kubernetesVersions, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteKubernetesVersionsOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/kubernetesVersions/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: + Mappers.HybridContainerServiceClientDeleteKubernetesVersionsHeaders + }, + 201: { + headersMapper: + Mappers.HybridContainerServiceClientDeleteKubernetesVersionsHeaders + }, + 202: { + headersMapper: + Mappers.HybridContainerServiceClientDeleteKubernetesVersionsHeaders + }, + 204: { + headersMapper: + Mappers.HybridContainerServiceClientDeleteKubernetesVersionsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const getVMSkusOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/skus/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmSkuProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const putVMSkusOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/skus/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VmSkuProfile + }, + 201: { + bodyMapper: Mappers.VmSkuProfile + }, + 202: { + bodyMapper: Mappers.VmSkuProfile + }, + 204: { + bodyMapper: Mappers.VmSkuProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.skus, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteVMSkusOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/skus/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.HybridContainerServiceClientDeleteVMSkusHeaders + }, + 201: { + headersMapper: Mappers.HybridContainerServiceClientDeleteVMSkusHeaders + }, + 202: { + headersMapper: Mappers.HybridContainerServiceClientDeleteVMSkusHeaders + }, + 204: { + headersMapper: Mappers.HybridContainerServiceClientDeleteVMSkusHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/index.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/index.ts index 0c210604900e..1d8c01340565 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/index.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/index.ts @@ -8,107 +8,36 @@ import * as coreClient from "@azure/core-client"; -/** Identity for the Provisioned cluster. */ -export interface ProvisionedClusterIdentity { - /** - * The principal id of provisioned cluster identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id associated with the provisioned cluster. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of identity used for the provisioned cluster. The type SystemAssigned, includes a system created identity. The type None means no identity is assigned to the provisioned cluster. */ - type: ResourceIdentityType; -} - -/** Properties of provisioned clusters without the corresponding secrets */ -export interface ProvisionedClustersPropertiesWithoutSecrets { - /** AAD profile for the provisioned cluster. */ - aadProfile?: AADProfileResponse; - /** WindowsProfile - Profile for Windows VMs in the Provisioned Cluster. */ - windowsProfile?: WindowsProfileResponse; - /** HttpProxyConfig - Configurations for provisioning the cluster with HTTP proxy servers. */ - httpProxyConfig?: HttpProxyConfigResponse; -} - -/** AAD Profile specifies attributes for Azure Active Directory integration. */ -export interface AADProfileResponse { - /** The list of AAD group object IDs that will have admin role of the cluster. */ - adminGroupObjectIDs?: string[]; - /** The client AAD application ID. */ - clientAppID?: string; - /** Whether to enable Azure RBAC for Kubernetes authorization. */ - enableAzureRbac?: boolean; - /** Whether to enable managed AAD. */ - managed?: boolean; - /** The server AAD application ID. */ - serverAppID?: string; - /** The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. */ - tenantID?: string; -} - -/** Profile for Windows VMs in the container service cluster. */ -export interface WindowsProfileResponse { - /** AdminUsername - Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters */ - adminUsername?: string; - /** EnableCSIProxy - Whether to enable CSI proxy. */ - enableCsiProxy?: boolean; - /** LicenseType - The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. Possible values include: 'None', 'Windows_Server' */ - licenseType?: LicenseType; -} - -/** Configurations for provisioning the cluster with HTTP proxy servers. */ -export interface HttpProxyConfigResponse { - /** The HTTP proxy server endpoint to use. */ - httpProxy?: string; - /** The HTTPS proxy server endpoint to use. */ - httpsProxy?: string; - /** The endpoints that should not go through proxy. */ - noProxy?: string[]; - /** Alternative CA cert to use for connecting to proxy servers. */ - trustedCa?: string; - /** Username to use for connecting to proxy server */ - username?: string; -} - -/** HybridAKSClusterSpec defines the desired state of HybridAKSCluster */ -export interface ProvisionedClustersCommonProperties { - /** EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. */ - enableRbac?: boolean; +/** All properties of the provisioned cluster */ +export interface ProvisionedClusterProperties { /** LinuxProfile - The profile for Linux VMs in the Provisioned Cluster. */ linuxProfile?: LinuxProfileProperties; - /** Additional features specs like Arc Agent Onboarding. */ - features?: ProvisionedClustersCommonPropertiesFeatures; - /** AddonProfiles - Profile of managed cluster add-on. */ - addonProfiles?: { [propertyName: string]: AddonProfiles }; /** ControlPlane - ControlPlane Configuration */ controlPlane?: ControlPlaneProfile; /** KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. */ kubernetesVersion?: string; /** NetworkProfile - Profile of network configuration. */ networkProfile?: NetworkProfile; - /** NodeResourceGroup - Name of the resource group containing agent pool nodes. */ - nodeResourceGroup?: string; /** The agent pools of the cluster. */ agentPoolProfiles?: NamedAgentPoolProfile[]; /** The underlying cloud infra provider properties. */ cloudProviderProfile?: CloudProviderProfile; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ResourceProvisioningState; /** * HybridAKSClusterStatus defines the observed state of HybridAKSCluster * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ProvisionedClustersCommonPropertiesStatus; + readonly status?: ProvisionedClusterPropertiesStatus; + /** The license profile of the provisioned cluster. */ + licenseProfile?: ProvisionedClusterLicenseProfile; } /** LinuxProfile - Profile for Linux VMs in the container service cluster. */ export interface LinuxProfileProperties { - /** AdminUsername - The administrator username to use for Linux VMs. */ - adminUsername?: string; /** SSH - SSH configuration for Linux-based VMs running on Azure. */ ssh?: LinuxProfilePropertiesSsh; } @@ -124,74 +53,24 @@ export interface LinuxProfilePropertiesSshPublicKeysItem { keyData?: string; } -/** Additional features specs like Arc Agent Onboarding. */ -export interface ProvisionedClustersCommonPropertiesFeatures { - /** Arc agentry configuration for the provisioned cluster. */ - arcAgentProfile?: ArcAgentProfile; -} - -/** Defines the Arc Agent properties for the Provisioned clusters. */ -export interface ArcAgentProfile { - /** Version of the Arc agents to be installed on the provisioned Provisioned cluster resource */ - agentVersion?: string; - /** Indicates whether the Arc agents on the provisioned clusters be upgraded automatically to the latest version. Defaults to Enabled. */ - agentAutoUpgrade?: AutoUpgradeOptions; -} - -/** Addon configurations */ -export interface AddonProfiles { - /** Config - Key-value pairs for configuring an add-on. */ - config?: { [propertyName: string]: string }; - /** Enabled - Whether the add-on is enabled or not. */ - enabled?: boolean; -} - -/** NodePool configuration */ +/** AgentPool configuration */ export interface AgentPoolProfile { - /** Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. */ - count?: number; /** AvailabilityZones - The list of Availability zones to use for nodes. Datacenter racks modelled as zones */ availabilityZones?: string[]; - /** The maximum number of nodes for auto-scaling */ - maxCount?: number; - /** The maximum number of pods that can run on a node. */ - maxPods?: number; - /** The minimum number of nodes for auto-scaling */ - minCount?: number; - /** Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'LB', 'User'. Default is 'User' */ - mode?: Mode; - /** NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. */ - nodeLabels?: { [propertyName: string]: string }; - /** NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ - nodeTaints?: string[]; - /** OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' */ + /** The particular KubernetesVersion's Image's OS Type (Linux, Windows) */ osType?: OsType; + /** Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when OSType is Windows. */ + osSKU?: Ossku; /** The version of node image */ nodeImageVersion?: string; - /** VmSize - The size of the agent pool VMs. */ - vmSize?: string; - /** The underlying cloud infra provider properties. */ - cloudProviderProfile?: CloudProviderProfile; -} - -/** CloudProviderProfile - The underlying cloud infra provider properties. */ -export interface CloudProviderProfile { - /** InfraNetworkProfile - List of infra network profiles for the provisioned cluster */ - infraNetworkProfile?: CloudProviderProfileInfraNetworkProfile; - /** InfraStorageProfile - List of infra storage profiles for the provisioned cluster */ - infraStorageProfile?: CloudProviderProfileInfraStorageProfile; -} - -/** InfraNetworkProfile - List of infra network profiles for the provisioned cluster */ -export interface CloudProviderProfileInfraNetworkProfile { - /** Array of references to azure resource corresponding to the new HybridAKSNetwork object e.g. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworkName} */ - vnetSubnetIds?: string[]; } -/** InfraStorageProfile - List of infra storage profiles for the provisioned cluster */ -export interface CloudProviderProfileInfraStorageProfile { - /** Reference to azure resource corresponding to the new HybridAKSStorage object e.g. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces/{storageSpaceName} */ - storageSpaceIds?: string[]; +/** AgentPool update configuration */ +export interface AgentPoolUpdateProfile { + /** Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. */ + count?: number; + /** VmSize - The size of the agent pool VMs. */ + vmSize?: string; } /** AgentPool Name */ @@ -211,7 +90,7 @@ export interface ControlPlaneEndpointProfileControlPlaneEndpoint { /** Host IP address for API server */ hostIP?: string; /** Port for the API server */ - port?: string; + port?: number; } /** LinuxProfile - Profile for Linux VMs in the container service cluster. */ @@ -223,101 +102,75 @@ export interface LinuxProfile { /** NetworkProfile - Profile of network configuration. */ export interface NetworkProfile { /** LoadBalancerProfile - Profile of the cluster load balancer. */ - loadBalancerProfile?: LoadBalancerProfile; - /** LoadBalancerSku - The load balancer sku for the provisioned cluster. Possible values: 'unstacked-haproxy', 'stacked-kube-vip', 'stacked-metallb', 'unmanaged'. The default is 'unmanaged'. */ - loadBalancerSku?: LoadBalancerSku; - /** DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. */ - dnsServiceIP?: string; + loadBalancerProfile?: NetworkProfileLoadBalancerProfile; /** NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'calico', 'flannel'. Default is 'calico' */ networkPolicy?: NetworkPolicy; /** PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. */ podCidr?: string; - /** The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. */ - podCidrs?: string[]; - /** ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. */ - serviceCidr?: string; - /** The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet IP ranges. */ - serviceCidrs?: string[]; +} + +/** LoadBalancerProfile - Profile of the cluster load balancer. */ +export interface NetworkProfileLoadBalancerProfile { + /** Count - Number of load balancer VMs. The default value is 0. */ + count?: number; +} + +/** CloudProviderProfile - The underlying cloud infra provider properties. */ +export interface CloudProviderProfile { + /** InfraNetworkProfile - List of infra network profiles for the provisioned cluster */ + infraNetworkProfile?: CloudProviderProfileInfraNetworkProfile; +} + +/** InfraNetworkProfile - List of infra network profiles for the provisioned cluster */ +export interface CloudProviderProfileInfraNetworkProfile { + /** Array of references to azure resource corresponding to the Network object e.g. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName} */ + vnetSubnetIds?: string[]; } /** HybridAKSClusterStatus defines the observed state of HybridAKSCluster */ -export interface ProvisionedClustersCommonPropertiesStatus { - /** Additional features status like Arc Agent Onboarding. */ - featuresStatus?: ProvisionedClustersCommonPropertiesStatusFeaturesStatus; - /** AddonStatus - Status of Addons */ - addonStatus?: { [propertyName: string]: AddonStatus }; +export interface ProvisionedClusterPropertiesStatus { + /** Status of the control plane components */ + controlPlaneStatus?: AddonStatusProfile[]; /** ErrorMessage - Error messages during creation of cluster */ errorMessage?: string; /** Contains Provisioning errors */ - provisioningStatus?: ProvisionedClustersCommonPropertiesStatusProvisioningStatus; + operationStatus?: ProvisionedClusterPropertiesStatusOperationStatus; } -/** Additional features status like Arc Agent Onboarding. */ -export interface ProvisionedClustersCommonPropertiesStatusFeaturesStatus { - /** Defines the observed Arc Agent status that is resourceSynced back to the ARM resource. */ - arcAgentStatus?: ArcAgentStatus; -} - -/** Defines the observed Arc Agent status that is resourceSynced back to the ARM resource. */ -export interface ArcAgentStatus { - /** Observed deployment state of the Arc Agents on the target cluster. Possible values include: 'pending', 'provisioning', 'provisioned', 'deleting', 'failed', 'upgrading' */ - deploymentState?: DeploymentState; - /** Error messages while onboarding/upgrading/uninstalling the Arc agents */ - errorMessage?: string; - /** Onboarding public key for provisioning the Managed identity for the HybridAKS cluster. Will be used to create the hybridIdentityMetadata proxy resource and will not be persisted. */ - onboardingPublicKey?: string; - /** Version of the Arc agents currently running on the Provisioned cluster resource. */ - agentVersion?: string; - /** Number of CPU cores present in the Provisioned cluster resource */ - coreCount?: number; - /** ManagedIdentity certificate expiration time (ValidUntil). */ - managedIdentityCertificateExpirationTime?: Date; - /** Last connected timestamp of the Provisioned cluster resource. */ - lastConnectivityTime?: Date; -} - -/** Status of the addon */ -export interface AddonStatus { - /** ErrorMessage will be set in the event that there is a terminal problem reconciling the AddOn and will contain a more verbose string suitable for logging and human consumption. */ - errorMessage?: string; - /** Phase represents the current phase of cluster actuation. E.g. Pending, Running, Terminating, Failed etc. */ - phase?: string; +/** Defines the addon status profile. */ +export interface AddonStatusProfile { + /** Name of the addon */ + name?: string; + /** Observed phase of the addon on the target cluster. Possible values include: 'pending', 'provisioning', 'provisioning {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}', 'provisioned', 'deleting', 'failed', 'upgrading' */ + phase?: AddonPhase; + /** Indicates whether the addon is ready */ ready?: boolean; + /** Error message while deploying the addon */ + errorMessage?: string; } /** Contains Provisioning errors */ -export interface ProvisionedClustersCommonPropertiesStatusProvisioningStatus { - error?: ProvisionedClustersCommonPropertiesStatusProvisioningStatusError; +export interface ProvisionedClusterPropertiesStatusOperationStatus { + error?: ProvisionedClusterPropertiesStatusOperationStatusError; operationId?: string; - /** Phase represents the current phase of cluster actuation. E.g. Pending, Running, Terminating, Failed etc. */ - phase?: string; status?: string; } -export interface ProvisionedClustersCommonPropertiesStatusProvisioningStatusError { +export interface ProvisionedClusterPropertiesStatusOperationStatusError { code?: string; message?: string; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; +/** The license profile of the provisioned cluster. */ +export interface ProvisionedClusterLicenseProfile { + /** Indicates whether Azure Hybrid Benefit is opted in */ + azureHybridBenefit?: AzureHybridBenefit; } -export interface ProvisionedClustersResponseExtendedLocation { +/** Extended Location definition */ +export interface ExtendedLocation { /** The extended location type. */ - type?: string; + type?: ExtendedLocationTypes; /** The extended location name. */ name?: string; } @@ -325,7 +178,7 @@ export interface ProvisionedClustersResponseExtendedLocation { /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -339,6 +192,27 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ @@ -390,48 +264,9 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** Properties of provisioned clusters that contain secrets */ -export interface ProvisionedClustersPropertiesWithSecrets { - /** AAD profile for the provisioned cluster. */ - aadProfile?: AADProfile; - /** WindowsProfile - Profile for Windows VMs in the Provisioned Cluster. */ - windowsProfile?: WindowsProfile; - /** HttpProxyConfig - Configurations for provisioning the cluster with HTTP proxy servers. */ - httpProxyConfig?: HttpProxyConfig; -} - -/** The server AAD application secret. */ -export interface AADProfileSecret { - /** The server AAD application secret. */ - serverAppSecret?: string; -} - -/** Password for the Windows Profile to be used by the Windows VMs in the cluster */ -export interface WindowsProfilePassword { - /** AdminPassword - Specifies the password of the administrator account.

**Minimum-length:** 8 characters

**Max-length:** 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" */ - adminPassword?: string; -} - -export interface HttpProxyConfigPassword { - /** Password to use for connecting to proxy server */ - password?: string; -} - -export interface ProvisionedClustersExtendedLocation { - /** The extended location type. */ - type?: string; - /** The extended location name. */ - name?: string; -} - -/** The provisionedClusters resource patch definition. */ -export interface ProvisionedClustersPatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -export interface ProvisionedClustersResponseListResult { - value?: ProvisionedClustersResponse[]; +/** A list of provisioned clusters resources. */ +export interface ProvisionedClustersListResult { + value?: ProvisionedClusters[]; nextLink?: string; } @@ -448,7 +283,7 @@ export interface ProvisionedClusterPoolUpgradeProfile { */ readonly name?: string; /** - * OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + * The particular KubernetesVersion's Image's OS Type (Linux, Windows) * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osType?: OsType; @@ -504,312 +339,358 @@ export interface AgentPool { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - extendedLocation?: AgentPoolExtendedLocation; - /** Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. */ - count?: number; + /** Extended Location definition */ + extendedLocation?: ExtendedLocation; /** AvailabilityZones - The list of Availability zones to use for nodes. Datacenter racks modelled as zones */ availabilityZones?: string[]; - /** The maximum number of nodes for auto-scaling */ - maxCount?: number; - /** The maximum number of pods that can run on a node. */ - maxPods?: number; - /** The minimum number of nodes for auto-scaling */ - minCount?: number; - /** Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'LB', 'User'. Default is 'User' */ - mode?: Mode; - /** NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. */ - nodeLabels?: { [propertyName: string]: string }; - /** NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ - nodeTaints?: string[]; - /** OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' */ + /** The particular KubernetesVersion's Image's OS Type (Linux, Windows) */ osType?: OsType; + /** Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when OSType is Windows. */ + osSKU?: Ossku; /** The version of node image */ nodeImageVersion?: string; + /** Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. */ + count?: number; /** VmSize - The size of the agent pool VMs. */ vmSize?: string; - /** The underlying cloud infra provider properties. */ - cloudProviderProfile?: CloudProviderProfile; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: AgentPoolProvisioningState; - /** HybridAKSNodePoolStatus defines the observed state of HybridAKSNodePool */ + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ResourceProvisioningState; + /** Defines the observed state of the agent pool */ status?: AgentPoolProvisioningStatusStatus; } /** The agentPool resource provisioning status definition */ export interface AgentPoolProvisioningStatus { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: AgentPoolProvisioningState; - /** HybridAKSNodePoolStatus defines the observed state of HybridAKSNodePool */ + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ResourceProvisioningState; + /** Defines the observed state of the agent pool */ status?: AgentPoolProvisioningStatusStatus; } -/** HybridAKSNodePoolStatus defines the observed state of HybridAKSNodePool */ +/** Defines the observed state of the agent pool */ export interface AgentPoolProvisioningStatusStatus { - /** ErrorMessage - Error messages during creation of cluster */ + /** ErrorMessage - Error messages during creation of agent pool */ errorMessage?: string; /** Contains Provisioning errors */ - provisioningStatus?: AgentPoolProvisioningStatusStatusProvisioningStatus; - /** Total number of ready machines targeted by this deployment. */ - readyReplicas?: number; - /** Total number of non-terminated machines targeted by this deployment */ - replicas?: number; + operationStatus?: AgentPoolProvisioningStatusOperationStatus; + readyReplicas?: AgentPoolUpdateProfile[]; } /** Contains Provisioning errors */ -export interface AgentPoolProvisioningStatusStatusProvisioningStatus { - error?: AgentPoolProvisioningStatusError; +export interface AgentPoolProvisioningStatusOperationStatus { + error?: AgentPoolProvisioningStatusOperationStatusError; operationId?: string; - /** Phase represents the current phase of cluster actuation. E.g. Pending, Running, Terminating, Failed etc. */ - phase?: string; status?: string; } -export interface AgentPoolProvisioningStatusError { +export interface AgentPoolProvisioningStatusOperationStatusError { code?: string; message?: string; } -export interface AgentPoolExtendedLocation { - /** The extended location type. */ - type?: string; - /** The extended location name. */ - name?: string; +/** The agentPool resource patch definition */ +export interface AgentPoolPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; } +/** A list of agent pool resources. */ export interface AgentPoolListResult { value?: AgentPool[]; nextLink?: string; } -/** The list of versions for supported orchestrators. */ -export interface OrchestratorVersionProfileListResult { - /** Profile of the orchestrator versions */ - orchestrators?: OrchestratorVersionProfile[]; +/** The list kubeconfig result response. */ +export interface ListCredentialResponse { /** - * Resource Id + * Operation Id * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * Resource Name + * Operation Name * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Resource Type + * ARM Resource Id of the provisioned cluster instance * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly resourceId?: string; + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ResourceProvisioningState; + error?: ListCredentialResponseError; + properties?: ListCredentialResponseProperties; } -/** The profile of an orchestrator and its available versions. */ -export interface OrchestratorVersionProfile { +export interface ListCredentialResponseError { + code?: string; + message?: string; +} + +export interface ListCredentialResponseProperties { /** - * Whether Kubernetes version is currently in preview. + * Base64-encoded Kubernetes configuration file. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isPreview?: boolean; + readonly kubeconfigs?: CredentialResult[]; +} + +/** The credential result response. */ +export interface CredentialResult { /** - * Installed by default if version is not specified. + * The name of the credential. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly default?: boolean; + readonly name?: string; /** - * Orchestrator type. + * Base64-encoded Kubernetes configuration file. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly orchestratorType?: string; + readonly value?: Uint8Array; +} + +export interface KubernetesVersionProfileProperties { /** - * Orchestrator version major.minor.patch, for example 1.21.9 + * Provisioning state of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly orchestratorVersion?: string; - /** The list of available upgrade versions. */ - upgrades?: OrchestratorProfile[]; + readonly provisioningState?: ResourceProvisioningState; + /** List of supported Kubernetes versions */ + values?: KubernetesVersionProperties[]; } -/** Contains information about orchestrator. */ -export interface OrchestratorProfile { +/** Kubernetes version profile for given major.minor release */ +export interface KubernetesVersionProperties { /** - * Whether Kubernetes version is currently in preview. + * major.minor version of Kubernetes release * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isPreview?: boolean; + readonly version?: string; /** - * Orchestrator type. + * Capabilities on this kubernetes version * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly orchestratorType?: string; + readonly capabilities?: KubernetesVersionCapabilities; /** - * Orchestrator version (major, minor, patch). + * Whether this version is in preview mode. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly orchestratorVersion?: string; -} - -/** The list of supported VM SKUs. */ -export interface VMSkuListResult { + readonly isPreview?: boolean; /** - * Supported VM SKUs. + * Patch versions of a Kubernetes release * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmSKUs?: string[]; + readonly patchVersions?: { [propertyName: string]: KubernetesPatchVersions }; +} + +/** Capabilities on this kubernetes version */ +export interface KubernetesVersionCapabilities { + supportPlan?: string[]; +} + +/** Kubernetes Patch Version profile */ +export interface KubernetesPatchVersions { + /** Whether the kubernetes version variant (Linux, Windows, Windows2022) is ready or not */ + readiness?: KubernetesVersionReadiness[]; + /** Possible upgrade path for given patch version */ + upgrades?: string[]; +} + +/** Whether a particular kubernetes version's variant (CBLMariner, Windows, Windows2022) is ready or not */ +export interface KubernetesVersionReadiness { /** - * Resource Id + * The particular KubernetesVersion's Image's OS Type (Linux, Windows) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly osType?: OsType; + /** Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when OSType is Windows. */ + osSku?: Ossku; /** - * Resource Name + * Whether or not the given image is ready * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly ready?: boolean; /** - * Resource Type + * If image is not ready, the error message for version not being ready * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly errorMessage?: string; } -/** Results of the request to list operations. */ -export interface ResourceProviderOperationList { - value?: ResourceProviderOperation[]; +/** A list of kubernetes version resources. */ +export interface KubernetesVersionProfileList { + value?: KubernetesVersionProfile[]; nextLink?: string; } -/** Results of the request to list operations. */ -export interface ResourceProviderOperation { - /** Indicates whether the operation applies to data-plane. */ - isDataAction?: string; - /** Operation name, in format of {provider}/{resource}/{operation} */ - name?: string; - /** Display metadata associated with the operation. */ - display?: ResourceProviderOperationDisplay; -} - -/** Display metadata associated with the operation. */ -export interface ResourceProviderOperationDisplay { - /** The resource provider. */ - provider?: string; - /** Resource on which the operation is performed. */ - resource?: string; - /** Type of operation: get, read, delete, etc. */ - operation?: string; - /** Description of this operation. */ - description?: string; -} - -/** HybridAKSStorageSpec defines the desired state of HybridAKSStorage */ -export interface StorageSpacesProperties { - hciStorageProfile?: StorageSpacesPropertiesHciStorageProfile; - vmwareStorageProfile?: StorageSpacesPropertiesVmwareStorageProfile; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; - /** HybridAKSStorageStatus defines the observed state of HybridAKSStorage */ - status?: StorageSpacesPropertiesStatus; -} - -export interface StorageSpacesPropertiesHciStorageProfile { - /** Resource group in MOC(Microsoft On-premises Cloud) */ - mocGroup?: string; - /** Location in MOC(Microsoft On-premises Cloud) */ - mocLocation?: string; - /** Name of the storage container in MOC(Microsoft On-premises Cloud) */ - mocStorageContainer?: string; -} - -export interface StorageSpacesPropertiesVmwareStorageProfile { - /** Name of the datacenter in VSphere */ - datacenter?: string; - /** Name of the datastore in VSphere */ - datastore?: string; - /** Name of the folder in VSphere */ - folder?: string; - /** Name of the resource pool in VSphere */ - resourcePool?: string; +export interface VmSkuProfileProperties { + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ResourceProvisioningState; + /** Array of HybridAKS Support VM Skus */ + values?: VmSkuProperties[]; } -/** HybridAKSStorageStatus defines the observed state of HybridAKSStorage */ -export interface StorageSpacesPropertiesStatus { - /** Contains Provisioning errors */ - provisioningStatus?: StorageSpacesPropertiesStatusProvisioningStatus; +/** The profile for supported VM skus */ +export interface VmSkuProperties { + /** + * The resource type of the vm + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * A name value pair to describe the specific vm's capability + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: VmSkuCapabilities[]; + /** + * The name of the VM Family + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The tier of the VM Family + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tier?: string; + /** + * The size of the VM Family + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly size?: string; } -/** Contains Provisioning errors */ -export interface StorageSpacesPropertiesStatusProvisioningStatus { - error?: StorageSpacesPropertiesStatusProvisioningStatusError; - operationId?: string; - /** Phase represents the current phase of cluster actuation. E.g. Pending, Running, Terminating, Failed etc. */ - phase?: string; - status?: string; +/** describes the vm sku capabilities object */ +export interface VmSkuCapabilities { + /** + * An invariant to describe the feature + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * An invariant if the feature is measured by quantity + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; } -export interface StorageSpacesPropertiesStatusProvisioningStatusError { - code?: string; - message?: string; +/** A list of VM SKU resources. */ +export interface VmSkuProfileList { + value?: VmSkuProfile[]; + nextLink?: string; } -export interface StorageSpacesExtendedLocation { - /** The extended location type. */ - type?: string; - /** The extended location name. */ - name?: string; +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The storageSpaces resource patch definition. */ -export interface StorageSpacesPatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; } -export interface StorageSpacesListResult { - value?: StorageSpaces[]; - nextLink?: string; +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; } /** HybridAKSNetworkSpec defines the desired state of HybridAKSNetwork */ -export interface VirtualNetworksProperties { - infraVnetProfile?: VirtualNetworksPropertiesInfraVnetProfile; +export interface VirtualNetworkProperties { + infraVnetProfile?: VirtualNetworkPropertiesInfraVnetProfile; /** Virtual IP Pool for Kubernetes */ - vipPool?: VirtualNetworksPropertiesVipPoolItem[]; + vipPool?: VirtualNetworkPropertiesVipPoolItem[]; /** IP Pool for Virtual Machines */ - vmipPool?: VirtualNetworksPropertiesVmipPoolItem[]; - /** - * Address of the DHCP servers associated with the network - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dhcpServers?: string[]; + vmipPool?: VirtualNetworkPropertiesVmipPoolItem[]; + /** Address of the DHCP servers associated with the network */ + dhcpServers?: string[]; /** Address of the DNS servers associated with the network */ dnsServers?: string[]; /** Address of the Gateway associated with the network */ gateway?: string; /** IP Address Prefix of the network */ ipAddressPrefix?: string; - /** - * VLAN Id used by the network - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vlanID?: string; + /** VLAN Id used by the network */ + vlanID?: number; /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; /** * HybridAKSNetworkStatus defines the observed state of HybridAKSNetwork * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: VirtualNetworksPropertiesStatus; + readonly status?: VirtualNetworkPropertiesStatus; } -export interface VirtualNetworksPropertiesInfraVnetProfile { +export interface VirtualNetworkPropertiesInfraVnetProfile { /** Infra network profile for HCI platform */ - hci?: VirtualNetworksPropertiesInfraVnetProfileHci; - /** Infra network profile for the NetworkCloud platform */ - networkCloud?: VirtualNetworksPropertiesInfraVnetProfileNetworkCloud; + hci?: VirtualNetworkPropertiesInfraVnetProfileHci; /** Infra network profile for VMware platform */ - vmware?: VirtualNetworksPropertiesInfraVnetProfileVmware; + vmware?: VirtualNetworkPropertiesInfraVnetProfileVmware; } /** Infra network profile for HCI platform */ -export interface VirtualNetworksPropertiesInfraVnetProfileHci { +export interface VirtualNetworkPropertiesInfraVnetProfileHci { /** Resource group in MOC(Microsoft On-premises Cloud) */ mocGroup?: string; /** Location in MOC(Microsoft On-premises Cloud) */ @@ -818,26 +699,20 @@ export interface VirtualNetworksPropertiesInfraVnetProfileHci { mocVnetName?: string; } -/** Infra network profile for the NetworkCloud platform */ -export interface VirtualNetworksPropertiesInfraVnetProfileNetworkCloud { - /** The ARM ID of Network Cloud Network Resource to Associate with this VirtualNetwork */ - networkId?: string; -} - /** Infra network profile for VMware platform */ -export interface VirtualNetworksPropertiesInfraVnetProfileVmware { +export interface VirtualNetworkPropertiesInfraVnetProfileVmware { /** Name of the network segment in VSphere */ segmentName?: string; } -export interface VirtualNetworksPropertiesVipPoolItem { +export interface VirtualNetworkPropertiesVipPoolItem { /** Ending IP address for the IP Pool */ endIP?: string; /** Starting IP address for the IP Pool */ startIP?: string; } -export interface VirtualNetworksPropertiesVmipPoolItem { +export interface VirtualNetworkPropertiesVmipPoolItem { /** Ending IP address for the IP Pool */ endIP?: string; /** Starting IP address for the IP Pool */ @@ -845,26 +720,26 @@ export interface VirtualNetworksPropertiesVmipPoolItem { } /** HybridAKSNetworkStatus defines the observed state of HybridAKSNetwork */ -export interface VirtualNetworksPropertiesStatus { +export interface VirtualNetworkPropertiesStatus { /** Contains Provisioning errors */ - provisioningStatus?: VirtualNetworksPropertiesStatusProvisioningStatus; + operationStatus?: VirtualNetworkPropertiesStatusOperationStatus; } /** Contains Provisioning errors */ -export interface VirtualNetworksPropertiesStatusProvisioningStatus { - error?: VirtualNetworksPropertiesStatusProvisioningStatusError; +export interface VirtualNetworkPropertiesStatusOperationStatus { + error?: VirtualNetworkPropertiesStatusOperationStatusError; operationId?: string; - /** Phase represents the current phase of cluster actuation. E.g. Pending, Running, Terminating, Failed etc. */ + /** Phase represents the current phase of the virtual network provisioning. E.g. Pending, Running, Terminating, Failed etc. */ phase?: string; status?: string; } -export interface VirtualNetworksPropertiesStatusProvisioningStatusError { +export interface VirtualNetworkPropertiesStatusOperationStatusError { code?: string; message?: string; } -export interface VirtualNetworksExtendedLocation { +export interface VirtualNetworkExtendedLocation { /** The extended location type. */ type?: string; /** The extended location name. */ @@ -878,39 +753,19 @@ export interface VirtualNetworksPatch { } export interface VirtualNetworksListResult { - value?: VirtualNetworks[]; + value?: VirtualNetwork[]; nextLink?: string; } -export interface ProvisionedClustersResponseProperties - extends ProvisionedClustersPropertiesWithoutSecrets, - ProvisionedClustersCommonProperties {} - -/** AAD Profile specifies attributes for Azure Active Directory integration. */ -export interface AADProfile extends AADProfileSecret, AADProfileResponse {} - -/** WindowsProfile - Profile for Windows VMs in the container service cluster. */ -export interface WindowsProfile - extends WindowsProfileResponse, - WindowsProfilePassword {} - -/** Configurations for provisioning the cluster with HTTP proxy servers. */ -export interface HttpProxyConfig - extends HttpProxyConfigResponse, - HttpProxyConfigPassword {} - -/** All properties of the provisioned cluster */ -export interface ProvisionedClustersAllProperties - extends ProvisionedClustersPropertiesWithSecrets, - ProvisionedClustersCommonProperties {} - /** Agent pool profile along with a name parameter */ export interface NamedAgentPoolProfile extends AgentPoolProfile, + AgentPoolUpdateProfile, AgentPoolName {} export interface AgentPoolProperties extends AgentPoolProfile, + AgentPoolUpdateProfile, AgentPoolProvisioningStatus {} /** ControlPlaneProfile - The control plane properties for the provisioned cluster. */ @@ -919,11 +774,9 @@ export interface ControlPlaneProfile ControlPlaneEndpointProfile, LinuxProfile {} -/** LoadBalancerProfile - Profile of the cluster load balancer. */ -export interface LoadBalancerProfile - extends NamedAgentPoolProfile, - LinuxProfile {} - +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** The 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. */ @@ -932,64 +785,21 @@ export interface TrackedResource extends Resource { location: string; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** The provisionedClusters resource definition. */ -export interface ProvisionedClustersResponse extends TrackedResource { - /** Identity for the Provisioned cluster. */ - identity?: ProvisionedClusterIdentity; - properties?: ProvisionedClustersResponseProperties; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - extendedLocation?: ProvisionedClustersResponseExtendedLocation; -} - -/** The provisionedClusters resource definition. */ -export interface ProvisionedClusters extends TrackedResource { - /** Identity for the Provisioned cluster. */ - identity?: ProvisionedClusterIdentity; +/** The provisionedClusterInstances resource definition. */ +export interface ProvisionedClusters extends ProxyResource { /** All properties of the provisioned cluster */ - properties?: ProvisionedClustersAllProperties; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - extendedLocation?: ProvisionedClustersExtendedLocation; -} - -/** The storageSpaces resource definition. */ -export interface StorageSpaces extends TrackedResource { - /** HybridAKSStorageSpec defines the desired state of HybridAKSStorage */ - properties?: StorageSpacesProperties; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - extendedLocation?: StorageSpacesExtendedLocation; + properties?: ProvisionedClusterProperties; + /** Extended Location definition */ + extendedLocation?: ExtendedLocation; } -/** The virtualNetworks resource definition. */ -export interface VirtualNetworks extends TrackedResource { - /** HybridAKSNetworkSpec defines the desired state of HybridAKSNetwork */ - properties?: VirtualNetworksProperties; +/** The list of available upgrades for compute pools. */ +export interface ProvisionedClusterUpgradeProfile extends ProxyResource { /** - * Metadata pertaining to creation and last modification of the resource. + * Provisioning state of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - extendedLocation?: VirtualNetworksExtendedLocation; -} - -/** The list of available upgrades for compute pools. */ -export interface ProvisionedClusterUpgradeProfile extends ProxyResource { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ResourceProvisioningState; /** The list of available upgrade versions for the control plane. */ controlPlaneProfile: ProvisionedClusterPoolUpgradeProfile; /** The list of available upgrade versions for agent pools. */ @@ -998,87 +808,96 @@ export interface ProvisionedClusterUpgradeProfile extends ProxyResource { /** Defines the hybridIdentityMetadata. */ export interface HybridIdentityMetadata extends ProxyResource { - /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** Unique id of the parent provisioned cluster resource. */ resourceUid?: string; /** Onboarding public key for provisioning the Managed identity for the HybridAKS cluster. */ publicKey?: string; - /** The identity of the provisioned cluster. */ - identity?: ProvisionedClusterIdentity; /** - * provisioning state of the hybridIdentityMetadata resource. + * Provisioning state of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ResourceProvisioningState; } -/** Known values of {@link LicenseType} that the service accepts. */ -export enum KnownLicenseType { - /** WindowsServer */ - WindowsServer = "Windows_Server", - /** None */ - None = "None" +/** The supported kubernetes versions. */ +export interface KubernetesVersionProfile extends ProxyResource { + /** Extended Location definition */ + extendedLocation?: ExtendedLocation; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly properties?: KubernetesVersionProfileProperties; } -/** - * Defines values for LicenseType. \ - * {@link KnownLicenseType} can be used interchangeably with LicenseType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows_Server** \ - * **None** - */ -export type LicenseType = string; +/** The list of supported VM SKUs. */ +export interface VmSkuProfile extends ProxyResource { + /** Extended Location definition */ + extendedLocation?: ExtendedLocation; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly properties?: VmSkuProfileProperties; +} -/** Known values of {@link AutoUpgradeOptions} that the service accepts. */ -export enum KnownAutoUpgradeOptions { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" +/** The virtualNetworks resource definition. */ +export interface VirtualNetwork extends TrackedResource { + /** HybridAKSNetworkSpec defines the desired state of HybridAKSNetwork */ + properties?: VirtualNetworkProperties; + extendedLocation?: VirtualNetworkExtendedLocation; } -/** - * Defines values for AutoUpgradeOptions. \ - * {@link KnownAutoUpgradeOptions} can be used interchangeably with AutoUpgradeOptions, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type AutoUpgradeOptions = string; +/** Defines headers for ProvisionedClusterInstances_delete operation. */ +export interface ProvisionedClusterInstancesDeleteHeaders { + location?: string; +} -/** Known values of {@link Mode} that the service accepts. */ -export enum KnownMode { - /** System */ - System = "System", - /** LB */ - LB = "LB", - /** User */ - User = "User" +/** Defines headers for ProvisionedClusterInstances_listUserKubeconfig operation. */ +export interface ProvisionedClusterInstancesListUserKubeconfigHeaders { + location?: string; } -/** - * Defines values for Mode. \ - * {@link KnownMode} can be used interchangeably with Mode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **System** \ - * **LB** \ - * **User** - */ -export type Mode = string; +/** Defines headers for ProvisionedClusterInstances_listAdminKubeconfig operation. */ +export interface ProvisionedClusterInstancesListAdminKubeconfigHeaders { + location?: string; +} + +/** Defines headers for HybridIdentityMetadata_delete operation. */ +export interface HybridIdentityMetadataDeleteHeaders { + location?: string; +} + +/** Defines headers for AgentPool_delete operation. */ +export interface AgentPoolDeleteHeaders { + location?: string; +} + +/** Defines headers for AgentPool_update operation. */ +export interface AgentPoolUpdateHeaders { + location?: string; +} + +/** Defines headers for HybridContainerServiceClient_deleteKubernetesVersions operation. */ +export interface HybridContainerServiceClientDeleteKubernetesVersionsHeaders { + location?: string; +} + +/** Defines headers for HybridContainerServiceClient_deleteVMSkus operation. */ +export interface HybridContainerServiceClientDeleteVMSkusHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_delete operation. */ +export interface VirtualNetworksDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_update operation. */ +export interface VirtualNetworksUpdateHeaders { + location?: string; +} /** Known values of {@link OsType} that the service accepts. */ export enum KnownOsType { - /** Linux */ - Linux = "Linux", /** Windows */ - Windows = "Windows" + Windows = "Windows", + /** Linux */ + Linux = "Linux" } /** @@ -1086,34 +905,31 @@ export enum KnownOsType { * {@link KnownOsType} can be used interchangeably with OsType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Linux** \ - * **Windows** + * **Windows** \ + * **Linux** */ export type OsType = string; -/** Known values of {@link LoadBalancerSku} that the service accepts. */ -export enum KnownLoadBalancerSku { - /** UnstackedHaproxy */ - UnstackedHaproxy = "unstacked-haproxy", - /** StackedKubeVip */ - StackedKubeVip = "stacked-kube-vip", - /** StackedMetallb */ - StackedMetallb = "stacked-metallb", - /** Unmanaged */ - Unmanaged = "unmanaged" +/** Known values of {@link Ossku} that the service accepts. */ +export enum KnownOssku { + /** Use Mariner as the OS for node images. */ + CBLMariner = "CBLMariner", + /** Use Windows2019 as the OS for node images. */ + Windows2019 = "Windows2019", + /** Use Windows2022 as the OS for node images. */ + Windows2022 = "Windows2022" } /** - * Defines values for LoadBalancerSku. \ - * {@link KnownLoadBalancerSku} can be used interchangeably with LoadBalancerSku, + * Defines values for Ossku. \ + * {@link KnownOssku} can be used interchangeably with Ossku, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **unstacked-haproxy** \ - * **stacked-kube-vip** \ - * **stacked-metallb** \ - * **unmanaged** + * **CBLMariner**: Use Mariner as the OS for node images. \ + * **Windows2019**: Use Windows2019 as the OS for node images. \ + * **Windows2022**: Use Windows2022 as the OS for node images. */ -export type LoadBalancerSku = string; +export type Ossku = string; /** Known values of {@link NetworkPolicy} that the service accepts. */ export enum KnownNetworkPolicy { @@ -1133,20 +949,24 @@ export enum KnownNetworkPolicy { */ export type NetworkPolicy = string; -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { +/** Known values of {@link ResourceProvisioningState} that the service accepts. */ +export enum KnownResourceProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** Failed */ Failed = "Failed", /** Canceled */ Canceled = "Canceled", - /** InProgress */ - InProgress = "InProgress", + /** Creating */ + Creating = "Creating", /** Deleting */ Deleting = "Deleting", /** Updating */ Updating = "Updating", + /** Upgrading */ + Upgrading = "Upgrading", + /** InProgress */ + InProgress = "InProgress", /** Accepted */ Accepted = "Accepted", /** Created */ @@ -1154,27 +974,33 @@ export enum KnownProvisioningState { } /** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * Defines values for ResourceProvisioningState. \ + * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Succeeded** \ * **Failed** \ * **Canceled** \ - * **InProgress** \ + * **Creating** \ * **Deleting** \ * **Updating** \ + * **Upgrading** \ + * **InProgress** \ * **Accepted** \ * **Created** */ -export type ProvisioningState = string; +export type ResourceProvisioningState = string; -/** Known values of {@link DeploymentState} that the service accepts. */ -export enum KnownDeploymentState { +/** Known values of {@link AddonPhase} that the service accepts. */ +export enum KnownAddonPhase { /** Pending */ Pending = "pending", /** Provisioning */ Provisioning = "provisioning", + /** ProvisioningHelmChartInstalled */ + ProvisioningHelmChartInstalled = "provisioning {HelmChartInstalled}", + /** ProvisioningMSICertificateDownloaded */ + ProvisioningMSICertificateDownloaded = "provisioning {MSICertificateDownloaded}", /** Provisioned */ Provisioned = "provisioned", /** Deleting */ @@ -1186,18 +1012,56 @@ export enum KnownDeploymentState { } /** - * Defines values for DeploymentState. \ - * {@link KnownDeploymentState} can be used interchangeably with DeploymentState, + * Defines values for AddonPhase. \ + * {@link KnownAddonPhase} can be used interchangeably with AddonPhase, * this enum contains the known values that the service supports. * ### Known values supported by the service * **pending** \ * **provisioning** \ + * **provisioning {HelmChartInstalled}** \ + * **provisioning {MSICertificateDownloaded}** \ * **provisioned** \ * **deleting** \ * **failed** \ * **upgrading** */ -export type DeploymentState = string; +export type AddonPhase = string; + +/** Known values of {@link AzureHybridBenefit} that the service accepts. */ +export enum KnownAzureHybridBenefit { + /** True */ + True = "True", + /** False */ + False = "False", + /** NotApplicable */ + NotApplicable = "NotApplicable" +} + +/** + * Defines values for AzureHybridBenefit. \ + * {@link KnownAzureHybridBenefit} can be used interchangeably with AzureHybridBenefit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** \ + * **NotApplicable** + */ +export type AzureHybridBenefit = string; + +/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ +export enum KnownExtendedLocationTypes { + /** CustomLocation */ + CustomLocation = "CustomLocation" +} + +/** + * Defines values for ExtendedLocationTypes. \ + * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CustomLocation** + */ +export type ExtendedLocationTypes = string; /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { @@ -1223,44 +1087,87 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; -/** Known values of {@link AgentPoolProvisioningState} that the service accepts. */ -export enum KnownAgentPoolProvisioningState { +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** Failed */ Failed = "Failed", - /** Deleting */ - Deleting = "Deleting", + /** Canceled */ + Canceled = "Canceled", /** InProgress */ InProgress = "InProgress", - /** Canceled */ - Canceled = "Canceled" + /** Deleting */ + Deleting = "Deleting", + /** Updating */ + Updating = "Updating", + /** Accepted */ + Accepted = "Accepted", + /** Created */ + Created = "Created" } /** - * Defines values for AgentPoolProvisioningState. \ - * {@link KnownAgentPoolProvisioningState} can be used interchangeably with AgentPoolProvisioningState, + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Succeeded** \ * **Failed** \ - * **Deleting** \ + * **Canceled** \ * **InProgress** \ - * **Canceled** + * **Deleting** \ + * **Updating** \ + * **Accepted** \ + * **Created** */ -export type AgentPoolProvisioningState = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = "None" | "SystemAssigned"; +export type ProvisioningState = string; /** Optional parameters. */ -export interface ProvisionedClustersGetOptionalParams +export interface ProvisionedClusterInstancesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ProvisionedClustersGetResponse = ProvisionedClustersResponse; +export type ProvisionedClusterInstancesGetResponse = ProvisionedClusters; /** Optional parameters. */ -export interface ProvisionedClustersCreateOrUpdateOptionalParams +export interface ProvisionedClusterInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1269,14 +1176,10 @@ export interface ProvisionedClustersCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ProvisionedClustersCreateOrUpdateResponse = ProvisionedClustersResponse; - -/** Optional parameters. */ -export interface ProvisionedClustersDeleteOptionalParams - extends coreClient.OperationOptions {} +export type ProvisionedClusterInstancesCreateOrUpdateResponse = ProvisionedClusters; /** Optional parameters. */ -export interface ProvisionedClustersUpdateOptionalParams +export interface ProvisionedClusterInstancesDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1284,32 +1187,25 @@ export interface ProvisionedClustersUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type ProvisionedClustersUpdateResponse = ProvisionedClustersResponse; - -/** Optional parameters. */ -export interface ProvisionedClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ProvisionedClustersListByResourceGroupResponse = ProvisionedClustersResponseListResult; +/** Contains response data for the delete operation. */ +export type ProvisionedClusterInstancesDeleteResponse = ProvisionedClusterInstancesDeleteHeaders; /** Optional parameters. */ -export interface ProvisionedClustersListBySubscriptionOptionalParams +export interface ProvisionedClusterInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type ProvisionedClustersListBySubscriptionResponse = ProvisionedClustersResponseListResult; +/** Contains response data for the list operation. */ +export type ProvisionedClusterInstancesListResponse = ProvisionedClustersListResult; /** Optional parameters. */ -export interface ProvisionedClustersGetUpgradeProfileOptionalParams +export interface ProvisionedClusterInstancesGetUpgradeProfileOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getUpgradeProfile operation. */ -export type ProvisionedClustersGetUpgradeProfileResponse = ProvisionedClusterUpgradeProfile; +export type ProvisionedClusterInstancesGetUpgradeProfileResponse = ProvisionedClusterUpgradeProfile; /** Optional parameters. */ -export interface ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams +export interface ProvisionedClusterInstancesListUserKubeconfigOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1317,19 +1213,27 @@ export interface ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptio resumeFrom?: string; } +/** Contains response data for the listUserKubeconfig operation. */ +export type ProvisionedClusterInstancesListUserKubeconfigResponse = ListCredentialResponse; + /** Optional parameters. */ -export interface ProvisionedClustersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} +export interface ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ProvisionedClustersListByResourceGroupNextResponse = ProvisionedClustersResponseListResult; +/** Contains response data for the listAdminKubeconfig operation. */ +export type ProvisionedClusterInstancesListAdminKubeconfigResponse = ListCredentialResponse; /** Optional parameters. */ -export interface ProvisionedClustersListBySubscriptionNextOptionalParams +export interface ProvisionedClusterInstancesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ProvisionedClustersListBySubscriptionNextResponse = ProvisionedClustersResponseListResult; +/** Contains response data for the listNext operation. */ +export type ProvisionedClusterInstancesListNextResponse = ProvisionedClustersListResult; /** Optional parameters. */ export interface HybridIdentityMetadataPutOptionalParams @@ -1347,7 +1251,15 @@ export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; /** Optional parameters. */ export interface HybridIdentityMetadataDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type HybridIdentityMetadataDeleteResponse = HybridIdentityMetadataDeleteHeaders; /** Optional parameters. */ export interface HybridIdentityMetadataListByClusterOptionalParams @@ -1384,11 +1296,24 @@ export type AgentPoolCreateOrUpdateResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type AgentPoolDeleteResponse = AgentPoolDeleteHeaders; /** Optional parameters. */ export interface AgentPoolUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ export type AgentPoolUpdateResponse = AgentPool; @@ -1401,58 +1326,55 @@ export interface AgentPoolListByProvisionedClusterOptionalParams export type AgentPoolListByProvisionedClusterResponse = AgentPoolListResult; /** Optional parameters. */ -export interface HybridContainerServiceListOrchestratorsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listOrchestrators operation. */ -export type HybridContainerServiceListOrchestratorsResponse = OrchestratorVersionProfileListResult; - -/** Optional parameters. */ -export interface HybridContainerServiceListVMSkusOptionalParams +export interface GetKubernetesVersionsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listVMSkus operation. */ -export type HybridContainerServiceListVMSkusResponse = VMSkuListResult; +/** Contains response data for the getKubernetesVersions operation. */ +export type GetKubernetesVersionsResponse = KubernetesVersionProfile; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface PutKubernetesVersionsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the list operation. */ -export type OperationsListResponse = ResourceProviderOperationList; +/** Contains response data for the putKubernetesVersions operation. */ +export type PutKubernetesVersionsResponse = KubernetesVersionProfile; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface DeleteKubernetesVersionsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = ResourceProviderOperationList; +/** Contains response data for the deleteKubernetesVersions operation. */ +export type DeleteKubernetesVersionsResponse = HybridContainerServiceClientDeleteKubernetesVersionsHeaders; /** Optional parameters. */ -export interface StorageSpacesRetrieveOptionalParams - extends coreClient.OperationOptions {} +export interface GetVMSkusOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the retrieve operation. */ -export type StorageSpacesRetrieveResponse = StorageSpaces; +/** Contains response data for the getVMSkus operation. */ +export type GetVMSkusResponse = VmSkuProfile; /** Optional parameters. */ -export interface StorageSpacesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { +export interface PutVMSkusOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type StorageSpacesCreateOrUpdateResponse = StorageSpaces; - -/** Optional parameters. */ -export interface StorageSpacesDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the putVMSkus operation. */ +export type PutVMSkusResponse = VmSkuProfile; /** Optional parameters. */ -export interface StorageSpacesUpdateOptionalParams +export interface DeleteVMSkusOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1460,43 +1382,56 @@ export interface StorageSpacesUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type StorageSpacesUpdateResponse = StorageSpaces; +/** Contains response data for the deleteVMSkus operation. */ +export type DeleteVMSkusResponse = HybridContainerServiceClientDeleteVMSkusHeaders; /** Optional parameters. */ -export interface StorageSpacesListByResourceGroupOptionalParams +export interface KubernetesVersionsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type StorageSpacesListByResourceGroupResponse = StorageSpacesListResult; +/** Contains response data for the list operation. */ +export type KubernetesVersionsListResponse = KubernetesVersionProfileList; /** Optional parameters. */ -export interface StorageSpacesListBySubscriptionOptionalParams +export interface KubernetesVersionsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type StorageSpacesListBySubscriptionResponse = StorageSpacesListResult; +/** Contains response data for the listNext operation. */ +export type KubernetesVersionsListNextResponse = KubernetesVersionProfileList; + +/** Optional parameters. */ +export interface VMSkusListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type VMSkusListResponse = VmSkuProfileList; /** Optional parameters. */ -export interface StorageSpacesListByResourceGroupNextOptionalParams +export interface VMSkusListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type StorageSpacesListByResourceGroupNextResponse = StorageSpacesListResult; +/** Contains response data for the listNext operation. */ +export type VMSkusListNextResponse = VmSkuProfileList; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; /** Optional parameters. */ -export interface StorageSpacesListBySubscriptionNextOptionalParams +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type StorageSpacesListBySubscriptionNextResponse = StorageSpacesListResult; +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; /** Optional parameters. */ export interface VirtualNetworksRetrieveOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the retrieve operation. */ -export type VirtualNetworksRetrieveResponse = VirtualNetworks; +export type VirtualNetworksRetrieveResponse = VirtualNetwork; /** Optional parameters. */ export interface VirtualNetworksCreateOrUpdateOptionalParams @@ -1508,11 +1443,19 @@ export interface VirtualNetworksCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type VirtualNetworksCreateOrUpdateResponse = VirtualNetworks; +export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; /** Optional parameters. */ export interface VirtualNetworksDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; /** Optional parameters. */ export interface VirtualNetworksUpdateOptionalParams @@ -1524,7 +1467,7 @@ export interface VirtualNetworksUpdateOptionalParams } /** Contains response data for the update operation. */ -export type VirtualNetworksUpdateResponse = VirtualNetworks; +export type VirtualNetworksUpdateResponse = VirtualNetwork; /** Optional parameters. */ export interface VirtualNetworksListByResourceGroupOptionalParams diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/mappers.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/mappers.ts index f70c7e3b1207..a8830d98febd 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/mappers.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/mappers.ts @@ -8,199 +8,11 @@ import * as coreClient from "@azure/core-client"; -export const ProvisionedClusterIdentity: coreClient.CompositeMapper = { +export const ProvisionedClusterProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClusterIdentity", + className: "ProvisionedClusterProperties", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "Enum", - allowedValues: ["None", "SystemAssigned"] - } - } - } - } -}; - -export const ProvisionedClustersPropertiesWithoutSecrets: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersPropertiesWithoutSecrets", - modelProperties: { - aadProfile: { - serializedName: "aadProfile", - type: { - name: "Composite", - className: "AADProfileResponse" - } - }, - windowsProfile: { - serializedName: "windowsProfile", - type: { - name: "Composite", - className: "WindowsProfileResponse" - } - }, - httpProxyConfig: { - serializedName: "httpProxyConfig", - type: { - name: "Composite", - className: "HttpProxyConfigResponse" - } - } - } - } -}; - -export const AADProfileResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AADProfileResponse", - modelProperties: { - adminGroupObjectIDs: { - serializedName: "adminGroupObjectIDs", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - clientAppID: { - serializedName: "clientAppID", - type: { - name: "String" - } - }, - enableAzureRbac: { - serializedName: "enableAzureRbac", - type: { - name: "Boolean" - } - }, - managed: { - serializedName: "managed", - type: { - name: "Boolean" - } - }, - serverAppID: { - serializedName: "serverAppID", - type: { - name: "String" - } - }, - tenantID: { - serializedName: "tenantID", - type: { - name: "String" - } - } - } - } -}; - -export const WindowsProfileResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsProfileResponse", - modelProperties: { - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String" - } - }, - enableCsiProxy: { - serializedName: "enableCsiProxy", - type: { - name: "Boolean" - } - }, - licenseType: { - serializedName: "licenseType", - type: { - name: "String" - } - } - } - } -}; - -export const HttpProxyConfigResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpProxyConfigResponse", - modelProperties: { - httpProxy: { - serializedName: "httpProxy", - type: { - name: "String" - } - }, - httpsProxy: { - serializedName: "httpsProxy", - type: { - name: "String" - } - }, - noProxy: { - serializedName: "noProxy", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - trustedCa: { - serializedName: "trustedCa", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - type: { - name: "String" - } - } - } - } -}; - -export const ProvisionedClustersCommonProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersCommonProperties", - modelProperties: { - enableRbac: { - serializedName: "enableRbac", - type: { - name: "Boolean" - } - }, linuxProfile: { serializedName: "linuxProfile", type: { @@ -208,20 +20,6 @@ export const ProvisionedClustersCommonProperties: coreClient.CompositeMapper = { className: "LinuxProfileProperties" } }, - features: { - serializedName: "features", - type: { - name: "Composite", - className: "ProvisionedClustersCommonPropertiesFeatures" - } - }, - addonProfiles: { - serializedName: "addonProfiles", - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "AddonProfiles" } } - } - }, controlPlane: { serializedName: "controlPlane", type: { @@ -242,12 +40,6 @@ export const ProvisionedClustersCommonProperties: coreClient.CompositeMapper = { className: "NetworkProfile" } }, - nodeResourceGroup: { - serializedName: "nodeResourceGroup", - type: { - name: "String" - } - }, agentPoolProfiles: { serializedName: "agentPoolProfiles", type: { @@ -278,7 +70,14 @@ export const ProvisionedClustersCommonProperties: coreClient.CompositeMapper = { serializedName: "status", type: { name: "Composite", - className: "ProvisionedClustersCommonPropertiesStatus" + className: "ProvisionedClusterPropertiesStatus" + } + }, + licenseProfile: { + serializedName: "licenseProfile", + type: { + name: "Composite", + className: "ProvisionedClusterLicenseProfile" } } } @@ -290,12 +89,6 @@ export const LinuxProfileProperties: coreClient.CompositeMapper = { name: "Composite", className: "LinuxProfileProperties", modelProperties: { - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String" - } - }, ssh: { serializedName: "ssh", type: { @@ -343,78 +136,11 @@ export const LinuxProfilePropertiesSshPublicKeysItem: coreClient.CompositeMapper } }; -export const ProvisionedClustersCommonPropertiesFeatures: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersCommonPropertiesFeatures", - modelProperties: { - arcAgentProfile: { - serializedName: "arcAgentProfile", - type: { - name: "Composite", - className: "ArcAgentProfile" - } - } - } - } -}; - -export const ArcAgentProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ArcAgentProfile", - modelProperties: { - agentVersion: { - serializedName: "agentVersion", - type: { - name: "String" - } - }, - agentAutoUpgrade: { - defaultValue: "Enabled", - serializedName: "agentAutoUpgrade", - type: { - name: "String" - } - } - } - } -}; - -export const AddonProfiles: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddonProfiles", - modelProperties: { - config: { - serializedName: "config", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - } - } - } -}; - export const AgentPoolProfile: coreClient.CompositeMapper = { type: { name: "Composite", className: "AgentPoolProfile", modelProperties: { - count: { - defaultValue: 1, - serializedName: "count", - type: { - name: "Number" - } - }, availabilityZones: { serializedName: "availabilityZones", type: { @@ -426,136 +152,44 @@ export const AgentPoolProfile: coreClient.CompositeMapper = { } } }, - maxCount: { - serializedName: "maxCount", - type: { - name: "Number" - } - }, - maxPods: { - serializedName: "maxPods", - type: { - name: "Number" - } - }, - minCount: { - serializedName: "minCount", - type: { - name: "Number" - } - }, - mode: { - defaultValue: "User", - serializedName: "mode", - type: { - name: "String" - } - }, - nodeLabels: { - serializedName: "nodeLabels", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - nodeTaints: { - serializedName: "nodeTaints", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, osType: { - defaultValue: "Linux", serializedName: "osType", type: { name: "String" } }, - nodeImageVersion: { - serializedName: "nodeImageVersion", + osSKU: { + serializedName: "osSKU", type: { name: "String" } }, - vmSize: { - serializedName: "vmSize", + nodeImageVersion: { + serializedName: "nodeImageVersion", type: { name: "String" } - }, - cloudProviderProfile: { - serializedName: "cloudProviderProfile", - type: { - name: "Composite", - className: "CloudProviderProfile" - } } } } }; -export const CloudProviderProfile: coreClient.CompositeMapper = { +export const AgentPoolUpdateProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudProviderProfile", + className: "AgentPoolUpdateProfile", modelProperties: { - infraNetworkProfile: { - serializedName: "infraNetworkProfile", + count: { + defaultValue: 1, + serializedName: "count", type: { - name: "Composite", - className: "CloudProviderProfileInfraNetworkProfile" + name: "Number" } }, - infraStorageProfile: { - serializedName: "infraStorageProfile", - type: { - name: "Composite", - className: "CloudProviderProfileInfraStorageProfile" - } - } - } - } -}; - -export const CloudProviderProfileInfraNetworkProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudProviderProfileInfraNetworkProfile", - modelProperties: { - vnetSubnetIds: { - serializedName: "vnetSubnetIds", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CloudProviderProfileInfraStorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudProviderProfileInfraStorageProfile", - modelProperties: { - storageSpaceIds: { - serializedName: "storageSpaceIds", + vmSize: { + serializedName: "vmSize", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } @@ -607,7 +241,7 @@ export const ControlPlaneEndpointProfileControlPlaneEndpoint: coreClient.Composi port: { serializedName: "port", type: { - name: "String" + name: "Number" } } } @@ -639,20 +273,7 @@ export const NetworkProfile: coreClient.CompositeMapper = { serializedName: "loadBalancerProfile", type: { name: "Composite", - className: "LoadBalancerProfile" - } - }, - loadBalancerSku: { - defaultValue: "unmanaged", - serializedName: "loadBalancerSku", - type: { - name: "String" - } - }, - dnsServiceIP: { - serializedName: "dnsServiceIP", - type: { - name: "String" + className: "NetworkProfileLoadBalancerProfile" } }, networkPolicy: { @@ -665,103 +286,80 @@ export const NetworkProfile: coreClient.CompositeMapper = { podCidr: { serializedName: "podCidr", type: { - name: "String" - } - }, - podCidrs: { - serializedName: "podCidrs", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - serviceCidr: { - serializedName: "serviceCidr", - type: { - name: "String" - } - }, - serviceCidrs: { - serializedName: "serviceCidrs", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ProvisionedClustersCommonPropertiesStatus: coreClient.CompositeMapper = { +export const NetworkProfileLoadBalancerProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersCommonPropertiesStatus", + className: "NetworkProfileLoadBalancerProfile", modelProperties: { - featuresStatus: { - serializedName: "featuresStatus", - type: { - name: "Composite", - className: "ProvisionedClustersCommonPropertiesStatusFeaturesStatus" - } - }, - addonStatus: { - serializedName: "addonStatus", - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "AddonStatus" } } - } - }, - errorMessage: { - serializedName: "errorMessage", + count: { + defaultValue: 0, + serializedName: "count", type: { - name: "String" + name: "Number" } - }, - provisioningStatus: { - serializedName: "provisioningStatus", + } + } + } +}; + +export const CloudProviderProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudProviderProfile", + modelProperties: { + infraNetworkProfile: { + serializedName: "infraNetworkProfile", type: { name: "Composite", - className: - "ProvisionedClustersCommonPropertiesStatusProvisioningStatus" + className: "CloudProviderProfileInfraNetworkProfile" } } } } }; -export const ProvisionedClustersCommonPropertiesStatusFeaturesStatus: coreClient.CompositeMapper = { +export const CloudProviderProfileInfraNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersCommonPropertiesStatusFeaturesStatus", + className: "CloudProviderProfileInfraNetworkProfile", modelProperties: { - arcAgentStatus: { - serializedName: "arcAgentStatus", + vnetSubnetIds: { + serializedName: "vnetSubnetIds", type: { - name: "Composite", - className: "ArcAgentStatus" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ArcAgentStatus: coreClient.CompositeMapper = { +export const ProvisionedClusterPropertiesStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcAgentStatus", + className: "ProvisionedClusterPropertiesStatus", modelProperties: { - deploymentState: { - serializedName: "deploymentState", + controlPlaneStatus: { + serializedName: "controlPlaneStatus", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AddonStatusProfile" + } + } } }, errorMessage: { @@ -770,47 +368,24 @@ export const ArcAgentStatus: coreClient.CompositeMapper = { name: "String" } }, - onboardingPublicKey: { - serializedName: "onboardingPublicKey", - type: { - name: "String" - } - }, - agentVersion: { - serializedName: "agentVersion", - type: { - name: "String" - } - }, - coreCount: { - serializedName: "coreCount", - type: { - name: "Number" - } - }, - managedIdentityCertificateExpirationTime: { - serializedName: "managedIdentityCertificateExpirationTime", - type: { - name: "DateTime" - } - }, - lastConnectivityTime: { - serializedName: "lastConnectivityTime", + operationStatus: { + serializedName: "operationStatus", type: { - name: "DateTime" + name: "Composite", + className: "ProvisionedClusterPropertiesStatusOperationStatus" } } } } }; -export const AddonStatus: coreClient.CompositeMapper = { +export const AddonStatusProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AddonStatus", + className: "AddonStatusProfile", modelProperties: { - errorMessage: { - serializedName: "errorMessage", + name: { + serializedName: "name", type: { name: "String" } @@ -826,22 +401,27 @@ export const AddonStatus: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } } } } }; -export const ProvisionedClustersCommonPropertiesStatusProvisioningStatus: coreClient.CompositeMapper = { +export const ProvisionedClusterPropertiesStatusOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersCommonPropertiesStatusProvisioningStatus", + className: "ProvisionedClusterPropertiesStatusOperationStatus", modelProperties: { error: { serializedName: "error", type: { name: "Composite", - className: - "ProvisionedClustersCommonPropertiesStatusProvisioningStatusError" + className: "ProvisionedClusterPropertiesStatusOperationStatusError" } }, operationId: { @@ -850,12 +430,6 @@ export const ProvisionedClustersCommonPropertiesStatusProvisioningStatus: coreCl name: "String" } }, - phase: { - serializedName: "phase", - type: { - name: "String" - } - }, status: { serializedName: "status", type: { @@ -866,11 +440,10 @@ export const ProvisionedClustersCommonPropertiesStatusProvisioningStatus: coreCl } }; -export const ProvisionedClustersCommonPropertiesStatusProvisioningStatusError: coreClient.CompositeMapper = { +export const ProvisionedClusterPropertiesStatusOperationStatusError: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "ProvisionedClustersCommonPropertiesStatusProvisioningStatusError", + className: "ProvisionedClusterPropertiesStatusOperationStatusError", modelProperties: { code: { serializedName: "code", @@ -888,55 +461,26 @@ export const ProvisionedClustersCommonPropertiesStatusProvisioningStatusError: c } }; -export const SystemData: coreClient.CompositeMapper = { +export const ProvisionedClusterLicenseProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "ProvisionedClusterLicenseProfile", modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + azureHybridBenefit: { + defaultValue: "NotApplicable", + serializedName: "azureHybridBenefit", type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } } } } }; -export const ProvisionedClustersResponseExtendedLocation: coreClient.CompositeMapper = { +export const ExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersResponseExtendedLocation", + className: "ExtendedLocation", modelProperties: { type: { serializedName: "type", @@ -979,6 +523,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -1043,159 +639,47 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "additionalInfo", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const ProvisionedClustersPropertiesWithSecrets: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersPropertiesWithSecrets", - modelProperties: { - aadProfile: { - serializedName: "aadProfile", - type: { - name: "Composite", - className: "AADProfile" - } - }, - windowsProfile: { - serializedName: "windowsProfile", - type: { - name: "Composite", - className: "WindowsProfile" - } - }, - httpProxyConfig: { - serializedName: "httpProxyConfig", - type: { - name: "Composite", - className: "HttpProxyConfig" - } - } - } - } -}; - -export const AADProfileSecret: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AADProfileSecret", - modelProperties: { - serverAppSecret: { - serializedName: "serverAppSecret", - type: { - name: "String" - } - } - } - } -}; - -export const WindowsProfilePassword: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsProfilePassword", - modelProperties: { - adminPassword: { - serializedName: "adminPassword", - type: { - name: "String" - } - } - } - } -}; - -export const HttpProxyConfigPassword: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpProxyConfigPassword", - modelProperties: { - password: { - serializedName: "password", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const ProvisionedClustersExtendedLocation: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersExtendedLocation", + className: "ErrorAdditionalInfo", modelProperties: { type: { serializedName: "type", + readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ProvisionedClustersPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersPatch", - modelProperties: { - tags: { - serializedName: "tags", + info: { + serializedName: "info", + readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } + value: { type: { name: "any" } } } } } } }; -export const ProvisionedClustersResponseListResult: coreClient.CompositeMapper = { +export const ProvisionedClustersListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersResponseListResult", + className: "ProvisionedClustersListResult", modelProperties: { value: { serializedName: "value", @@ -1204,7 +688,7 @@ export const ProvisionedClustersResponseListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "ProvisionedClustersResponse" + className: "ProvisionedClusters" } } } @@ -1239,7 +723,6 @@ export const ProvisionedClusterPoolUpgradeProfile: coreClient.CompositeMapper = } }, osType: { - defaultValue: "Linux", serializedName: "osType", readOnly: true, type: { @@ -1363,14 +846,7 @@ export const AgentPool: coreClient.CompositeMapper = { serializedName: "extendedLocation", type: { name: "Composite", - className: "AgentPoolExtendedLocation" - } - }, - count: { - defaultValue: 1, - serializedName: "properties.count", - type: { - name: "Number" + className: "ExtendedLocation" } }, availabilityZones: { @@ -1384,52 +860,14 @@ export const AgentPool: coreClient.CompositeMapper = { } } }, - maxCount: { - serializedName: "properties.maxCount", - type: { - name: "Number" - } - }, - maxPods: { - serializedName: "properties.maxPods", - type: { - name: "Number" - } - }, - minCount: { - serializedName: "properties.minCount", - type: { - name: "Number" - } - }, - mode: { - defaultValue: "User", - serializedName: "properties.mode", + osType: { + serializedName: "properties.osType", type: { name: "String" } }, - nodeLabels: { - serializedName: "properties.nodeLabels", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - nodeTaints: { - serializedName: "properties.nodeTaints", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - osType: { - defaultValue: "Linux", - serializedName: "properties.osType", + osSKU: { + serializedName: "properties.osSKU", type: { name: "String" } @@ -1440,17 +878,17 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String" } }, - vmSize: { - serializedName: "properties.vmSize", + count: { + defaultValue: 1, + serializedName: "properties.count", type: { - name: "String" + name: "Number" } }, - cloudProviderProfile: { - serializedName: "properties.cloudProviderProfile", + vmSize: { + serializedName: "properties.vmSize", type: { - name: "Composite", - className: "CloudProviderProfile" + name: "String" } }, provisioningState: { @@ -1505,39 +943,39 @@ export const AgentPoolProvisioningStatusStatus: coreClient.CompositeMapper = { name: "String" } }, - provisioningStatus: { - serializedName: "provisioningStatus", + operationStatus: { + serializedName: "operationStatus", type: { name: "Composite", - className: "AgentPoolProvisioningStatusStatusProvisioningStatus" + className: "AgentPoolProvisioningStatusOperationStatus" } }, readyReplicas: { serializedName: "readyReplicas", type: { - name: "Number" - } - }, - replicas: { - serializedName: "replicas", - type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AgentPoolUpdateProfile" + } + } } } } } }; -export const AgentPoolProvisioningStatusStatusProvisioningStatus: coreClient.CompositeMapper = { +export const AgentPoolProvisioningStatusOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolProvisioningStatusStatusProvisioningStatus", + className: "AgentPoolProvisioningStatusOperationStatus", modelProperties: { error: { serializedName: "error", type: { name: "Composite", - className: "AgentPoolProvisioningStatusError" + className: "AgentPoolProvisioningStatusOperationStatusError" } }, operationId: { @@ -1546,12 +984,6 @@ export const AgentPoolProvisioningStatusStatusProvisioningStatus: coreClient.Com name: "String" } }, - phase: { - serializedName: "phase", - type: { - name: "String" - } - }, status: { serializedName: "status", type: { @@ -1562,10 +994,10 @@ export const AgentPoolProvisioningStatusStatusProvisioningStatus: coreClient.Com } }; -export const AgentPoolProvisioningStatusError: coreClient.CompositeMapper = { +export const AgentPoolProvisioningStatusOperationStatusError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolProvisioningStatusError", + className: "AgentPoolProvisioningStatusOperationStatusError", modelProperties: { code: { serializedName: "code", @@ -1583,21 +1015,16 @@ export const AgentPoolProvisioningStatusError: coreClient.CompositeMapper = { } }; -export const AgentPoolExtendedLocation: coreClient.CompositeMapper = { +export const AgentPoolPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolExtendedLocation", + className: "AgentPoolPatch", modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - name: { - serializedName: "name", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } @@ -1631,23 +1058,11 @@ export const AgentPoolListResult: coreClient.CompositeMapper = { } }; -export const OrchestratorVersionProfileListResult: coreClient.CompositeMapper = { +export const ListCredentialResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrchestratorVersionProfileListResult", + className: "ListCredentialResponse", modelProperties: { - orchestrators: { - serializedName: "orchestrators", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OrchestratorVersionProfile" - } - } - } - }, id: { serializedName: "id", readOnly: true, @@ -1662,58 +1077,73 @@ export const OrchestratorVersionProfileListResult: coreClient.CompositeMapper = name: "String" } }, - type: { - serializedName: "type", + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", readOnly: true, type: { name: "String" } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ListCredentialResponseError" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ListCredentialResponseProperties" + } } } } }; -export const OrchestratorVersionProfile: coreClient.CompositeMapper = { +export const ListCredentialResponseError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrchestratorVersionProfile", + className: "ListCredentialResponseError", modelProperties: { - isPreview: { - serializedName: "isPreview", - readOnly: true, - type: { - name: "Boolean" - } - }, - default: { - serializedName: "default", - readOnly: true, - type: { - name: "Boolean" - } - }, - orchestratorType: { - serializedName: "orchestratorType", - readOnly: true, + code: { + serializedName: "code", type: { name: "String" } }, - orchestratorVersion: { - serializedName: "orchestratorVersion", - readOnly: true, + message: { + serializedName: "message", type: { name: "String" } - }, - upgrades: { - serializedName: "upgrades", + } + } + } +}; + +export const ListCredentialResponseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListCredentialResponseProperties", + modelProperties: { + kubeconfigs: { + serializedName: "kubeconfigs", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OrchestratorProfile" + className: "CredentialResult" } } } @@ -1722,158 +1152,179 @@ export const OrchestratorVersionProfile: coreClient.CompositeMapper = { } }; -export const OrchestratorProfile: coreClient.CompositeMapper = { +export const CredentialResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrchestratorProfile", + className: "CredentialResult", modelProperties: { - isPreview: { - serializedName: "isPreview", - readOnly: true, - type: { - name: "Boolean" - } - }, - orchestratorType: { - serializedName: "orchestratorType", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, - orchestratorVersion: { - serializedName: "orchestratorVersion", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "ByteArray" } } } } }; -export const VMSkuListResult: coreClient.CompositeMapper = { +export const KubernetesVersionProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VMSkuListResult", + className: "KubernetesVersionProfileProperties", modelProperties: { - vmSKUs: { - serializedName: "vmSKUs", + provisioningState: { + serializedName: "provisioningState", readOnly: true, + type: { + name: "String" + } + }, + values: { + serializedName: "values", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "KubernetesVersionProperties" } } } - }, - id: { - serializedName: "id", + } + } + } +}; + +export const KubernetesVersionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesVersionProperties", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + capabilities: { + serializedName: "capabilities", + type: { + name: "Composite", + className: "KubernetesVersionCapabilities" + } + }, + isPreview: { + serializedName: "isPreview", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - type: { - serializedName: "type", + patchVersions: { + serializedName: "patchVersions", readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { + type: { name: "Composite", className: "KubernetesPatchVersions" } + } } } } } }; -export const ResourceProviderOperationList: coreClient.CompositeMapper = { +export const KubernetesVersionCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperationList", + className: "KubernetesVersionCapabilities", modelProperties: { - value: { - serializedName: "value", + supportPlan: { + serializedName: "supportPlan", type: { name: "Sequence", element: { + defaultValue: "KubernetesOfficial", + isConstant: true, type: { - name: "Composite", - className: "ResourceProviderOperation" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const ResourceProviderOperation: coreClient.CompositeMapper = { +export const KubernetesPatchVersions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperation", + className: "KubernetesPatchVersions", modelProperties: { - isDataAction: { - serializedName: "isDataAction", - type: { - name: "String" - } - }, - name: { - serializedName: "name", + readiness: { + serializedName: "readiness", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KubernetesVersionReadiness" + } + } } }, - display: { - serializedName: "display", + upgrades: { + serializedName: "upgrades", type: { - name: "Composite", - className: "ResourceProviderOperationDisplay" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { +export const KubernetesVersionReadiness: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperationDisplay", + className: "KubernetesVersionReadiness", modelProperties: { - provider: { - serializedName: "provider", + osType: { + serializedName: "osType", + readOnly: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + osSku: { + serializedName: "osSku", type: { name: "String" } }, - operation: { - serializedName: "operation", + ready: { + serializedName: "ready", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + errorMessage: { + serializedName: "errorMessage", + readOnly: true, type: { name: "String" } @@ -1882,95 +1333,103 @@ export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { } }; -export const StorageSpacesProperties: coreClient.CompositeMapper = { +export const KubernetesVersionProfileList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesProperties", + className: "KubernetesVersionProfileList", modelProperties: { - hciStorageProfile: { - serializedName: "hciStorageProfile", - type: { - name: "Composite", - className: "StorageSpacesPropertiesHciStorageProfile" - } - }, - vmwareStorageProfile: { - serializedName: "vmwareStorageProfile", + value: { + serializedName: "value", type: { - name: "Composite", - className: "StorageSpacesPropertiesVmwareStorageProfile" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KubernetesVersionProfile" + } + } } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - status: { - serializedName: "status", - type: { - name: "Composite", - className: "StorageSpacesPropertiesStatus" - } } } } }; -export const StorageSpacesPropertiesHciStorageProfile: coreClient.CompositeMapper = { +export const VmSkuProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesPropertiesHciStorageProfile", + className: "VmSkuProfileProperties", modelProperties: { - mocGroup: { - serializedName: "mocGroup", - type: { - name: "String" - } - }, - mocLocation: { - serializedName: "mocLocation", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { name: "String" } }, - mocStorageContainer: { - serializedName: "mocStorageContainer", + values: { + serializedName: "values", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmSkuProperties" + } + } } } } } }; -export const StorageSpacesPropertiesVmwareStorageProfile: coreClient.CompositeMapper = { +export const VmSkuProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesPropertiesVmwareStorageProfile", + className: "VmSkuProperties", modelProperties: { - datacenter: { - serializedName: "datacenter", + resourceType: { + serializedName: "resourceType", + readOnly: true, type: { name: "String" } }, - datastore: { - serializedName: "datastore", + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmSkuCapabilities" + } + } + } + }, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - folder: { - serializedName: "folder", + tier: { + serializedName: "tier", + readOnly: true, type: { name: "String" } }, - resourcePool: { - serializedName: "resourcePool", + size: { + serializedName: "size", + readOnly: true, type: { name: "String" } @@ -1979,48 +1438,48 @@ export const StorageSpacesPropertiesVmwareStorageProfile: coreClient.CompositeMa } }; -export const StorageSpacesPropertiesStatus: coreClient.CompositeMapper = { +export const VmSkuCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesPropertiesStatus", + className: "VmSkuCapabilities", modelProperties: { - provisioningStatus: { - serializedName: "provisioningStatus", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "StorageSpacesPropertiesStatusProvisioningStatus" + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" } } } } }; -export const StorageSpacesPropertiesStatusProvisioningStatus: coreClient.CompositeMapper = { +export const VmSkuProfileList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesPropertiesStatusProvisioningStatus", + className: "VmSkuProfileList", modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "StorageSpacesPropertiesStatusProvisioningStatusError" - } - }, - operationId: { - serializedName: "operationId", - type: { - name: "String" - } - }, - phase: { - serializedName: "phase", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmSkuProfile" + } + } } }, - status: { - serializedName: "status", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -2029,19 +1488,27 @@ export const StorageSpacesPropertiesStatusProvisioningStatus: coreClient.Composi } }; -export const StorageSpacesPropertiesStatusProvisioningStatusError: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesPropertiesStatusProvisioningStatusError", + className: "OperationListResult", modelProperties: { - code: { - serializedName: "code", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - message: { - serializedName: "message", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2050,62 +1517,79 @@ export const StorageSpacesPropertiesStatusProvisioningStatusError: coreClient.Co } }; -export const StorageSpacesExtendedLocation: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesExtendedLocation", + className: "Operation", modelProperties: { - type: { - serializedName: "type", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const StorageSpacesPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageSpacesPatch", - modelProperties: { - tags: { - serializedName: "tags", + }, + actionType: { + serializedName: "actionType", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const StorageSpacesListResult: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpacesListResult", + className: "OperationDisplay", modelProperties: { - value: { - serializedName: "value", + provider: { + serializedName: "provider", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageSpaces" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, type: { name: "String" } @@ -2114,16 +1598,16 @@ export const StorageSpacesListResult: coreClient.CompositeMapper = { } }; -export const VirtualNetworksProperties: coreClient.CompositeMapper = { +export const VirtualNetworkProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksProperties", + className: "VirtualNetworkProperties", modelProperties: { infraVnetProfile: { serializedName: "infraVnetProfile", type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfile" + className: "VirtualNetworkPropertiesInfraVnetProfile" } }, vipPool: { @@ -2133,7 +1617,7 @@ export const VirtualNetworksProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualNetworksPropertiesVipPoolItem" + className: "VirtualNetworkPropertiesVipPoolItem" } } } @@ -2145,14 +1629,13 @@ export const VirtualNetworksProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualNetworksPropertiesVmipPoolItem" + className: "VirtualNetworkPropertiesVmipPoolItem" } } } }, dhcpServers: { serializedName: "dhcpServers", - readOnly: true, type: { name: "Sequence", element: { @@ -2187,9 +1670,8 @@ export const VirtualNetworksProperties: coreClient.CompositeMapper = { }, vlanID: { serializedName: "vlanID", - readOnly: true, type: { - name: "String" + name: "Number" } }, provisioningState: { @@ -2203,47 +1685,40 @@ export const VirtualNetworksProperties: coreClient.CompositeMapper = { serializedName: "status", type: { name: "Composite", - className: "VirtualNetworksPropertiesStatus" + className: "VirtualNetworkPropertiesStatus" } } } } }; -export const VirtualNetworksPropertiesInfraVnetProfile: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesInfraVnetProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfile", + className: "VirtualNetworkPropertiesInfraVnetProfile", modelProperties: { hci: { serializedName: "hci", type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileHci" - } - }, - networkCloud: { - serializedName: "networkCloud", - type: { - name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileNetworkCloud" + className: "VirtualNetworkPropertiesInfraVnetProfileHci" } }, vmware: { serializedName: "vmware", type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileVmware" + className: "VirtualNetworkPropertiesInfraVnetProfileVmware" } } } } }; -export const VirtualNetworksPropertiesInfraVnetProfileHci: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesInfraVnetProfileHci: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileHci", + className: "VirtualNetworkPropertiesInfraVnetProfileHci", modelProperties: { mocGroup: { serializedName: "mocGroup", @@ -2267,25 +1742,10 @@ export const VirtualNetworksPropertiesInfraVnetProfileHci: coreClient.CompositeM } }; -export const VirtualNetworksPropertiesInfraVnetProfileNetworkCloud: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileNetworkCloud", - modelProperties: { - networkId: { - serializedName: "networkId", - type: { - name: "String" - } - } - } - } -}; - -export const VirtualNetworksPropertiesInfraVnetProfileVmware: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesInfraVnetProfileVmware: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesInfraVnetProfileVmware", + className: "VirtualNetworkPropertiesInfraVnetProfileVmware", modelProperties: { segmentName: { serializedName: "segmentName", @@ -2297,10 +1757,10 @@ export const VirtualNetworksPropertiesInfraVnetProfileVmware: coreClient.Composi } }; -export const VirtualNetworksPropertiesVipPoolItem: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesVipPoolItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesVipPoolItem", + className: "VirtualNetworkPropertiesVipPoolItem", modelProperties: { endIP: { serializedName: "endIP", @@ -2318,10 +1778,10 @@ export const VirtualNetworksPropertiesVipPoolItem: coreClient.CompositeMapper = } }; -export const VirtualNetworksPropertiesVmipPoolItem: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesVmipPoolItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesVmipPoolItem", + className: "VirtualNetworkPropertiesVmipPoolItem", modelProperties: { endIP: { serializedName: "endIP", @@ -2339,32 +1799,32 @@ export const VirtualNetworksPropertiesVmipPoolItem: coreClient.CompositeMapper = } }; -export const VirtualNetworksPropertiesStatus: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesStatus", + className: "VirtualNetworkPropertiesStatus", modelProperties: { - provisioningStatus: { - serializedName: "provisioningStatus", + operationStatus: { + serializedName: "operationStatus", type: { name: "Composite", - className: "VirtualNetworksPropertiesStatusProvisioningStatus" + className: "VirtualNetworkPropertiesStatusOperationStatus" } } } } }; -export const VirtualNetworksPropertiesStatusProvisioningStatus: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesStatusOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesStatusProvisioningStatus", + className: "VirtualNetworkPropertiesStatusOperationStatus", modelProperties: { error: { serializedName: "error", type: { name: "Composite", - className: "VirtualNetworksPropertiesStatusProvisioningStatusError" + className: "VirtualNetworkPropertiesStatusOperationStatusError" } }, operationId: { @@ -2389,10 +1849,10 @@ export const VirtualNetworksPropertiesStatusProvisioningStatus: coreClient.Compo } }; -export const VirtualNetworksPropertiesStatusProvisioningStatusError: coreClient.CompositeMapper = { +export const VirtualNetworkPropertiesStatusOperationStatusError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksPropertiesStatusProvisioningStatusError", + className: "VirtualNetworkPropertiesStatusOperationStatusError", modelProperties: { code: { serializedName: "code", @@ -2410,10 +1870,10 @@ export const VirtualNetworksPropertiesStatusProvisioningStatusError: coreClient. } }; -export const VirtualNetworksExtendedLocation: coreClient.CompositeMapper = { +export const VirtualNetworkExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksExtendedLocation", + className: "VirtualNetworkExtendedLocation", modelProperties: { type: { serializedName: "type", @@ -2459,72 +1919,17 @@ export const VirtualNetworksListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualNetworks" + className: "VirtualNetwork" } } } }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const ProvisionedClustersResponseProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersResponseProperties", - modelProperties: { - ...ProvisionedClustersPropertiesWithoutSecrets.type.modelProperties, - ...ProvisionedClustersCommonProperties.type.modelProperties - } - } -}; - -export const AADProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AADProfile", - modelProperties: { - ...AADProfileSecret.type.modelProperties, - ...AADProfileResponse.type.modelProperties - } - } -}; - -export const WindowsProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsProfile", - modelProperties: { - ...WindowsProfileResponse.type.modelProperties, - ...WindowsProfilePassword.type.modelProperties - } - } -}; - -export const HttpProxyConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpProxyConfig", - modelProperties: { - ...HttpProxyConfigResponse.type.modelProperties, - ...HttpProxyConfigPassword.type.modelProperties - } - } -}; - -export const ProvisionedClustersAllProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProvisionedClustersAllProperties", - modelProperties: { - ...ProvisionedClustersPropertiesWithSecrets.type.modelProperties, - ...ProvisionedClustersCommonProperties.type.modelProperties + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } } } }; @@ -2535,6 +1940,7 @@ export const NamedAgentPoolProfile: coreClient.CompositeMapper = { className: "NamedAgentPoolProfile", modelProperties: { ...AgentPoolProfile.type.modelProperties, + ...AgentPoolUpdateProfile.type.modelProperties, ...AgentPoolName.type.modelProperties } } @@ -2546,6 +1952,7 @@ export const AgentPoolProperties: coreClient.CompositeMapper = { className: "AgentPoolProperties", modelProperties: { ...AgentPoolProfile.type.modelProperties, + ...AgentPoolUpdateProfile.type.modelProperties, ...AgentPoolProvisioningStatus.type.modelProperties } } @@ -2563,13 +1970,12 @@ export const ControlPlaneProfile: coreClient.CompositeMapper = { } }; -export const LoadBalancerProfile: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LoadBalancerProfile", + className: "ProxyResource", modelProperties: { - ...NamedAgentPoolProfile.type.modelProperties, - ...LinuxProfile.type.modelProperties + ...Resource.type.modelProperties } } }; @@ -2598,226 +2004,310 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const ProvisionedClusters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "ProvisionedClusters", modelProperties: { - ...Resource.type.modelProperties + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ProvisionedClusterProperties" + } + }, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + } } } }; -export const ProvisionedClustersResponse: coreClient.CompositeMapper = { +export const ProvisionedClusterUpgradeProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClustersResponse", + className: "ProvisionedClusterUpgradeProfile", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "ProvisionedClusterIdentity" + name: "String" } }, - properties: { - serializedName: "properties", + controlPlaneProfile: { + serializedName: "properties.controlPlaneProfile", type: { name: "Composite", - className: "ProvisionedClustersResponseProperties" + className: "ProvisionedClusterPoolUpgradeProfile" } }, - systemData: { - serializedName: "systemData", + agentPoolProfiles: { + serializedName: "properties.agentPoolProfiles", + required: true, type: { - name: "Composite", - className: "SystemData" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisionedClusterPoolUpgradeProfile" + } + } + } + } + } + } +}; + +export const HybridIdentityMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadata", + modelProperties: { + ...ProxyResource.type.modelProperties, + resourceUid: { + serializedName: "properties.resourceUid", + type: { + name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + publicKey: { + serializedName: "properties.publicKey", type: { - name: "Composite", - className: "ProvisionedClustersResponseExtendedLocation" + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } } } } }; -export const ProvisionedClusters: coreClient.CompositeMapper = { +export const KubernetesVersionProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClusters", + className: "KubernetesVersionProfile", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + ...ProxyResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { name: "Composite", - className: "ProvisionedClusterIdentity" + className: "ExtendedLocation" } }, properties: { serializedName: "properties", type: { name: "Composite", - className: "ProvisionedClustersAllProperties" + className: "KubernetesVersionProfileProperties" } - }, - systemData: { - serializedName: "systemData", + } + } + } +}; + +export const VmSkuProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmSkuProfile", + modelProperties: { + ...ProxyResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { name: "Composite", - className: "SystemData" + className: "ExtendedLocation" } }, - extendedLocation: { - serializedName: "extendedLocation", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "ProvisionedClustersExtendedLocation" + className: "VmSkuProfileProperties" } } } } }; -export const StorageSpaces: coreClient.CompositeMapper = { +export const VirtualNetwork: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSpaces", + className: "VirtualNetwork", modelProperties: { ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "StorageSpacesProperties" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" + className: "VirtualNetworkProperties" } }, extendedLocation: { serializedName: "extendedLocation", type: { name: "Composite", - className: "StorageSpacesExtendedLocation" + className: "VirtualNetworkExtendedLocation" } } } } }; -export const VirtualNetworks: coreClient.CompositeMapper = { +export const ProvisionedClusterInstancesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworks", + className: "ProvisionedClusterInstancesDeleteHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VirtualNetworksProperties" - } - }, - systemData: { - serializedName: "systemData", + location: { + serializedName: "location", type: { - name: "Composite", - className: "SystemData" + name: "String" } - }, - extendedLocation: { - serializedName: "extendedLocation", + } + } + } +}; + +export const ProvisionedClusterInstancesListUserKubeconfigHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProvisionedClusterInstancesListUserKubeconfigHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "VirtualNetworksExtendedLocation" + name: "String" } } } } }; -export const ProvisionedClusterUpgradeProfile: coreClient.CompositeMapper = { +export const ProvisionedClusterInstancesListAdminKubeconfigHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProvisionedClusterUpgradeProfile", + className: "ProvisionedClusterInstancesListAdminKubeconfigHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + location: { + serializedName: "location", type: { name: "String" } - }, - controlPlaneProfile: { - serializedName: "properties.controlPlaneProfile", + } + } + } +}; + +export const HybridIdentityMetadataDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadataDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "ProvisionedClusterPoolUpgradeProfile" + name: "String" } - }, - agentPoolProfiles: { - serializedName: "properties.agentPoolProfiles", - required: true, + } + } + } +}; + +export const AgentPoolDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProvisionedClusterPoolUpgradeProfile" - } - } + name: "String" } } } } }; -export const HybridIdentityMetadata: coreClient.CompositeMapper = { +export const AgentPoolUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridIdentityMetadata", + className: "AgentPoolUpdateHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + location: { + serializedName: "location", type: { - name: "Composite", - className: "SystemData" + name: "String" } - }, - resourceUid: { - serializedName: "properties.resourceUid", + } + } + } +}; + +export const HybridContainerServiceClientDeleteKubernetesVersionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridContainerServiceClientDeleteKubernetesVersionsHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - publicKey: { - serializedName: "properties.publicKey", + } + } + } +}; + +export const HybridContainerServiceClientDeleteVMSkusHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridContainerServiceClientDeleteVMSkusHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - identity: { - serializedName: "properties.identity", + } + } + } +}; + +export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "ProvisionedClusterIdentity" + name: "String" } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + } + } + } +}; + +export const VirtualNetworksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/parameters.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/parameters.ts index d787a174ccba..bb361415ad9d 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/parameters.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/models/parameters.ts @@ -13,12 +13,12 @@ import { } from "@azure/core-client"; import { ProvisionedClusters as ProvisionedClustersMapper, - ProvisionedClustersPatch as ProvisionedClustersPatchMapper, HybridIdentityMetadata as HybridIdentityMetadataMapper, AgentPool as AgentPoolMapper, - StorageSpaces as StorageSpacesMapper, - StorageSpacesPatch as StorageSpacesPatchMapper, - VirtualNetworks as VirtualNetworksMapper, + AgentPoolPatch as AgentPoolPatchMapper, + KubernetesVersionProfile as KubernetesVersionProfileMapper, + VmSkuProfile as VmSkuProfileMapper, + VirtualNetwork as VirtualNetworkMapper, VirtualNetworksPatch as VirtualNetworksPatchMapper } from "../models/mappers"; @@ -46,57 +46,22 @@ export const $host: OperationURLParameter = { skipEncoding: true }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", +export const connectedClusterResourceUri: OperationURLParameter = { + parameterPath: "connectedClusterResourceUri", mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, - serializedName: "resourceGroupName", + serializedName: "connectedClusterResourceUri", required: true, type: { name: "String" } - } -}; - -export const resourceName: OperationURLParameter = { - parameterPath: "resourceName", - mapper: { - constraints: { - Pattern: new RegExp( - "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" - ), - MaxLength: 63, - MinLength: 1 - }, - serializedName: "resourceName", - required: true, - type: { - name: "String" - } - } + }, + skipEncoding: true }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-09-01-preview", + defaultValue: "2023-11-15-preview", isConstant: true, serializedName: "api-version", type: { @@ -117,16 +82,11 @@ export const contentType: OperationParameter = { } }; -export const provisionedClusters: OperationParameter = { - parameterPath: "provisionedClusters", +export const provisionedClusterInstance: OperationParameter = { + parameterPath: "provisionedClusterInstance", mapper: ProvisionedClustersMapper }; -export const provisionedClusters1: OperationParameter = { - parameterPath: "provisionedClusters", - mapper: ProvisionedClustersPatchMapper -}; - export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { @@ -144,25 +104,13 @@ export const body: OperationParameter = { mapper: HybridIdentityMetadataMapper }; -export const hybridIdentityMetadataResourceName: OperationURLParameter = { - parameterPath: "hybridIdentityMetadataResourceName", - mapper: { - constraints: { - MaxLength: 64, - MinLength: 3 - }, - serializedName: "hybridIdentityMetadataResourceName", - required: true, - type: { - name: "String" - } - } -}; - export const agentPoolName: OperationURLParameter = { parameterPath: "agentPoolName", mapper: { constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + ), MaxLength: 64, MinLength: 3 }, @@ -179,6 +127,11 @@ export const agentPool: OperationParameter = { mapper: AgentPoolMapper }; +export const agentPool1: OperationParameter = { + parameterPath: "agentPool", + mapper: AgentPoolPatchMapper +}; + export const customLocationResourceUri: OperationURLParameter = { parameterPath: "customLocationResourceUri", mapper: { @@ -191,14 +144,35 @@ export const customLocationResourceUri: OperationURLParameter = { skipEncoding: true }; -export const storageSpacesName: OperationURLParameter = { - parameterPath: "storageSpacesName", +export const kubernetesVersions: OperationParameter = { + parameterPath: "kubernetesVersions", + mapper: KubernetesVersionProfileMapper +}; + +export const skus: OperationParameter = { + parameterPath: "skus", + mapper: VmSkuProfileMapper +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "Uuid" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { constraints: { - MaxLength: 64, - MinLength: 3 + MaxLength: 90, + MinLength: 1 }, - serializedName: "storageSpacesName", + serializedName: "resourceGroupName", required: true, type: { name: "String" @@ -206,24 +180,17 @@ export const storageSpacesName: OperationURLParameter = { } }; -export const storageSpaces: OperationParameter = { - parameterPath: "storageSpaces", - mapper: StorageSpacesMapper -}; - -export const storageSpaces1: OperationParameter = { - parameterPath: "storageSpaces", - mapper: StorageSpacesPatchMapper -}; - -export const virtualNetworksName: OperationURLParameter = { - parameterPath: "virtualNetworksName", +export const virtualNetworkName: OperationURLParameter = { + parameterPath: "virtualNetworkName", mapper: { constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + ), MaxLength: 64, MinLength: 3 }, - serializedName: "virtualNetworksName", + serializedName: "virtualNetworkName", required: true, type: { name: "String" @@ -233,7 +200,7 @@ export const virtualNetworksName: OperationURLParameter = { export const virtualNetworks: OperationParameter = { parameterPath: "virtualNetworks", - mapper: VirtualNetworksMapper + mapper: VirtualNetworkMapper }; export const virtualNetworks1: OperationParameter = { diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/agentPoolOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/agentPoolOperations.ts index 4b1215c04cf0..85bf8b8e071c 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/agentPoolOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/agentPoolOperations.ts @@ -24,6 +24,8 @@ import { AgentPoolCreateOrUpdateOptionalParams, AgentPoolCreateOrUpdateResponse, AgentPoolDeleteOptionalParams, + AgentPoolDeleteResponse, + AgentPoolPatch, AgentPoolUpdateOptionalParams, AgentPoolUpdateResponse, AgentPoolListByProvisionedClusterOptionalParams, @@ -43,35 +45,33 @@ export class AgentPoolOperationsImpl implements AgentPoolOperations { } /** - * Gets the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Gets the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param options The options parameters. */ get( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, resourceName, agentPoolName, options }, + { connectedClusterResourceUri, agentPoolName, options }, getOperationSpec ); } /** - * Creates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Creates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param agentPool The agentPool resource definition * @param options The options parameters. */ async beginCreateOrUpdate( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams @@ -122,13 +122,7 @@ export class AgentPoolOperationsImpl implements AgentPoolOperations { const lro = createLroSpec({ sendOperationFn, - args: { - resourceGroupName, - resourceName, - agentPoolName, - agentPool, - options - }, + args: { connectedClusterResourceUri, agentPoolName, agentPool, options }, spec: createOrUpdateOperationSpec }); const poller = await createHttpPoller< @@ -144,23 +138,21 @@ export class AgentPoolOperationsImpl implements AgentPoolOperations { } /** - * Creates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Creates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param agentPool The agentPool resource definition * @param options The options parameters. */ async beginCreateOrUpdateAndWait( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( - resourceGroupName, - resourceName, + connectedClusterResourceUri, agentPoolName, agentPool, options @@ -169,58 +161,208 @@ export class AgentPoolOperationsImpl implements AgentPoolOperations { } /** - * Deletes the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Deletes the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param options The options parameters. */ - delete( - resourceGroupName: string, - resourceName: string, + async beginDelete( + connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, agentPoolName, options }, - deleteOperationSpec + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolDeleteResponse + > + > { + 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: { connectedClusterResourceUri, agentPoolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + AgentPoolDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster + * @param options The options parameters. + */ + async beginDeleteAndWait( + connectedClusterResourceUri: string, + agentPoolName: string, + options?: AgentPoolDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + connectedClusterResourceUri, + agentPoolName, + options ); + return poller.pollUntilDone(); } /** - * Updates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Updates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster - * @param agentPool The agentPool resource definition + * @param agentPool The agentPool resource patch definition * @param options The options parameters. */ - update( - resourceGroupName: string, - resourceName: string, + async beginUpdate( + connectedClusterResourceUri: string, agentPoolName: string, - agentPool: AgentPool, + agentPool: AgentPoolPatch, + options?: AgentPoolUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolUpdateResponse + > + > { + 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: { connectedClusterResourceUri, agentPoolName, agentPool, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AgentPoolUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster + * @param agentPool The agentPool resource patch definition + * @param options The options parameters. + */ + async beginUpdateAndWait( + connectedClusterResourceUri: string, + agentPoolName: string, + agentPool: AgentPoolPatch, options?: AgentPoolUpdateOptionalParams ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, agentPoolName, agentPool, options }, - updateOperationSpec + const poller = await this.beginUpdate( + connectedClusterResourceUri, + agentPoolName, + agentPool, + options ); + return poller.pollUntilDone(); } /** - * Gets the agent pools in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Gets the agent pools in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ listByProvisionedCluster( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: AgentPoolListByProvisionedClusterOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, + { connectedClusterResourceUri, options }, listByProvisionedClusterOperationSpec ); } @@ -230,7 +372,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/agentPools/{agentPoolName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}", httpMethod: "GET", responses: { 200: { @@ -243,9 +385,7 @@ const getOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, + Parameters.connectedClusterResourceUri, Parameters.agentPoolName ], headerParameters: [Parameters.accept], @@ -253,7 +393,7 @@ const getOperationSpec: coreClient.OperationSpec = { }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/agentPools/{agentPoolName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}", httpMethod: "PUT", responses: { 200: { @@ -276,9 +416,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, + Parameters.connectedClusterResourceUri, Parameters.agentPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -287,11 +425,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/agentPools/{agentPoolName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.AgentPoolDeleteHeaders + }, + 201: { + headersMapper: Mappers.AgentPoolDeleteHeaders + }, + 202: { + headersMapper: Mappers.AgentPoolDeleteHeaders + }, + 204: { + headersMapper: Mappers.AgentPoolDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -299,9 +447,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, + Parameters.connectedClusterResourceUri, Parameters.agentPoolName ], headerParameters: [Parameters.accept], @@ -309,26 +455,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/agentPools/{agentPoolName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.AgentPool }, + 201: { + bodyMapper: Mappers.AgentPool + }, 202: { bodyMapper: Mappers.AgentPool }, + 204: { + bodyMapper: Mappers.AgentPool + }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.agentPool, + requestBody: Parameters.agentPool1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, + Parameters.connectedClusterResourceUri, Parameters.agentPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -337,7 +487,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }; const listByProvisionedClusterOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/agentPools", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools", httpMethod: "GET", responses: { 200: { @@ -348,12 +498,7 @@ const listByProvisionedClusterOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridContainerService.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridContainerService.ts deleted file mode 100644 index 82cbc1193b1c..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridContainerService.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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 { HybridContainerService } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; -import { - HybridContainerServiceListOrchestratorsOptionalParams, - HybridContainerServiceListOrchestratorsResponse, - HybridContainerServiceListVMSkusOptionalParams, - HybridContainerServiceListVMSkusResponse -} from "../models"; - -/** Class containing HybridContainerService operations. */ -export class HybridContainerServiceImpl implements HybridContainerService { - private readonly client: HybridContainerServiceClient; - - /** - * Initialize a new instance of the class HybridContainerService class. - * @param client Reference to the service client - */ - constructor(client: HybridContainerServiceClient) { - this.client = client; - } - - /** - * Lists the available orchestrators in a custom location for HybridAKS - * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom - * location resource. - * @param options The options parameters. - */ - listOrchestrators( - customLocationResourceUri: string, - options?: HybridContainerServiceListOrchestratorsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { customLocationResourceUri, options }, - listOrchestratorsOperationSpec - ); - } - - /** - * Lists the available VM SKUs in a custom location for HybridAKS - * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom - * location resource. - * @param options The options parameters. - */ - listVMSkus( - customLocationResourceUri: string, - options?: HybridContainerServiceListVMSkusOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { customLocationResourceUri, options }, - listVMSkusOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOrchestratorsOperationSpec: coreClient.OperationSpec = { - path: - "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/orchestrators", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OrchestratorVersionProfileListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listVMSkusOperationSpec: coreClient.OperationSpec = { - path: - "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/vmSkus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VMSkuListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridIdentityMetadataOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridIdentityMetadataOperations.ts index 50e1b2e06c73..f971f8676aba 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridIdentityMetadataOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/hybridIdentityMetadataOperations.ts @@ -13,6 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { HybridIdentityMetadata, HybridIdentityMetadataListByClusterNextOptionalParams, @@ -23,6 +29,7 @@ import { HybridIdentityMetadataGetOptionalParams, HybridIdentityMetadataGetResponse, HybridIdentityMetadataDeleteOptionalParams, + HybridIdentityMetadataDeleteResponse, HybridIdentityMetadataListByClusterNextResponse } from "../models"; @@ -41,19 +48,17 @@ export class HybridIdentityMetadataOperationsImpl } /** - * Lists the hybrid identity metadata proxy resource in a cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ public listByCluster( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams ): PagedAsyncIterableIterator { const iter = this.listByClusterPagingAll( - resourceGroupName, - resourceName, + connectedClusterResourceUri, options ); return { @@ -68,8 +73,7 @@ export class HybridIdentityMetadataOperationsImpl throw new Error("maxPageSize is not supported by this operation."); } return this.listByClusterPagingPage( - resourceGroupName, - resourceName, + connectedClusterResourceUri, options, settings ); @@ -78,19 +82,14 @@ export class HybridIdentityMetadataOperationsImpl } private async *listByClusterPagingPage( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams, settings?: PageSettings ): AsyncIterableIterator { let result: HybridIdentityMetadataListByClusterResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByCluster( - resourceGroupName, - resourceName, - options - ); + result = await this._listByCluster(connectedClusterResourceUri, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -98,8 +97,7 @@ export class HybridIdentityMetadataOperationsImpl } while (continuationToken) { result = await this._listByClusterNext( - resourceGroupName, - resourceName, + connectedClusterResourceUri, continuationToken, options ); @@ -111,13 +109,11 @@ export class HybridIdentityMetadataOperationsImpl } private async *listByClusterPagingAll( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams ): AsyncIterableIterator { for await (const page of this.listByClusterPagingPage( - resourceGroupName, - resourceName, + connectedClusterResourceUri, options )) { yield* page; @@ -127,114 +123,153 @@ export class HybridIdentityMetadataOperationsImpl /** * Creates the hybrid identity metadata proxy resource that facilitates the managed identity * provisioning. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param body Defines the hybridIdentityMetadata. * @param options The options parameters. */ put( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + connectedClusterResourceUri: string, body: HybridIdentityMetadata, options?: HybridIdentityMetadataPutOptionalParams ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - body, - options - }, + { connectedClusterResourceUri, body, options }, putOperationSpec ); } /** * Get the hybrid identity metadata proxy resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ get( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - options - }, + { connectedClusterResourceUri, options }, getOperationSpec ); } /** * Deletes the hybrid identity metadata proxy resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ - delete( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + async beginDelete( + connectedClusterResourceUri: string, options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - hybridIdentityMetadataResourceName, - options - }, - deleteOperationSpec - ); + ): Promise< + SimplePollerLike< + OperationState, + HybridIdentityMetadataDeleteResponse + > + > { + 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: { connectedClusterResourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + HybridIdentityMetadataDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the hybrid identity metadata proxy resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + connectedClusterResourceUri: string, + options?: HybridIdentityMetadataDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(connectedClusterResourceUri, options); + return poller.pollUntilDone(); } /** - * Lists the hybrid identity metadata proxy resource in a cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ private _listByCluster( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, + { connectedClusterResourceUri, options }, listByClusterOperationSpec ); } /** * ListByClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param nextLink The nextLink from the previous successful call to the ListByCluster method. * @param options The options parameters. */ private _listByClusterNext( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, nextLink: string, options?: HybridIdentityMetadataListByClusterNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, resourceName, nextLink, options }, + { connectedClusterResourceUri, nextLink, options }, listByClusterNextOperationSpec ); } @@ -244,32 +279,29 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const putOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/hybridIdentityMetadata/{hybridIdentityMetadataResourceName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.HybridIdentityMetadata }, + 201: { + bodyMapper: Mappers.HybridIdentityMetadata + }, default: { bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.body, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.hybridIdentityMetadataResourceName - ], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/hybridIdentityMetadata/{hybridIdentityMetadataResourceName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default", httpMethod: "GET", responses: { 200: { @@ -280,41 +312,39 @@ const getOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.hybridIdentityMetadataResourceName - ], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], headerParameters: [Parameters.accept], serializer }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/hybridIdentityMetadata/{hybridIdentityMetadataResourceName}", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders + }, + 201: { + headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders + }, + 202: { + headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders + }, + 204: { + headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.hybridIdentityMetadataResourceName - ], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], headerParameters: [Parameters.accept], serializer }; const listByClusterOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/hybridIdentityMetadata", + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata", httpMethod: "GET", responses: { 200: { @@ -325,12 +355,7 @@ const listByClusterOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], headerParameters: [Parameters.accept], serializer }; @@ -347,9 +372,7 @@ const listByClusterNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, + Parameters.connectedClusterResourceUri, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/index.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/index.ts index 9794e3107fc2..f0f99bb3e9db 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/index.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./provisionedClustersOperations"; +export * from "./provisionedClusterInstances"; export * from "./hybridIdentityMetadataOperations"; export * from "./agentPoolOperations"; -export * from "./hybridContainerService"; +export * from "./kubernetesVersions"; +export * from "./vMSkus"; export * from "./operations"; -export * from "./storageSpacesOperations"; -export * from "./virtualNetworksOperations"; +export * from "./virtualNetworks"; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/kubernetesVersions.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/kubernetesVersions.ts new file mode 100644 index 000000000000..8a414edfa336 --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/kubernetesVersions.ts @@ -0,0 +1,179 @@ +/* + * 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 { KubernetesVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; +import { + KubernetesVersionProfile, + KubernetesVersionsListNextOptionalParams, + KubernetesVersionsListOptionalParams, + KubernetesVersionsListResponse, + KubernetesVersionsListNextResponse +} from "../models"; + +/// +/** Class containing KubernetesVersions operations. */ +export class KubernetesVersionsImpl implements KubernetesVersions { + private readonly client: HybridContainerServiceClient; + + /** + * Initialize a new instance of the class KubernetesVersions class. + * @param client Reference to the service client + */ + constructor(client: HybridContainerServiceClient) { + this.client = client; + } + + /** + * Lists the supported kubernetes versions from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + public list( + customLocationResourceUri: string, + options?: KubernetesVersionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(customLocationResourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + customLocationResourceUri, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + customLocationResourceUri: string, + options?: KubernetesVersionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: KubernetesVersionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(customLocationResourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + customLocationResourceUri, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + customLocationResourceUri: string, + options?: KubernetesVersionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + customLocationResourceUri, + options + )) { + yield* page; + } + } + + /** + * Lists the supported kubernetes versions from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + private _list( + customLocationResourceUri: string, + options?: KubernetesVersionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { customLocationResourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + customLocationResourceUri: string, + nextLink: string, + options?: KubernetesVersionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { customLocationResourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/kubernetesVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.KubernetesVersionProfileList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.KubernetesVersionProfileList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.customLocationResourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/operations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/operations.ts index b6bd8c6f086f..7263c0d93c82 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/operations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/operations.ts @@ -14,7 +14,7 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; import { - ResourceProviderOperation, + Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, @@ -37,7 +37,7 @@ export class OperationsImpl implements Operations { /** @param options The options parameters. */ public list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -58,7 +58,7 @@ export class OperationsImpl implements Operations { private async *listPagingPage( options?: OperationsListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -79,7 +79,7 @@ export class OperationsImpl implements Operations { private async *listPagingAll( options?: OperationsListOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; } @@ -115,7 +115,7 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceProviderOperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -131,7 +131,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceProviderOperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClusterInstances.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClusterInstances.ts new file mode 100644 index 000000000000..c59770f80653 --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClusterInstances.ts @@ -0,0 +1,728 @@ +/* + * 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 { ProvisionedClusterInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ProvisionedClusters, + ProvisionedClusterInstancesListNextOptionalParams, + ProvisionedClusterInstancesListOptionalParams, + ProvisionedClusterInstancesListResponse, + ProvisionedClusterInstancesGetOptionalParams, + ProvisionedClusterInstancesGetResponse, + ProvisionedClusterInstancesCreateOrUpdateOptionalParams, + ProvisionedClusterInstancesCreateOrUpdateResponse, + ProvisionedClusterInstancesDeleteOptionalParams, + ProvisionedClusterInstancesDeleteResponse, + ProvisionedClusterInstancesGetUpgradeProfileOptionalParams, + ProvisionedClusterInstancesGetUpgradeProfileResponse, + ProvisionedClusterInstancesListUserKubeconfigOptionalParams, + ProvisionedClusterInstancesListUserKubeconfigResponse, + ProvisionedClusterInstancesListAdminKubeconfigOptionalParams, + ProvisionedClusterInstancesListAdminKubeconfigResponse, + ProvisionedClusterInstancesListNextResponse +} from "../models"; + +/// +/** Class containing ProvisionedClusterInstances operations. */ +export class ProvisionedClusterInstancesImpl + implements ProvisionedClusterInstances { + private readonly client: HybridContainerServiceClient; + + /** + * Initialize a new instance of the class ProvisionedClusterInstances class. + * @param client Reference to the service client + */ + constructor(client: HybridContainerServiceClient) { + this.client = client; + } + + /** + * Gets the Hybrid AKS provisioned cluster instances associated with the connected cluster + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + public list( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(connectedClusterResourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + connectedClusterResourceUri, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProvisionedClusterInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(connectedClusterResourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + connectedClusterResourceUri, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + connectedClusterResourceUri, + options + )) { + yield* page; + } + } + + /** + * Gets the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + get( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { connectedClusterResourceUri, options }, + getOperationSpec + ); + } + + /** + * Creates the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param provisionedClusterInstance The provisionedClusterInstances resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + connectedClusterResourceUri: string, + provisionedClusterInstance: ProvisionedClusters, + options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesCreateOrUpdateResponse + > + > { + 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: { + connectedClusterResourceUri, + provisionedClusterInstance, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ProvisionedClusterInstancesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param provisionedClusterInstance The provisionedClusterInstances resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + connectedClusterResourceUri: string, + provisionedClusterInstance: ProvisionedClusters, + options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + connectedClusterResourceUri, + provisionedClusterInstance, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginDelete( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesDeleteResponse + > + > { + 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: { connectedClusterResourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + ProvisionedClusterInstancesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(connectedClusterResourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Gets the Hybrid AKS provisioned cluster instances associated with the connected cluster + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + private _list( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { connectedClusterResourceUri, options }, + listOperationSpec + ); + } + + /** + * Gets the upgrade profile of a provisioned cluster instance. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + getUpgradeProfile( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesGetUpgradeProfileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { connectedClusterResourceUri, options }, + getUpgradeProfileOperationSpec + ); + } + + /** + * Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginListUserKubeconfig( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesListUserKubeconfigResponse + > + > { + 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: { connectedClusterResourceUri, options }, + spec: listUserKubeconfigOperationSpec + }); + const poller = await createHttpPoller< + ProvisionedClusterInstancesListUserKubeconfigResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginListUserKubeconfigAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams + ): Promise { + const poller = await this.beginListUserKubeconfig( + connectedClusterResourceUri, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the admin credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginListAdminKubeconfig( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesListAdminKubeconfigResponse + > + > { + 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: { connectedClusterResourceUri, options }, + spec: listAdminKubeconfigOperationSpec + }); + const poller = await createHttpPoller< + ProvisionedClusterInstancesListAdminKubeconfigResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Lists the admin credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + async beginListAdminKubeconfigAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + ): Promise { + const poller = await this.beginListAdminKubeconfig( + connectedClusterResourceUri, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + connectedClusterResourceUri: string, + nextLink: string, + options?: ProvisionedClusterInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { connectedClusterResourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProvisionedClusters + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ProvisionedClusters + }, + 201: { + bodyMapper: Mappers.ProvisionedClusters + }, + 202: { + bodyMapper: Mappers.ProvisionedClusters + }, + 204: { + bodyMapper: Mappers.ProvisionedClusters + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.provisionedClusterInstance, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ProvisionedClusterInstancesDeleteHeaders + }, + 201: { + headersMapper: Mappers.ProvisionedClusterInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.ProvisionedClusterInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.ProvisionedClusterInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProvisionedClustersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const getUpgradeProfileOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/upgradeProfiles/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProvisionedClusterUpgradeProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listUserKubeconfigOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/listUserKubeconfig", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListCredentialResponse + }, + 201: { + bodyMapper: Mappers.ListCredentialResponse + }, + 202: { + bodyMapper: Mappers.ListCredentialResponse + }, + 204: { + bodyMapper: Mappers.ListCredentialResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listAdminKubeconfigOperationSpec: coreClient.OperationSpec = { + path: + "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/listAdminKubeconfig", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListCredentialResponse + }, + 201: { + bodyMapper: Mappers.ListCredentialResponse + }, + 202: { + bodyMapper: Mappers.ListCredentialResponse + }, + 204: { + bodyMapper: Mappers.ListCredentialResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProvisionedClustersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.connectedClusterResourceUri, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClustersOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClustersOperations.ts deleted file mode 100644 index cb4ae2ae5076..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/provisionedClustersOperations.ts +++ /dev/null @@ -1,804 +0,0 @@ -/* - * 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 { ProvisionedClustersOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - ProvisionedClustersResponse, - ProvisionedClustersListByResourceGroupNextOptionalParams, - ProvisionedClustersListByResourceGroupOptionalParams, - ProvisionedClustersListByResourceGroupResponse, - ProvisionedClustersListBySubscriptionNextOptionalParams, - ProvisionedClustersListBySubscriptionOptionalParams, - ProvisionedClustersListBySubscriptionResponse, - ProvisionedClustersGetOptionalParams, - ProvisionedClustersGetResponse, - ProvisionedClusters, - ProvisionedClustersCreateOrUpdateOptionalParams, - ProvisionedClustersCreateOrUpdateResponse, - ProvisionedClustersDeleteOptionalParams, - ProvisionedClustersPatch, - ProvisionedClustersUpdateOptionalParams, - ProvisionedClustersUpdateResponse, - ProvisionedClustersGetUpgradeProfileOptionalParams, - ProvisionedClustersGetUpgradeProfileResponse, - ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams, - ProvisionedClustersListByResourceGroupNextResponse, - ProvisionedClustersListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing ProvisionedClustersOperations operations. */ -export class ProvisionedClustersOperationsImpl - implements ProvisionedClustersOperations { - private readonly client: HybridContainerServiceClient; - - /** - * Initialize a new instance of the class ProvisionedClustersOperations class. - * @param client Reference to the service client - */ - constructor(client: HybridContainerServiceClient) { - this.client = client; - } - - /** - * Gets the Hybrid AKS provisioned cluster in a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ProvisionedClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ProvisionedClustersListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProvisionedClustersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ProvisionedClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Gets the Hybrid AKS provisioned cluster in a subscription - * @param options The options parameters. - */ - public listBySubscription( - options?: ProvisionedClustersListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: ProvisionedClustersListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProvisionedClustersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ProvisionedClustersListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - get( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, - getOperationSpec - ); - } - - /** - * Creates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource definition. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClusters, - options?: ProvisionedClustersCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ProvisionedClustersCreateOrUpdateResponse - > - > { - 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, resourceName, provisionedClusters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ProvisionedClustersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Creates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource definition. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClusters, - options?: ProvisionedClustersCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - resourceName, - provisionedClusters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, - deleteOperationSpec - ); - } - - /** - * Updates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource patch definition. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClustersPatch, - options?: ProvisionedClustersUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ProvisionedClustersUpdateResponse - > - > { - 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, resourceName, provisionedClusters, options }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - ProvisionedClustersUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Updates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource patch definition. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClustersPatch, - options?: ProvisionedClustersUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - resourceName, - provisionedClusters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Gets the Hybrid AKS provisioned cluster in a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ProvisionedClustersListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Gets the Hybrid AKS provisioned cluster in a subscription - * @param options The options parameters. - */ - private _listBySubscription( - options?: ProvisionedClustersListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Gets the upgrade profile of a provisioned cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - getUpgradeProfile( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersGetUpgradeProfileOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, - getUpgradeProfileOperationSpec - ); - } - - /** - * Upgrading the node image version of a cluster applies the newest OS and runtime updates to the - * nodes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - async beginUpgradeNodeImageVersionForEntireCluster( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams - ): 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, resourceName, options }, - spec: upgradeNodeImageVersionForEntireClusterOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Upgrading the node image version of a cluster applies the newest OS and runtime updates to the - * nodes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - async beginUpgradeNodeImageVersionForEntireClusterAndWait( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams - ): Promise { - const poller = await this.beginUpgradeNodeImageVersionForEntireCluster( - resourceGroupName, - resourceName, - options - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ProvisionedClustersListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ProvisionedClustersListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 201: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 202: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 204: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.provisionedClusters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 201: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 202: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - 204: { - bodyMapper: Mappers.ProvisionedClustersResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.provisionedClusters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponseListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.HybridContainerService/provisionedClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponseListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const getUpgradeProfileOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/upgradeProfiles/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClusterUpgradeProfile - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const upgradeNodeImageVersionForEntireClusterOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/provisionedClusters/{resourceName}/upgradeNodeImageVersionForEntireCluster", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponseListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProvisionedClustersResponseListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/storageSpacesOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/storageSpacesOperations.ts deleted file mode 100644 index 91220432b7ed..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/storageSpacesOperations.ts +++ /dev/null @@ -1,652 +0,0 @@ -/* - * 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 { StorageSpacesOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - StorageSpaces, - StorageSpacesListByResourceGroupNextOptionalParams, - StorageSpacesListByResourceGroupOptionalParams, - StorageSpacesListByResourceGroupResponse, - StorageSpacesListBySubscriptionNextOptionalParams, - StorageSpacesListBySubscriptionOptionalParams, - StorageSpacesListBySubscriptionResponse, - StorageSpacesRetrieveOptionalParams, - StorageSpacesRetrieveResponse, - StorageSpacesCreateOrUpdateOptionalParams, - StorageSpacesCreateOrUpdateResponse, - StorageSpacesDeleteOptionalParams, - StorageSpacesPatch, - StorageSpacesUpdateOptionalParams, - StorageSpacesUpdateResponse, - StorageSpacesListByResourceGroupNextResponse, - StorageSpacesListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing StorageSpacesOperations operations. */ -export class StorageSpacesOperationsImpl implements StorageSpacesOperations { - private readonly client: HybridContainerServiceClient; - - /** - * Initialize a new instance of the class StorageSpacesOperations class. - * @param client Reference to the service client - */ - constructor(client: HybridContainerServiceClient) { - this.client = client; - } - - /** - * List the Hybrid AKS storage object by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: StorageSpacesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: StorageSpacesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: StorageSpacesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: StorageSpacesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * List the Hybrid AKS storage object by subscription - * @param options The options parameters. - */ - public listBySubscription( - options?: StorageSpacesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: StorageSpacesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: StorageSpacesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: StorageSpacesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the Hybrid AKS storage space object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param options The options parameters. - */ - retrieve( - resourceGroupName: string, - storageSpacesName: string, - options?: StorageSpacesRetrieveOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, storageSpacesName, options }, - retrieveOperationSpec - ); - } - - /** - * Puts the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource definition. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpaces, - options?: StorageSpacesCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - StorageSpacesCreateOrUpdateResponse - > - > { - 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, storageSpacesName, storageSpaces, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - StorageSpacesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Puts the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource definition. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpaces, - options?: StorageSpacesCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - storageSpacesName, - storageSpaces, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - storageSpacesName: string, - options?: StorageSpacesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, storageSpacesName, options }, - deleteOperationSpec - ); - } - - /** - * Patches the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource patch definition. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpacesPatch, - options?: StorageSpacesUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - StorageSpacesUpdateResponse - > - > { - 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, storageSpacesName, storageSpaces, options }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - StorageSpacesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Patches the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource patch definition. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpacesPatch, - options?: StorageSpacesUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - storageSpacesName, - storageSpaces, - options - ); - return poller.pollUntilDone(); - } - - /** - * List the Hybrid AKS storage object by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: StorageSpacesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * List the Hybrid AKS storage object by subscription - * @param options The options parameters. - */ - private _listBySubscription( - options?: StorageSpacesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: StorageSpacesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: StorageSpacesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const retrieveOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces/{storageSpacesName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageSpaces - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSpacesName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces/{storageSpacesName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.StorageSpaces - }, - 201: { - bodyMapper: Mappers.StorageSpaces - }, - 202: { - bodyMapper: Mappers.StorageSpaces - }, - 204: { - bodyMapper: Mappers.StorageSpaces - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.storageSpaces, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSpacesName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces/{storageSpacesName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSpacesName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces/{storageSpacesName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.StorageSpaces - }, - 201: { - bodyMapper: Mappers.StorageSpaces - }, - 202: { - bodyMapper: Mappers.StorageSpaces - }, - 204: { - bodyMapper: Mappers.StorageSpaces - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.storageSpaces1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSpacesName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/storageSpaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageSpacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.HybridContainerService/storageSpaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageSpacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageSpacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageSpacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/vMSkus.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/vMSkus.ts new file mode 100644 index 000000000000..6ea36b7ca3d4 --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/vMSkus.ts @@ -0,0 +1,179 @@ +/* + * 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 { VMSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridContainerServiceClient } from "../hybridContainerServiceClient"; +import { + VmSkuProfile, + VMSkusListNextOptionalParams, + VMSkusListOptionalParams, + VMSkusListResponse, + VMSkusListNextResponse +} from "../models"; + +/// +/** Class containing VMSkus operations. */ +export class VMSkusImpl implements VMSkus { + private readonly client: HybridContainerServiceClient; + + /** + * Initialize a new instance of the class VMSkus class. + * @param client Reference to the service client + */ + constructor(client: HybridContainerServiceClient) { + this.client = client; + } + + /** + * Lists the supported VM SKUs from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + public list( + customLocationResourceUri: string, + options?: VMSkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(customLocationResourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + customLocationResourceUri, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + customLocationResourceUri: string, + options?: VMSkusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VMSkusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(customLocationResourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + customLocationResourceUri, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + customLocationResourceUri: string, + options?: VMSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + customLocationResourceUri, + options + )) { + yield* page; + } + } + + /** + * Lists the supported VM SKUs from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + private _list( + customLocationResourceUri: string, + options?: VMSkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { customLocationResourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + customLocationResourceUri: string, + nextLink: string, + options?: VMSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { customLocationResourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmSkuProfileList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.customLocationResourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmSkuProfileList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.customLocationResourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworksOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworks.ts similarity index 78% rename from sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworksOperations.ts rename to sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworks.ts index c2f0b1f573d5..783870e64c52 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworksOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operations/virtualNetworks.ts @@ -8,7 +8,7 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { VirtualNetworksOperations } from "../operationsInterfaces"; +import { VirtualNetworks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; @@ -20,7 +20,7 @@ import { } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { - VirtualNetworks, + VirtualNetwork, VirtualNetworksListByResourceGroupNextOptionalParams, VirtualNetworksListByResourceGroupOptionalParams, VirtualNetworksListByResourceGroupResponse, @@ -32,6 +32,7 @@ import { VirtualNetworksCreateOrUpdateOptionalParams, VirtualNetworksCreateOrUpdateResponse, VirtualNetworksDeleteOptionalParams, + VirtualNetworksDeleteResponse, VirtualNetworksPatch, VirtualNetworksUpdateOptionalParams, VirtualNetworksUpdateResponse, @@ -40,13 +41,12 @@ import { } from "../models"; /// -/** Class containing VirtualNetworksOperations operations. */ -export class VirtualNetworksOperationsImpl - implements VirtualNetworksOperations { +/** Class containing VirtualNetworks operations. */ +export class VirtualNetworksImpl implements VirtualNetworks { private readonly client: HybridContainerServiceClient; /** - * Initialize a new instance of the class VirtualNetworksOperations class. + * Initialize a new instance of the class VirtualNetworks class. * @param client Reference to the service client */ constructor(client: HybridContainerServiceClient) { @@ -61,7 +61,7 @@ export class VirtualNetworksOperationsImpl public listByResourceGroup( resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { @@ -87,7 +87,7 @@ export class VirtualNetworksOperationsImpl resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: VirtualNetworksListByResourceGroupResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -113,7 +113,7 @@ export class VirtualNetworksOperationsImpl private async *listByResourceGroupPagingAll( resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, options @@ -128,7 +128,7 @@ export class VirtualNetworksOperationsImpl */ public listBySubscription( options?: VirtualNetworksListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { next() { @@ -149,7 +149,7 @@ export class VirtualNetworksOperationsImpl private async *listBySubscriptionPagingPage( options?: VirtualNetworksListBySubscriptionOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: VirtualNetworksListBySubscriptionResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -170,7 +170,7 @@ export class VirtualNetworksOperationsImpl private async *listBySubscriptionPagingAll( options?: VirtualNetworksListBySubscriptionOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; } @@ -179,16 +179,16 @@ export class VirtualNetworksOperationsImpl /** * Gets the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param options The options parameters. */ retrieve( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, options?: VirtualNetworksRetrieveOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworksName, options }, + { resourceGroupName, virtualNetworkName, options }, retrieveOperationSpec ); } @@ -196,14 +196,14 @@ export class VirtualNetworksOperationsImpl /** * Puts the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource definition. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, - virtualNetworksName: string, - virtualNetworks: VirtualNetworks, + virtualNetworkName: string, + virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise< SimplePollerLike< @@ -252,12 +252,7 @@ export class VirtualNetworksOperationsImpl const lro = createLroSpec({ sendOperationFn, - args: { - resourceGroupName, - virtualNetworksName, - virtualNetworks, - options - }, + args: { resourceGroupName, virtualNetworkName, virtualNetworks, options }, spec: createOrUpdateOperationSpec }); const poller = await createHttpPoller< @@ -275,19 +270,19 @@ export class VirtualNetworksOperationsImpl /** * Puts the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource definition. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, - virtualNetworksName: string, - virtualNetworks: VirtualNetworks, + virtualNetworkName: string, + virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, - virtualNetworksName, + virtualNetworkName, virtualNetworks, options ); @@ -297,30 +292,104 @@ export class VirtualNetworksOperationsImpl /** * Deletes the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param options The options parameters. */ - delete( + async beginDelete( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualNetworksName, options }, - deleteOperationSpec + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksDeleteResponse + > + > { + 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, virtualNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the Hybrid AKS virtual network + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Parameter for the name of the virtual network + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + virtualNetworkName, + options ); + return poller.pollUntilDone(); } /** * Patches the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource patch definition. * @param options The options parameters. */ async beginUpdate( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams ): Promise< @@ -370,12 +439,7 @@ export class VirtualNetworksOperationsImpl const lro = createLroSpec({ sendOperationFn, - args: { - resourceGroupName, - virtualNetworksName, - virtualNetworks, - options - }, + args: { resourceGroupName, virtualNetworkName, virtualNetworks, options }, spec: updateOperationSpec }); const poller = await createHttpPoller< @@ -393,19 +457,19 @@ export class VirtualNetworksOperationsImpl /** * Patches the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource patch definition. * @param options The options parameters. */ async beginUpdateAndWait( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams ): Promise { const poller = await this.beginUpdate( resourceGroupName, - virtualNetworksName, + virtualNetworkName, virtualNetworks, options ); @@ -477,11 +541,11 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const retrieveOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworksName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworkName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, default: { bodyMapper: Mappers.ErrorResponse @@ -492,27 +556,27 @@ const retrieveOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.virtualNetworksName + Parameters.virtualNetworkName ], headerParameters: [Parameters.accept], serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworksName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworkName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 201: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 202: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 204: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, default: { bodyMapper: Mappers.ErrorResponse @@ -524,7 +588,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.virtualNetworksName + Parameters.virtualNetworkName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -532,11 +596,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworksName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworkName}", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -546,27 +620,27 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.virtualNetworksName + Parameters.virtualNetworkName ], headerParameters: [Parameters.accept], serializer }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworksName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridContainerService/virtualNetworks/{virtualNetworkName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 201: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 202: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, 204: { - bodyMapper: Mappers.VirtualNetworks + bodyMapper: Mappers.VirtualNetwork }, default: { bodyMapper: Mappers.ErrorResponse @@ -578,7 +652,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.virtualNetworksName + Parameters.virtualNetworkName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -635,9 +709,9 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.nextLink, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -655,8 +729,8 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/agentPoolOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/agentPoolOperations.ts index c152bf315388..cd8d7314a7b8 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/agentPoolOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/agentPoolOperations.ts @@ -14,6 +14,8 @@ import { AgentPoolCreateOrUpdateOptionalParams, AgentPoolCreateOrUpdateResponse, AgentPoolDeleteOptionalParams, + AgentPoolDeleteResponse, + AgentPoolPatch, AgentPoolUpdateOptionalParams, AgentPoolUpdateResponse, AgentPoolListByProvisionedClusterOptionalParams, @@ -23,29 +25,27 @@ import { /** Interface representing a AgentPoolOperations. */ export interface AgentPoolOperations { /** - * Gets the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Gets the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param options The options parameters. */ get( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolGetOptionalParams ): Promise; /** - * Creates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Creates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param agentPool The agentPool resource definition * @param options The options parameters. */ beginCreateOrUpdate( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams @@ -56,57 +56,89 @@ export interface AgentPoolOperations { > >; /** - * Creates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Creates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param agentPool The agentPool resource definition * @param options The options parameters. */ beginCreateOrUpdateAndWait( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, agentPoolName: string, agentPool: AgentPool, options?: AgentPoolCreateOrUpdateOptionalParams ): Promise; /** - * Deletes the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Deletes the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster * @param options The options parameters. */ - delete( - resourceGroupName: string, - resourceName: string, + beginDelete( + connectedClusterResourceUri: string, agentPoolName: string, options?: AgentPoolDeleteOptionalParams - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolDeleteResponse + > + >; /** - * Updates the agent pool in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Deletes the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster - * @param agentPool The agentPool resource definition * @param options The options parameters. */ - update( - resourceGroupName: string, - resourceName: string, + beginDeleteAndWait( + connectedClusterResourceUri: string, agentPoolName: string, - agentPool: AgentPool, + options?: AgentPoolDeleteOptionalParams + ): Promise; + /** + * Updates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster + * @param agentPool The agentPool resource patch definition + * @param options The options parameters. + */ + beginUpdate( + connectedClusterResourceUri: string, + agentPoolName: string, + agentPool: AgentPoolPatch, + options?: AgentPoolUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolUpdateResponse + > + >; + /** + * Updates the agent pool in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster + * @param agentPool The agentPool resource patch definition + * @param options The options parameters. + */ + beginUpdateAndWait( + connectedClusterResourceUri: string, + agentPoolName: string, + agentPool: AgentPoolPatch, options?: AgentPoolUpdateOptionalParams ): Promise; /** - * Gets the agent pools in the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Gets the agent pools in the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ listByProvisionedCluster( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: AgentPoolListByProvisionedClusterOptionalParams ): Promise; } diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridContainerService.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridContainerService.ts deleted file mode 100644 index 444fbf60bea0..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridContainerService.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { - HybridContainerServiceListOrchestratorsOptionalParams, - HybridContainerServiceListOrchestratorsResponse, - HybridContainerServiceListVMSkusOptionalParams, - HybridContainerServiceListVMSkusResponse -} from "../models"; - -/** Interface representing a HybridContainerService. */ -export interface HybridContainerService { - /** - * Lists the available orchestrators in a custom location for HybridAKS - * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom - * location resource. - * @param options The options parameters. - */ - listOrchestrators( - customLocationResourceUri: string, - options?: HybridContainerServiceListOrchestratorsOptionalParams - ): Promise; - /** - * Lists the available VM SKUs in a custom location for HybridAKS - * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom - * location resource. - * @param options The options parameters. - */ - listVMSkus( - customLocationResourceUri: string, - options?: HybridContainerServiceListVMSkusOptionalParams - ): Promise; -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridIdentityMetadataOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridIdentityMetadataOperations.ts index 6516b2745ed8..e233b878cc77 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridIdentityMetadataOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/hybridIdentityMetadataOperations.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { HybridIdentityMetadata, HybridIdentityMetadataListByClusterOptionalParams, @@ -14,66 +15,69 @@ import { HybridIdentityMetadataPutResponse, HybridIdentityMetadataGetOptionalParams, HybridIdentityMetadataGetResponse, - HybridIdentityMetadataDeleteOptionalParams + HybridIdentityMetadataDeleteOptionalParams, + HybridIdentityMetadataDeleteResponse } from "../models"; /// /** Interface representing a HybridIdentityMetadataOperations. */ export interface HybridIdentityMetadataOperations { /** - * Lists the hybrid identity metadata proxy resource in a cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster + * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ listByCluster( - resourceGroupName: string, - resourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataListByClusterOptionalParams ): PagedAsyncIterableIterator; /** * Creates the hybrid identity metadata proxy resource that facilitates the managed identity * provisioning. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param body Defines the hybridIdentityMetadata. * @param options The options parameters. */ put( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + connectedClusterResourceUri: string, body: HybridIdentityMetadata, options?: HybridIdentityMetadataPutOptionalParams ): Promise; /** * Get the hybrid identity metadata proxy resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ get( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + connectedClusterResourceUri: string, options?: HybridIdentityMetadataGetOptionalParams ): Promise; /** * Deletes the hybrid identity metadata proxy resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata - * resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. * @param options The options parameters. */ - delete( - resourceGroupName: string, - resourceName: string, - hybridIdentityMetadataResourceName: string, + beginDelete( + connectedClusterResourceUri: string, options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + HybridIdentityMetadataDeleteResponse + > + >; + /** + * Deletes the hybrid identity metadata proxy resource. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + connectedClusterResourceUri: string, + options?: HybridIdentityMetadataDeleteOptionalParams + ): Promise; } diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/index.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/index.ts index 9794e3107fc2..f0f99bb3e9db 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/index.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./provisionedClustersOperations"; +export * from "./provisionedClusterInstances"; export * from "./hybridIdentityMetadataOperations"; export * from "./agentPoolOperations"; -export * from "./hybridContainerService"; +export * from "./kubernetesVersions"; +export * from "./vMSkus"; export * from "./operations"; -export * from "./storageSpacesOperations"; -export * from "./virtualNetworksOperations"; +export * from "./virtualNetworks"; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/kubernetesVersions.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/kubernetesVersions.ts new file mode 100644 index 000000000000..bc740c87dfe3 --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/kubernetesVersions.ts @@ -0,0 +1,28 @@ +/* + * 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 { + KubernetesVersionProfile, + KubernetesVersionsListOptionalParams +} from "../models"; + +/// +/** Interface representing a KubernetesVersions. */ +export interface KubernetesVersions { + /** + * Lists the supported kubernetes versions from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + list( + customLocationResourceUri: string, + options?: KubernetesVersionsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/operations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/operations.ts index 2a94a26532c7..f700b7a04c57 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/operations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/operations.ts @@ -7,10 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ResourceProviderOperation, - OperationsListOptionalParams -} from "../models"; +import { Operation, OperationsListOptionalParams } from "../models"; /// /** Interface representing a Operations. */ @@ -18,5 +15,5 @@ export interface Operations { /** @param options The options parameters. */ list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; } diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClusterInstances.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClusterInstances.ts new file mode 100644 index 000000000000..4837cb33e82e --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClusterInstances.ts @@ -0,0 +1,165 @@ +/* + * 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 { + ProvisionedClusters, + ProvisionedClusterInstancesListOptionalParams, + ProvisionedClusterInstancesGetOptionalParams, + ProvisionedClusterInstancesGetResponse, + ProvisionedClusterInstancesCreateOrUpdateOptionalParams, + ProvisionedClusterInstancesCreateOrUpdateResponse, + ProvisionedClusterInstancesDeleteOptionalParams, + ProvisionedClusterInstancesDeleteResponse, + ProvisionedClusterInstancesGetUpgradeProfileOptionalParams, + ProvisionedClusterInstancesGetUpgradeProfileResponse, + ProvisionedClusterInstancesListUserKubeconfigOptionalParams, + ProvisionedClusterInstancesListUserKubeconfigResponse, + ProvisionedClusterInstancesListAdminKubeconfigOptionalParams, + ProvisionedClusterInstancesListAdminKubeconfigResponse +} from "../models"; + +/// +/** Interface representing a ProvisionedClusterInstances. */ +export interface ProvisionedClusterInstances { + /** + * Gets the Hybrid AKS provisioned cluster instances associated with the connected cluster + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + list( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + get( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesGetOptionalParams + ): Promise; + /** + * Creates the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param provisionedClusterInstance The provisionedClusterInstances resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + connectedClusterResourceUri: string, + provisionedClusterInstance: ProvisionedClusters, + options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesCreateOrUpdateResponse + > + >; + /** + * Creates the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param provisionedClusterInstance The provisionedClusterInstances resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + connectedClusterResourceUri: string, + provisionedClusterInstance: ProvisionedClusters, + options?: ProvisionedClusterInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginDelete( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesDeleteResponse + > + >; + /** + * Deletes the Hybrid AKS provisioned cluster instance + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesDeleteOptionalParams + ): Promise; + /** + * Gets the upgrade profile of a provisioned cluster instance. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + getUpgradeProfile( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesGetUpgradeProfileOptionalParams + ): Promise; + /** + * Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginListUserKubeconfig( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesListUserKubeconfigResponse + > + >; + /** + * Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginListUserKubeconfigAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListUserKubeconfigOptionalParams + ): Promise; + /** + * Lists the admin credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginListAdminKubeconfig( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProvisionedClusterInstancesListAdminKubeconfigResponse + > + >; + /** + * Lists the admin credentials of a provisioned cluster instance used only in direct mode. + * @param connectedClusterResourceUri The fully qualified Azure Resource manager identifier of the + * connected cluster resource. + * @param options The options parameters. + */ + beginListAdminKubeconfigAndWait( + connectedClusterResourceUri: string, + options?: ProvisionedClusterInstancesListAdminKubeconfigOptionalParams + ): Promise; +} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClustersOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClustersOperations.ts deleted file mode 100644 index 9a2d472fb43c..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/provisionedClustersOperations.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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 { - ProvisionedClustersResponse, - ProvisionedClustersListByResourceGroupOptionalParams, - ProvisionedClustersListBySubscriptionOptionalParams, - ProvisionedClustersGetOptionalParams, - ProvisionedClustersGetResponse, - ProvisionedClusters, - ProvisionedClustersCreateOrUpdateOptionalParams, - ProvisionedClustersCreateOrUpdateResponse, - ProvisionedClustersDeleteOptionalParams, - ProvisionedClustersPatch, - ProvisionedClustersUpdateOptionalParams, - ProvisionedClustersUpdateResponse, - ProvisionedClustersGetUpgradeProfileOptionalParams, - ProvisionedClustersGetUpgradeProfileResponse, - ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams -} from "../models"; - -/// -/** Interface representing a ProvisionedClustersOperations. */ -export interface ProvisionedClustersOperations { - /** - * Gets the Hybrid AKS provisioned cluster in a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ProvisionedClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the Hybrid AKS provisioned cluster in a subscription - * @param options The options parameters. - */ - listBySubscription( - options?: ProvisionedClustersListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - get( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersGetOptionalParams - ): Promise; - /** - * Creates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource definition. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClusters, - options?: ProvisionedClustersCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ProvisionedClustersCreateOrUpdateResponse - > - >; - /** - * Creates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource definition. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClusters, - options?: ProvisionedClustersCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersDeleteOptionalParams - ): Promise; - /** - * Updates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource patch definition. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClustersPatch, - options?: ProvisionedClustersUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ProvisionedClustersUpdateResponse - > - >; - /** - * Updates the Hybrid AKS provisioned cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param provisionedClusters The provisionedClusters resource patch definition. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - resourceName: string, - provisionedClusters: ProvisionedClustersPatch, - options?: ProvisionedClustersUpdateOptionalParams - ): Promise; - /** - * Gets the upgrade profile of a provisioned cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - getUpgradeProfile( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersGetUpgradeProfileOptionalParams - ): Promise; - /** - * Upgrading the node image version of a cluster applies the newest OS and runtime updates to the - * nodes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - beginUpgradeNodeImageVersionForEntireCluster( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams - ): Promise, void>>; - /** - * Upgrading the node image version of a cluster applies the newest OS and runtime updates to the - * nodes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Parameter for the name of the provisioned cluster - * @param options The options parameters. - */ - beginUpgradeNodeImageVersionForEntireClusterAndWait( - resourceGroupName: string, - resourceName: string, - options?: ProvisionedClustersUpgradeNodeImageVersionForEntireClusterOptionalParams - ): Promise; -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/storageSpacesOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/storageSpacesOperations.ts deleted file mode 100644 index 6ed95e62ba93..000000000000 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/storageSpacesOperations.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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 { - StorageSpaces, - StorageSpacesListByResourceGroupOptionalParams, - StorageSpacesListBySubscriptionOptionalParams, - StorageSpacesRetrieveOptionalParams, - StorageSpacesRetrieveResponse, - StorageSpacesCreateOrUpdateOptionalParams, - StorageSpacesCreateOrUpdateResponse, - StorageSpacesDeleteOptionalParams, - StorageSpacesPatch, - StorageSpacesUpdateOptionalParams, - StorageSpacesUpdateResponse -} from "../models"; - -/// -/** Interface representing a StorageSpacesOperations. */ -export interface StorageSpacesOperations { - /** - * List the Hybrid AKS storage object by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: StorageSpacesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * List the Hybrid AKS storage object by subscription - * @param options The options parameters. - */ - listBySubscription( - options?: StorageSpacesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the Hybrid AKS storage space object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param options The options parameters. - */ - retrieve( - resourceGroupName: string, - storageSpacesName: string, - options?: StorageSpacesRetrieveOptionalParams - ): Promise; - /** - * Puts the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource definition. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpaces, - options?: StorageSpacesCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - StorageSpacesCreateOrUpdateResponse - > - >; - /** - * Puts the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource definition. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpaces, - options?: StorageSpacesCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - storageSpacesName: string, - options?: StorageSpacesDeleteOptionalParams - ): Promise; - /** - * Patches the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource patch definition. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpacesPatch, - options?: StorageSpacesUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - StorageSpacesUpdateResponse - > - >; - /** - * Patches the Hybrid AKS storage object - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSpacesName Parameter for the name of the storage object - * @param storageSpaces The storageSpaces resource patch definition. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - storageSpacesName: string, - storageSpaces: StorageSpacesPatch, - options?: StorageSpacesUpdateOptionalParams - ): Promise; -} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/vMSkus.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/vMSkus.ts new file mode 100644 index 000000000000..4c8dbe44e55d --- /dev/null +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/vMSkus.ts @@ -0,0 +1,25 @@ +/* + * 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 { VmSkuProfile, VMSkusListOptionalParams } from "../models"; + +/// +/** Interface representing a VMSkus. */ +export interface VMSkus { + /** + * Lists the supported VM SKUs from the underlying custom location + * @param customLocationResourceUri The fully qualified Azure Resource manager identifier of the custom + * location resource. + * @param options The options parameters. + */ + list( + customLocationResourceUri: string, + options?: VMSkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworksOperations.ts b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworks.ts similarity index 71% rename from sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworksOperations.ts rename to sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworks.ts index c2da5e27a95e..1b1762073c31 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworksOperations.ts +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/src/operationsInterfaces/virtualNetworks.ts @@ -9,7 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - VirtualNetworks, + VirtualNetwork, VirtualNetworksListByResourceGroupOptionalParams, VirtualNetworksListBySubscriptionOptionalParams, VirtualNetworksRetrieveOptionalParams, @@ -17,14 +17,15 @@ import { VirtualNetworksCreateOrUpdateOptionalParams, VirtualNetworksCreateOrUpdateResponse, VirtualNetworksDeleteOptionalParams, + VirtualNetworksDeleteResponse, VirtualNetworksPatch, VirtualNetworksUpdateOptionalParams, VirtualNetworksUpdateResponse } from "../models"; /// -/** Interface representing a VirtualNetworksOperations. */ -export interface VirtualNetworksOperations { +/** Interface representing a VirtualNetworks. */ +export interface VirtualNetworks { /** * Lists the Hybrid AKS virtual networks by resource group * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -33,36 +34,36 @@ export interface VirtualNetworksOperations { listByResourceGroup( resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; /** * Lists the Hybrid AKS virtual networks by subscription * @param options The options parameters. */ listBySubscription( options?: VirtualNetworksListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; /** * Gets the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param options The options parameters. */ retrieve( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, options?: VirtualNetworksRetrieveOptionalParams ): Promise; /** * Puts the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource definition. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, - virtualNetworksName: string, - virtualNetworks: VirtualNetworks, + virtualNetworkName: string, + virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise< SimplePollerLike< @@ -73,37 +74,53 @@ export interface VirtualNetworksOperations { /** * Puts the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource definition. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, - virtualNetworksName: string, - virtualNetworks: VirtualNetworks, + virtualNetworkName: string, + virtualNetworks: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise; /** * Deletes the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param options The options parameters. */ - delete( + beginDelete( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksDeleteResponse + > + >; + /** + * Deletes the Hybrid AKS virtual network + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Parameter for the name of the virtual network + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): Promise; /** * Patches the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource patch definition. * @param options The options parameters. */ beginUpdate( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams ): Promise< @@ -115,13 +132,13 @@ export interface VirtualNetworksOperations { /** * Patches the Hybrid AKS virtual network * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworksName Parameter for the name of the virtual network + * @param virtualNetworkName Parameter for the name of the virtual network * @param virtualNetworks The virtualNetworks resource patch definition. * @param options The options parameters. */ beginUpdateAndWait( resourceGroupName: string, - virtualNetworksName: string, + virtualNetworkName: string, virtualNetworks: VirtualNetworksPatch, options?: VirtualNetworksUpdateOptionalParams ): Promise; diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/tsconfig.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/tsconfig.json index 4db387467821..3e6ae96443f3 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/tsconfig.json +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hybridcontainerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"