From ddad23e69d6b688c4212a834dafc6360d6c180ea Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:18:09 +0800 Subject: [PATCH] [mgmt] containerservice release (#30390) https://github.com/Azure/sdk-release-request/issues/5290 --- common/config/rush/pnpm-lock.yaml | 7 +- .../arm-containerservice/CHANGELOG.md | 306 ++- .../arm-containerservice/README.md | 2 +- .../arm-containerservice/_meta.json | 8 +- .../arm-containerservice/assets.json | 2 +- .../arm-containerservice/package.json | 12 +- .../review/arm-containerservice.api.md | 806 +++++- .../agentPoolsAbortLatestOperationSample.ts | 6 +- .../agentPoolsCreateOrUpdateSample.ts | 264 +- .../agentPoolsDeleteMachinesSample.ts | 55 + .../samples-dev/agentPoolsDeleteSample.ts | 27 +- ...oolsGetAvailableAgentPoolVersionsSample.ts | 2 +- .../samples-dev/agentPoolsGetSample.ts | 2 +- .../agentPoolsGetUpgradeProfileSample.ts | 2 +- .../samples-dev/agentPoolsListSample.ts | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.ts | 2 +- .../loadBalancersCreateOrUpdateSample.ts | 45 + .../samples-dev/loadBalancersDeleteSample.ts | 45 + .../loadBalancersGetSample.ts} | 16 +- ...loadBalancersListByManagedClusterSample.ts | 46 + .../samples-dev/machinesGetSample.ts | 47 + .../samples-dev/machinesListSample.ts | 48 + ...nanceConfigurationsCreateOrUpdateSample.ts | 4 +- .../maintenanceConfigurationsDeleteSample.ts | 4 +- .../maintenanceConfigurationsGetSample.ts | 4 +- ...onfigurationsListByManagedClusterSample.ts | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.ts | 55 + .../managedClusterSnapshotsDeleteSample.ts | 43 + .../managedClusterSnapshotsGetSample.ts | 43 + ...usterSnapshotsListByResourceGroupSample.ts | 44 + .../managedClusterSnapshotsListSample.ts | 40 + ...managedClusterSnapshotsUpdateTagsSample.ts | 48 + ...nagedClustersAbortLatestOperationSample.ts | 6 +- .../managedClustersCreateOrUpdateSample.ts | 842 ++++-- .../managedClustersDeleteSample.ts | 2 +- .../managedClustersGetAccessProfileSample.ts | 2 +- .../managedClustersGetCommandResultSample.ts | 4 +- ...agedClustersGetGuardrailsVersionsSample.ts | 42 + ...gedClustersGetMeshRevisionProfileSample.ts | 2 +- ...agedClustersGetMeshUpgradeProfileSample.ts | 2 +- .../managedClustersGetOSOptionsSample.ts | 2 +- ...agedClustersGetSafeguardsVersionsSample.ts | 42 + .../samples-dev/managedClustersGetSample.ts | 2 +- .../managedClustersGetUpgradeProfileSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...ustersListClusterAdminCredentialsSample.ts | 2 +- ...tClusterMonitoringUserCredentialsSample.ts | 2 +- ...lustersListClusterUserCredentialsSample.ts | 2 +- ...gedClustersListGuardrailsVersionsSample.ts | 43 + ...gedClustersListKubernetesVersionsSample.ts | 2 +- ...dClustersListMeshRevisionProfilesSample.ts | 2 +- ...edClustersListMeshUpgradeProfilesSample.ts | 2 +- ...boundNetworkDependenciesEndpointsSample.ts | 2 +- ...gedClustersListSafeguardsVersionsSample.ts | 43 + .../samples-dev/managedClustersListSample.ts | 2 +- ...gedClustersRebalanceLoadBalancersSample.ts | 51 + .../managedClustersResetAadProfileSample.ts | 2 +- ...stersResetServicePrincipalProfileSample.ts | 2 +- ...ClustersRotateClusterCertificatesSample.ts | 2 +- ...rsRotateServiceAccountSigningKeysSample.ts | 2 +- .../managedClustersRunCommandSample.ts | 2 +- .../samples-dev/managedClustersStartSample.ts | 2 +- .../samples-dev/managedClustersStopSample.ts | 2 +- .../managedClustersUpdateTagsSample.ts | 2 +- ...erationStatusResultGetByAgentPoolSample.ts | 47 + .../operationStatusResultGetSample.ts | 45 + .../operationStatusResultListSample.ts | 46 + .../samples-dev/operationsListSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- .../privateEndpointConnectionsListSample.ts | 2 +- .../privateEndpointConnectionsUpdateSample.ts | 2 +- .../privateLinkResourcesListSample.ts | 2 +- .../resolvePrivateLinkServiceIdPostSample.ts | 2 +- .../snapshotsCreateOrUpdateSample.ts | 2 +- .../samples-dev/snapshotsDeleteSample.ts | 2 +- .../samples-dev/snapshotsGetSample.ts | 2 +- .../snapshotsListByResourceGroupSample.ts | 2 +- .../samples-dev/snapshotsListSample.ts | 2 +- .../samples-dev/snapshotsUpdateTagsSample.ts | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.ts | 2 +- .../trustedAccessRoleBindingsDeleteSample.ts | 2 +- .../trustedAccessRoleBindingsGetSample.ts | 2 +- .../trustedAccessRoleBindingsListSample.ts | 2 +- .../trustedAccessRolesListSample.ts | 2 +- .../{v20 => v20-beta}/javascript/README.md | 276 +- .../agentPoolsAbortLatestOperationSample.js | 6 +- .../agentPoolsCreateOrUpdateSample.js | 252 +- .../agentPoolsDeleteMachinesSample.js | 45 + .../javascript/agentPoolsDeleteSample.js | 64 + ...oolsGetAvailableAgentPoolVersionsSample.js | 2 +- .../javascript/agentPoolsGetSample.js | 2 +- .../agentPoolsGetUpgradeProfileSample.js | 2 +- .../javascript/agentPoolsListSample.js | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.js | 2 +- .../loadBalancersCreateOrUpdateSample.js | 41 + .../javascript/loadBalancersDeleteSample.js | 41 + .../javascript/loadBalancersGetSample.js | 37 + ...loadBalancersListByManagedClusterSample.js | 42 + .../javascript/machinesGetSample.js} | 14 +- .../v20-beta/javascript/machinesListSample.js | 40 + ...nanceConfigurationsCreateOrUpdateSample.js | 4 +- .../maintenanceConfigurationsDeleteSample.js | 4 +- .../maintenanceConfigurationsGetSample.js | 4 +- ...onfigurationsListByManagedClusterSample.js | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.js | 48 + .../managedClusterSnapshotsDeleteSample.js | 36 + .../managedClusterSnapshotsGetSample.js | 36 + ...usterSnapshotsListByResourceGroupSample.js | 38 + .../managedClusterSnapshotsListSample.js | 37 + ...managedClusterSnapshotsUpdateTagsSample.js | 41 + ...nagedClustersAbortLatestOperationSample.js | 6 +- .../managedClustersCreateOrUpdateSample.js | 816 ++++-- .../javascript/managedClustersDeleteSample.js | 2 +- .../managedClustersGetAccessProfileSample.js | 2 +- .../managedClustersGetCommandResultSample.js | 4 +- ...agedClustersGetGuardrailsVersionsSample.js | 36 + ...gedClustersGetMeshRevisionProfileSample.js | 2 +- ...agedClustersGetMeshUpgradeProfileSample.js | 2 +- .../managedClustersGetOSOptionsSample.js | 2 +- ...agedClustersGetSafeguardsVersionsSample.js | 36 + .../javascript/managedClustersGetSample.js | 2 +- .../managedClustersGetUpgradeProfileSample.js | 2 +- ...anagedClustersListByResourceGroupSample.js | 2 +- ...ustersListClusterAdminCredentialsSample.js | 2 +- ...tClusterMonitoringUserCredentialsSample.js | 2 +- ...lustersListClusterUserCredentialsSample.js | 2 +- ...gedClustersListGuardrailsVersionsSample.js | 38 + ...gedClustersListKubernetesVersionsSample.js | 2 +- ...dClustersListMeshRevisionProfilesSample.js | 2 +- ...edClustersListMeshUpgradeProfilesSample.js | 2 +- ...boundNetworkDependenciesEndpointsSample.js | 2 +- ...gedClustersListSafeguardsVersionsSample.js | 38 + .../javascript/managedClustersListSample.js | 2 +- ...gedClustersRebalanceLoadBalancersSample.js | 43 + .../managedClustersResetAadProfileSample.js | 2 +- ...stersResetServicePrincipalProfileSample.js | 2 +- ...ClustersRotateClusterCertificatesSample.js | 2 +- ...rsRotateServiceAccountSigningKeysSample.js | 2 +- .../managedClustersRunCommandSample.js | 2 +- .../javascript/managedClustersStartSample.js | 2 +- .../javascript/managedClustersStopSample.js | 2 +- .../managedClustersUpdateTagsSample.js | 2 +- ...erationStatusResultGetByAgentPoolSample.js | 43 + .../operationStatusResultGetSample.js | 41 + .../operationStatusResultListSample.js | 42 + .../javascript/operationsListSample.js | 2 +- .../{v20 => v20-beta}/javascript/package.json | 8 +- .../privateEndpointConnectionsDeleteSample.js | 2 +- .../privateEndpointConnectionsGetSample.js | 2 +- .../privateEndpointConnectionsListSample.js | 2 +- .../privateEndpointConnectionsUpdateSample.js | 2 +- .../privateLinkResourcesListSample.js | 2 +- .../resolvePrivateLinkServiceIdPostSample.js | 2 +- .../{v20 => v20-beta}/javascript/sample.env | 0 .../snapshotsCreateOrUpdateSample.js | 2 +- .../javascript/snapshotsDeleteSample.js | 2 +- .../javascript/snapshotsGetSample.js | 2 +- .../snapshotsListByResourceGroupSample.js | 2 +- .../javascript/snapshotsListSample.js | 2 +- .../javascript/snapshotsUpdateTagsSample.js | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.js | 2 +- .../trustedAccessRoleBindingsDeleteSample.js | 2 +- .../trustedAccessRoleBindingsGetSample.js | 2 +- .../trustedAccessRoleBindingsListSample.js | 2 +- .../trustedAccessRolesListSample.js | 2 +- .../{v20 => v20-beta}/typescript/README.md | 276 +- .../{v20 => v20-beta}/typescript/package.json | 8 +- .../{v20 => v20-beta}/typescript/sample.env | 0 .../agentPoolsAbortLatestOperationSample.ts | 6 +- .../src/agentPoolsCreateOrUpdateSample.ts | 264 +- .../src/agentPoolsDeleteMachinesSample.ts | 55 + .../typescript/src/agentPoolsDeleteSample.ts | 70 + ...oolsGetAvailableAgentPoolVersionsSample.ts | 2 +- .../typescript/src/agentPoolsGetSample.ts | 2 +- .../src/agentPoolsGetUpgradeProfileSample.ts | 2 +- .../typescript/src/agentPoolsListSample.ts | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.ts | 2 +- .../src/loadBalancersCreateOrUpdateSample.ts | 45 + .../src/loadBalancersDeleteSample.ts | 45 + .../typescript/src/loadBalancersGetSample.ts | 45 + ...loadBalancersListByManagedClusterSample.ts | 46 + .../typescript/src/machinesGetSample.ts | 47 + .../typescript/src/machinesListSample.ts | 48 + ...nanceConfigurationsCreateOrUpdateSample.ts | 4 +- .../maintenanceConfigurationsDeleteSample.ts | 4 +- .../src/maintenanceConfigurationsGetSample.ts | 4 +- ...onfigurationsListByManagedClusterSample.ts | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.ts | 55 + .../managedClusterSnapshotsDeleteSample.ts | 43 + .../src/managedClusterSnapshotsGetSample.ts | 43 + ...usterSnapshotsListByResourceGroupSample.ts | 44 + .../src/managedClusterSnapshotsListSample.ts | 40 + ...managedClusterSnapshotsUpdateTagsSample.ts | 48 + ...nagedClustersAbortLatestOperationSample.ts | 6 +- .../managedClustersCreateOrUpdateSample.ts | 842 ++++-- .../src/managedClustersDeleteSample.ts | 2 +- .../managedClustersGetAccessProfileSample.ts | 2 +- .../managedClustersGetCommandResultSample.ts | 4 +- ...agedClustersGetGuardrailsVersionsSample.ts | 42 + ...gedClustersGetMeshRevisionProfileSample.ts | 2 +- ...agedClustersGetMeshUpgradeProfileSample.ts | 2 +- .../src/managedClustersGetOSOptionsSample.ts | 2 +- ...agedClustersGetSafeguardsVersionsSample.ts | 42 + .../src/managedClustersGetSample.ts | 2 +- .../managedClustersGetUpgradeProfileSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...ustersListClusterAdminCredentialsSample.ts | 2 +- ...tClusterMonitoringUserCredentialsSample.ts | 2 +- ...lustersListClusterUserCredentialsSample.ts | 2 +- ...gedClustersListGuardrailsVersionsSample.ts | 43 + ...gedClustersListKubernetesVersionsSample.ts | 2 +- ...dClustersListMeshRevisionProfilesSample.ts | 2 +- ...edClustersListMeshUpgradeProfilesSample.ts | 2 +- ...boundNetworkDependenciesEndpointsSample.ts | 2 +- ...gedClustersListSafeguardsVersionsSample.ts | 43 + .../src/managedClustersListSample.ts | 2 +- ...gedClustersRebalanceLoadBalancersSample.ts | 51 + .../managedClustersResetAadProfileSample.ts | 2 +- ...stersResetServicePrincipalProfileSample.ts | 2 +- ...ClustersRotateClusterCertificatesSample.ts | 2 +- ...rsRotateServiceAccountSigningKeysSample.ts | 2 +- .../src/managedClustersRunCommandSample.ts | 2 +- .../src/managedClustersStartSample.ts | 2 +- .../src/managedClustersStopSample.ts | 2 +- .../src/managedClustersUpdateTagsSample.ts | 2 +- ...erationStatusResultGetByAgentPoolSample.ts | 47 + .../src/operationStatusResultGetSample.ts | 45 + .../src/operationStatusResultListSample.ts | 46 + .../typescript/src/operationsListSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- .../privateEndpointConnectionsListSample.ts | 2 +- .../privateEndpointConnectionsUpdateSample.ts | 2 +- .../src/privateLinkResourcesListSample.ts | 2 +- .../resolvePrivateLinkServiceIdPostSample.ts | 2 +- .../src/snapshotsCreateOrUpdateSample.ts | 2 +- .../typescript/src/snapshotsDeleteSample.ts | 2 +- .../typescript/src/snapshotsGetSample.ts | 2 +- .../src/snapshotsListByResourceGroupSample.ts | 2 +- .../typescript/src/snapshotsListSample.ts | 2 +- .../src/snapshotsUpdateTagsSample.ts | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.ts | 2 +- .../trustedAccessRoleBindingsDeleteSample.ts | 2 +- .../src/trustedAccessRoleBindingsGetSample.ts | 2 +- .../trustedAccessRoleBindingsListSample.ts | 2 +- .../src/trustedAccessRolesListSample.ts | 2 +- .../typescript/tsconfig.json | 2 +- .../src/containerServiceClient.ts | 29 +- .../arm-containerservice/src/models/index.ts | 1577 ++++++++++-- .../src/models/mappers.ts | 2247 +++++++++++++++-- .../src/models/parameters.ts | 150 +- .../src/operations/agentPools.ts | 161 +- .../src/operations/index.ts | 6 +- .../src/operations/loadBalancers.ts | 435 ++++ .../src/operations/machines.ts | 262 ++ .../operations/maintenanceConfigurations.ts | 2 +- .../src/operations/managedClusterSnapshots.ts | 468 ++++ .../src/operations/managedClusters.ts | 775 +++++- .../operationStatusResultOperations.ts | 284 +++ .../operations/privateEndpointConnections.ts | 2 +- .../operations/resolvePrivateLinkServiceId.ts | 2 +- .../src/operations/snapshots.ts | 2 +- .../src/operationsInterfaces/agentPools.ts | 42 +- .../src/operationsInterfaces/index.ts | 6 +- .../src/operationsInterfaces/loadBalancers.ts | 93 + .../src/operationsInterfaces/machines.ts | 48 + .../managedClusterSnapshots.ts | 91 + .../operationsInterfaces/managedClusters.ts | 150 +- .../operationStatusResultOperations.ts | 61 + .../test/containerservice_examples.ts | 9 +- 271 files changed, 13119 insertions(+), 2025 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts rename sdk/containerservice/arm-containerservice/{samples/v20/typescript/src/agentPoolsDeleteSample.ts => samples-dev/loadBalancersGetSample.ts} (71%) create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/README.md (55%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsAbortLatestOperationSample.js (88%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsCreateOrUpdateSample.js (75%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/agentPoolsDeleteMachinesSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/agentPoolsDeleteSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsGetAvailableAgentPoolVersionsSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsGetSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsGetUpgradeProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsListSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/agentPoolsUpgradeNodeImageVersionSample.js (94%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/loadBalancersCreateOrUpdateSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/loadBalancersDeleteSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/loadBalancersGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/loadBalancersListByManagedClusterSample.js rename sdk/containerservice/arm-containerservice/samples/{v20/javascript/agentPoolsDeleteSample.js => v20-beta/javascript/machinesGetSample.js} (70%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/machinesListSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/maintenanceConfigurationsCreateOrUpdateSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/maintenanceConfigurationsDeleteSample.js (90%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/maintenanceConfigurationsGetSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/maintenanceConfigurationsListByManagedClusterSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsCreateOrUpdateSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsDeleteSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsListByResourceGroupSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsListSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClusterSnapshotsUpdateTagsSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersAbortLatestOperationSample.js (90%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersCreateOrUpdateSample.js (77%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetAccessProfileSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetCommandResultSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClustersGetGuardrailsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetMeshRevisionProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetMeshUpgradeProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetOSOptionsSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClustersGetSafeguardsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersGetUpgradeProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListByResourceGroupSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListClusterAdminCredentialsSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListClusterMonitoringUserCredentialsSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListClusterUserCredentialsSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClustersListGuardrailsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListKubernetesVersionsSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListMeshRevisionProfilesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListMeshUpgradeProfilesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListOutboundNetworkDependenciesEndpointsSample.js (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClustersListSafeguardsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersListSample.js (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/managedClustersRebalanceLoadBalancersSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersResetAadProfileSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersResetServicePrincipalProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersRotateClusterCertificatesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersRotateServiceAccountSigningKeysSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersRunCommandSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersStartSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersStopSample.js (95%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/managedClustersUpdateTagsSample.js (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/operationStatusResultGetByAgentPoolSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/operationStatusResultGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/operationStatusResultListSample.js rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/operationsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/package.json (76%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/privateEndpointConnectionsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/privateEndpointConnectionsGetSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/privateEndpointConnectionsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/privateEndpointConnectionsUpdateSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/privateLinkResourcesListSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/resolvePrivateLinkServiceIdPostSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/sample.env (100%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsCreateOrUpdateSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsListByResourceGroupSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/snapshotsUpdateTagsSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/trustedAccessRoleBindingsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/trustedAccessRoleBindingsGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/trustedAccessRoleBindingsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/javascript/trustedAccessRolesListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/README.md (55%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/package.json (80%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/sample.env (100%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsAbortLatestOperationSample.ts (88%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsCreateOrUpdateSample.ts (75%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteMachinesSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsGetUpgradeProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts (94%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersListByManagedClusterSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesListSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/maintenanceConfigurationsDeleteSample.ts (90%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/maintenanceConfigurationsGetSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersAbortLatestOperationSample.ts (90%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersCreateOrUpdateSample.ts (77%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetAccessProfileSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetCommandResultSample.ts (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetMeshRevisionProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetOSOptionsSample.ts (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersGetUpgradeProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListByResourceGroupSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListClusterAdminCredentialsSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListClusterUserCredentialsSample.ts (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListKubernetesVersionsSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListMeshRevisionProfilesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersListSample.ts (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersResetAadProfileSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersResetServicePrincipalProfileSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersRotateClusterCertificatesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersRunCommandSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersStartSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersStopSample.ts (95%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/managedClustersUpdateTagsSample.ts (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultListSample.ts rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/operationsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/privateEndpointConnectionsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/privateEndpointConnectionsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/privateEndpointConnectionsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/privateEndpointConnectionsUpdateSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/privateLinkResourcesListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/resolvePrivateLinkServiceIdPostSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsCreateOrUpdateSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsListByResourceGroupSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/snapshotsUpdateTagsSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/trustedAccessRoleBindingsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/trustedAccessRoleBindingsGetSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/trustedAccessRoleBindingsListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/src/trustedAccessRolesListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v20 => v20-beta}/typescript/tsconfig.json (94%) create mode 100644 sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/machines.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/machines.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3b1b46d8cf8..f4ca6f33f48 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -13514,7 +13514,7 @@ packages: dev: false file:projects/arm-containerservice-1.tgz: - resolution: {integrity: sha512-qGyZmQjcgqY4sRGwoKrZNe1EqFn8DJUgppSxF8Yuf4kXwSQcYJgLoO5Z7oPkTC/D1fV3hDlEXilkrnnL9f/tTg==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-MSE9EQsFt80usJvYiYKfr8QgkOTk0uB7i+d1RvEgz0W1HSWx0r+5sI52jjaQo2s2l3Vb9f+p0N+Vn2Os9LhWPg==, tarball: file:projects/arm-containerservice-1.tgz} name: '@rush-temp/arm-containerservice-1' version: 0.0.0 dependencies: @@ -13534,9 +13534,10 @@ packages: mkdirp: 3.0.1 mocha: 10.6.0 rimraf: 5.0.9 - ts-node: 10.9.2(@types/node@18.19.40)(typescript@5.5.3) + ts-node: 10.9.2(@types/node@18.19.40)(typescript@5.4.5) tslib: 2.6.3 - typescript: 5.5.3 + tsx: 4.16.2 + typescript: 5.4.5 uglify-js: 3.18.0 transitivePeerDependencies: - '@swc/core' diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index 786fc82a61b..ce1bac73b87 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,18 +1,238 @@ # Release History - -## 20.0.1 (Unreleased) - + +## 20.1.0-beta.1 (2024-07-12) +Compared with version 20.0.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group LoadBalancers + - Added operation group Machines + - Added operation group ManagedClusterSnapshots + - Added operation group OperationStatusResultOperations + - Added operation AgentPools.beginDeleteMachines + - Added operation AgentPools.beginDeleteMachinesAndWait + - Added operation ManagedClusters.beginRebalanceLoadBalancers + - Added operation ManagedClusters.beginRebalanceLoadBalancersAndWait + - Added operation ManagedClusters.getGuardrailsVersions + - Added operation ManagedClusters.getSafeguardsVersions + - Added operation ManagedClusters.listGuardrailsVersions + - Added operation ManagedClusters.listSafeguardsVersions + - Added Interface AdvancedNetworking + - Added Interface AdvancedNetworkingObservability + - Added Interface AgentPoolArtifactStreamingProfile + - Added Interface AgentPoolDeleteMachinesParameter + - Added Interface AgentPoolGatewayProfile + - Added Interface AgentPoolGPUProfile + - Added Interface AgentPoolsDeleteMachinesHeaders + - Added Interface AgentPoolsDeleteMachinesOptionalParams + - Added Interface AgentPoolSecurityProfile + - Added Interface AutoScaleProfile + - Added Interface Component + - Added Interface ComponentsByRelease + - Added Interface ContainerServiceNetworkProfileKubeProxyConfig + - Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + - Added Interface GuardrailsAvailableVersion + - Added Interface GuardrailsAvailableVersionsList + - Added Interface GuardrailsAvailableVersionsProperties + - Added Interface LabelSelector + - Added Interface LabelSelectorRequirement + - Added Interface LoadBalancer + - Added Interface LoadBalancerListResult + - Added Interface LoadBalancersCreateOrUpdateOptionalParams + - Added Interface LoadBalancersDeleteHeaders + - Added Interface LoadBalancersDeleteOptionalParams + - Added Interface LoadBalancersGetOptionalParams + - Added Interface LoadBalancersListByManagedClusterNextOptionalParams + - Added Interface LoadBalancersListByManagedClusterOptionalParams + - Added Interface Machine + - Added Interface MachineIpAddress + - Added Interface MachineListResult + - Added Interface MachineNetworkProperties + - Added Interface MachineProperties + - Added Interface MachinesGetOptionalParams + - Added Interface MachinesListNextOptionalParams + - Added Interface MachinesListOptionalParams + - Added Interface ManagedClusterAIToolchainOperatorProfile + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoring + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + - Added Interface ManagedClusterAzureMonitorProfileContainerInsights + - Added Interface ManagedClusterBootstrapProfile + - Added Interface ManagedClusterNodeProvisioningProfile + - Added Interface ManagedClusterNodeResourceGroupProfile + - Added Interface ManagedClusterPropertiesForSnapshot + - Added Interface ManagedClusterSecurityProfileImageIntegrity + - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClustersGetGuardrailsVersionsOptionalParams + - Added Interface ManagedClustersGetSafeguardsVersionsOptionalParams + - Added Interface ManagedClustersListGuardrailsVersionsNextOptionalParams + - Added Interface ManagedClustersListGuardrailsVersionsOptionalParams + - Added Interface ManagedClustersListSafeguardsVersionsNextOptionalParams + - Added Interface ManagedClustersListSafeguardsVersionsOptionalParams + - Added Interface ManagedClusterSnapshot + - Added Interface ManagedClusterSnapshotListResult + - Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams + - Added Interface ManagedClusterSnapshotsDeleteOptionalParams + - Added Interface ManagedClusterSnapshotsGetOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupOptionalParams + - Added Interface ManagedClusterSnapshotsListNextOptionalParams + - Added Interface ManagedClusterSnapshotsListOptionalParams + - Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams + - Added Interface ManagedClustersRebalanceLoadBalancersHeaders + - Added Interface ManagedClustersRebalanceLoadBalancersOptionalParams + - Added Interface ManagedClusterStaticEgressGatewayProfile + - Added Interface ManualScaleProfile + - Added Interface NetworkProfileForSnapshot + - Added Interface OperationStatusResult + - Added Interface OperationStatusResultGetByAgentPoolOptionalParams + - Added Interface OperationStatusResultGetOptionalParams + - Added Interface OperationStatusResultList + - Added Interface OperationStatusResultListNextOptionalParams + - Added Interface OperationStatusResultListOptionalParams + - Added Interface RebalanceLoadBalancersRequestBody + - Added Interface SafeguardsAvailableVersion + - Added Interface SafeguardsAvailableVersionsList + - Added Interface SafeguardsAvailableVersionsProperties + - Added Interface SafeguardsProfile + - Added Interface ScaleProfile + - Added Interface VirtualMachineNodes + - Added Interface VirtualMachinesProfile + - Added Type Alias AddonAutoscaling + - Added Type Alias AgentPoolsDeleteMachinesResponse + - Added Type Alias AgentPoolSSHAccess + - Added Type Alias ArtifactSource + - Added Type Alias ClusterServiceLoadBalancerHealthProbeMode + - Added Type Alias GuardrailsSupport + - Added Type Alias IpvsScheduler + - Added Type Alias Level + - Added Type Alias LoadBalancersCreateOrUpdateResponse + - Added Type Alias LoadBalancersDeleteResponse + - Added Type Alias LoadBalancersGetResponse + - Added Type Alias LoadBalancersListByManagedClusterNextResponse + - Added Type Alias LoadBalancersListByManagedClusterResponse + - Added Type Alias MachinesGetResponse + - Added Type Alias MachinesListNextResponse + - Added Type Alias MachinesListResponse + - Added Type Alias ManagedClustersGetGuardrailsVersionsResponse + - Added Type Alias ManagedClustersGetSafeguardsVersionsResponse + - Added Type Alias ManagedClustersListGuardrailsVersionsNextResponse + - Added Type Alias ManagedClustersListGuardrailsVersionsResponse + - Added Type Alias ManagedClustersListSafeguardsVersionsNextResponse + - Added Type Alias ManagedClustersListSafeguardsVersionsResponse + - Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse + - Added Type Alias ManagedClusterSnapshotsGetResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupResponse + - Added Type Alias ManagedClusterSnapshotsListNextResponse + - Added Type Alias ManagedClusterSnapshotsListResponse + - Added Type Alias ManagedClusterSnapshotsUpdateTagsResponse + - Added Type Alias ManagedClustersRebalanceLoadBalancersResponse + - Added Type Alias Mode + - Added Type Alias NodeProvisioningMode + - Added Type Alias OperationStatusResultGetByAgentPoolResponse + - Added Type Alias OperationStatusResultGetResponse + - Added Type Alias OperationStatusResultListNextResponse + - Added Type Alias OperationStatusResultListResponse + - Added Type Alias Operator + - Added Type Alias PodIPAllocationMode + - Added Type Alias PodLinkLocalAccess + - Added Type Alias RestrictionLevel + - Added Type Alias SafeguardsSupport + - Added Type Alias UndrainableNodeBehavior + - Interface AgentPool has a new optional parameter artifactStreamingProfile + - Interface AgentPool has a new optional parameter enableCustomCATrust + - Interface AgentPool has a new optional parameter eTag + - Interface AgentPool has a new optional parameter gatewayProfile + - Interface AgentPool has a new optional parameter gpuProfile + - Interface AgentPool has a new optional parameter messageOfTheDay + - Interface AgentPool has a new optional parameter nodeInitializationTaints + - Interface AgentPool has a new optional parameter podIPAllocationMode + - Interface AgentPool has a new optional parameter securityProfile + - Interface AgentPool has a new optional parameter virtualMachineNodesStatus + - Interface AgentPool has a new optional parameter virtualMachinesProfile + - Interface AgentPoolsCreateOrUpdateOptionalParams has a new optional parameter ifMatch + - Interface AgentPoolsCreateOrUpdateOptionalParams has a new optional parameter ifNoneMatch + - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ifMatch + - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface AgentPoolUpgradeProfile has a new optional parameter componentsByReleases + - Interface AgentPoolUpgradeSettings has a new optional parameter undrainableNodeBehavior + - Interface ContainerServiceNetworkProfile has a new optional parameter advancedNetworking + - Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig + - Interface ContainerServiceNetworkProfile has a new optional parameter podLinkLocalAccess + - Interface ContainerServiceNetworkProfile has a new optional parameter staticEgressGatewayProfile + - Interface ManagedCluster has a new optional parameter aiToolchainOperatorProfile + - Interface ManagedCluster has a new optional parameter bootstrapProfile + - Interface ManagedCluster has a new optional parameter creationData + - Interface ManagedCluster has a new optional parameter enableNamespaceResources + - Interface ManagedCluster has a new optional parameter eTag + - Interface ManagedCluster has a new optional parameter kind + - Interface ManagedCluster has a new optional parameter nodeProvisioningProfile + - Interface ManagedCluster has a new optional parameter nodeResourceGroupProfile + - Interface ManagedCluster has a new optional parameter safeguardsProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter artifactStreamingProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter eTag + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter gatewayProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter gpuProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter nodeInitializationTaints + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter podIPAllocationMode + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter securityProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter virtualMachineNodesStatus + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter virtualMachinesProfile + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter enableVnetIntegration + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId + - Interface ManagedClusterAzureMonitorProfile has a new optional parameter appMonitoring + - Interface ManagedClusterAzureMonitorProfile has a new optional parameter containerInsights + - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy + - Interface ManagedClusterLoadBalancerProfile has a new optional parameter clusterServiceLoadBalancerHealthProbeMode + - Interface ManagedClusterPoolUpgradeProfile has a new optional parameter componentsByReleases + - Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter daemonsetEvictionForEmptyNodes + - Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter daemonsetEvictionForOccupiedNodes + - Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter ignoreDaemonsetsUtilization + - Interface ManagedClustersCreateOrUpdateOptionalParams has a new optional parameter ifMatch + - Interface ManagedClustersCreateOrUpdateOptionalParams has a new optional parameter ifNoneMatch + - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ifMatch + - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ManagedClusterSecurityProfile has a new optional parameter customCATrustCertificates + - Interface ManagedClusterSecurityProfile has a new optional parameter imageIntegrity + - Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction + - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version + - Interface ManagedClustersUpdateTagsOptionalParams has a new optional parameter ifMatch + - Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler has a new optional parameter addonAutoscaling + - Added Enum KnownAddonAutoscaling + - Added Enum KnownAgentPoolSSHAccess + - Added Enum KnownArtifactSource + - Added Enum KnownClusterServiceLoadBalancerHealthProbeMode + - Added Enum KnownGuardrailsSupport + - Added Enum KnownIpvsScheduler + - Added Enum KnownLevel + - Added Enum KnownMode + - Added Enum KnownNodeProvisioningMode + - Added Enum KnownOperator + - Added Enum KnownPodIPAllocationMode + - Added Enum KnownPodLinkLocalAccess + - Added Enum KnownRestrictionLevel + - Added Enum KnownSafeguardsSupport + - Added Enum KnownUndrainableNodeBehavior + - Enum KnownAgentPoolMode has a new value Gateway + - Enum KnownAgentPoolType has a new value VirtualMachines + - Enum KnownManagedClusterSKUName has a new value Automatic + - Enum KnownNetworkPolicy has a new value None + - Enum KnownNodeOSUpgradeChannel has a new value SecurityPatch + - Enum KnownOssku has a new value Mariner + - Enum KnownOssku has a new value WindowsAnnual + - Enum KnownOutboundType has a new value None + - Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter + - Enum KnownSnapshotType has a new value ManagedCluster + - Enum KnownWorkloadRuntime has a new value KataMshvVmIsolation + + ## 20.0.0 (2024-04-26) -**Features** +### Features Added - Added Interface AgentPoolWindowsProfile - Added Interface ManagedClusterCostAnalysis @@ -22,14 +242,14 @@ - Interface ManagedCluster has a new optional parameter metricsProfile - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter windowsProfile -**Breaking Changes** +### Breaking Changes - Interface IstioEgressGateway no longer has parameter nodeSelector - + ## 20.0.0-beta.1 (2024-04-12) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -214,14 +434,14 @@ - Enum KnownSnapshotType has a new value ManagedCluster - Enum KnownWorkloadRuntime has a new value KataMshvVmIsolation -**Breaking Changes** +### Breaking Changes - Interface IstioEgressGateway no longer has parameter nodeSelector ## 19.8.0 (2024-03-22) -**Features** +### Features Added - Added Interface ManagedClusterIngressProfile - Added Interface ManagedClusterIngressProfileWebAppRouting @@ -230,7 +450,7 @@ ## 19.8.0-beta.2 (2024-03-08) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -410,7 +630,7 @@ ## 19.8.0-beta.1 (2024-02-05) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -582,14 +802,14 @@ ## 19.7.0 (2024-01-18) -**Features** +### Features Added - Interface AgentPoolUpgradeSettings has a new optional parameter nodeSoakDurationInMinutes ## 19.6.0 (2023-12-21) -**Features** +### Features Added - Added Interface AgentPoolNetworkProfile - Added Interface IPTag @@ -607,7 +827,7 @@ ## 19.6.0-beta.1 (2023-11-30) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -779,7 +999,7 @@ ## 19.5.0 (2023-11-22) -**Features** +### Features Added - Added operation group TrustedAccessRoleBindings - Added operation group TrustedAccessRoles @@ -812,7 +1032,7 @@ ## 19.5.0-beta.1 (2023-11-03) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -985,7 +1205,7 @@ ## 19.4.0 (2023-10-20) -**Features** +### Features Added - Added operation ManagedClusters.getMeshRevisionProfile - Added operation ManagedClusters.getMeshUpgradeProfile @@ -1029,7 +1249,7 @@ ## 19.4.0-beta.2 (2023-10-10) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -1225,7 +1445,7 @@ ## 19.4.0-beta.1 (2023-09-01) -**Features** +### Features Added - Added operation group Machines - Added operation group ManagedClusterSnapshots @@ -1408,7 +1628,7 @@ ## 19.3.0 (2023-08-21) -**Features** +### Features Added - Added Interface ClusterUpgradeSettings - Added Interface UpgradeOverrideSettings @@ -1417,7 +1637,7 @@ ## 19.2.0 (2023-08-14) -**Features** +### Features Added - Added Interface DelegatedResource - Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler @@ -1431,7 +1651,7 @@ ## 19.1.0 (2023-07-03) -**Features** +### Features Added - Added Interface AbsoluteMonthlySchedule - Added Interface DailySchedule @@ -1447,18 +1667,18 @@ ## 19.0.0 (2023-05-19) -**Features** +### Features Added - Enum KnownOssku has a new value AzureLinux -**Breaking Changes** +### Breaking Changes - Interface ContainerServiceNetworkProfile no longer has parameter dockerBridgeCidr ## 18.0.0 (2023-04-23) -**Features** +### Features Added - Added operation ManagedClusters.listKubernetesVersions - Added Interface KubernetesPatchVersion @@ -1483,7 +1703,7 @@ - Enum KnownManagedClusterSKUTier has a new value Premium - Enum KnownNetworkPolicy has a new value Cilium -**Breaking Changes** +### Breaking Changes - Removed Enum KnownContainerServiceStorageProfileTypes - Removed Enum KnownContainerServiceVMSizeTypes @@ -1493,7 +1713,7 @@ ## 17.4.0 (2023-03-09) -**Features** +### Features Added - Added operation AgentPools.beginAbortLatestOperation - Added operation AgentPools.beginAbortLatestOperationAndWait @@ -1515,7 +1735,7 @@ ## 17.3.0 (2023-01-06) -**Features** +### Features Added - Added Interface AgentPoolsDeleteHeaders - Added Interface ManagedClustersDeleteHeaders @@ -1542,7 +1762,7 @@ ## 17.2.0 (2022-11-02) -**Features** +### Features Added - Added operation ManagedClusters.beginRotateServiceAccountSigningKeys - Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait @@ -1557,7 +1777,7 @@ ## 17.1.0 (2022-08-25) -**Features** +### Features Added - Enum KnownOssku has a new value Windows2019 - Enum KnownOssku has a new value Windows2022 @@ -1565,7 +1785,7 @@ ## 17.0.0 (2022-07-22) -**Features** +### Features Added - Added Interface AgentPool - Added Interface AzureKeyVaultKms @@ -1585,14 +1805,14 @@ - Added Enum KnownKeyVaultNetworkAccessTypes - Enum KnownNetworkPlugin has a new value None -**Breaking Changes** +### Breaking Changes - Interface ManagedClusterSecurityProfile no longer has parameter azureDefender ## 16.1.0 (2022-05-23) -**Features** +### Features Added - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter currentOrchestratorVersion - Type Alias AgentPool has a new parameter currentOrchestratorVersion @@ -1602,7 +1822,7 @@ ## 16.0.0 (2022-04-20) -**Features** +### Features Added - Added Interface ManagedClusterStorageProfile - Added Interface ManagedClusterStorageProfileDiskCSIDriver @@ -1613,7 +1833,7 @@ - Add parameters of TrackedResource to TypeAlias ManagedClusterAccessProfile - Add parameters of TrackedResource to TypeAlias Snapshot -**Breaking Changes** +### Breaking Changes - Interface Resource no longer has parameter location - Interface Resource no longer has parameter tags @@ -1624,14 +1844,14 @@ ## 15.2.0 (2022-03-23) -**Features** +### Features Added - Interface Resource has a new optional parameter systemData ## 15.1.0 (2022-02-24) -**Features** +### Features Added - Added Type Alias Format - Interface ManagedClustersListClusterUserCredentialsOptionalParams has a new optional parameter format diff --git a/sdk/containerservice/arm-containerservice/README.md b/sdk/containerservice/arm-containerservice/README.md index 286d376f7c2..ce081835bfb 100644 --- a/sdk/containerservice/arm-containerservice/README.md +++ b/sdk/containerservice/arm-containerservice/README.md @@ -6,7 +6,7 @@ The Container Service Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerservice) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index ce15afd6884..a921b1ac295 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "34d8b6d264d9b8980a3c8fe2dde026319b2ba32f", + "commit": "c35779f9b45b287e2763e803e9692dbb5627f671", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.21 --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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.5", - "use": "@autorest/typescript@6.0.21" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", + "use": "@autorest/typescript@6.0.23" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/assets.json b/sdk/containerservice/arm-containerservice/assets.json index fce08567ad7..880438802b2 100644 --- a/sdk/containerservice/arm-containerservice/assets.json +++ b/sdk/containerservice/arm-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/containerservice/arm-containerservice", - "Tag": "js/containerservice/arm-containerservice_287fff2d20" + "Tag": "js/containerservice/arm-containerservice_5e83559e86" } diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 8d39e360647..6054cd2c118 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "20.0.1", + "version": "20.1.0-beta.1", "engines": { "node": ">=18.0.0" }, @@ -30,17 +30,17 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.5.3", + "typescript": "~5.4.5", "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", "@azure-tools/test-recorder": "^3.0.0", - "@azure-tools/test-credential": "^1.0.0", + "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "esm": "^3.2.18", + "tsx": "^4.7.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", @@ -76,7 +76,7 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "prepack": "npm run build", "pack": "npm pack 2>&1", - "extract-api": "api-extractor run --local", + "extract-api": "dev-tool run extract-api", "lint": "echo skipped", "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", @@ -115,4 +115,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index 43dd273f42e..deafd560035 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -16,29 +16,49 @@ export interface AbsoluteMonthlySchedule { intervalMonths: number; } +// @public +export type AddonAutoscaling = string; + +// @public +export interface AdvancedNetworking { + observability?: AdvancedNetworkingObservability; +} + +// @public +export interface AdvancedNetworkingObservability { + enabled?: boolean; +} + // @public export interface AgentPool extends SubResource { + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; availabilityZones?: string[]; capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; enableUltraSSD?: boolean; + readonly eTag?: string; + gatewayProfile?: AgentPoolGatewayProfile; gpuInstanceProfile?: GPUInstanceProfile; + gpuProfile?: AgentPoolGPUProfile; hostGroupID?: string; kubeletConfig?: KubeletConfig; kubeletDiskType?: KubeletDiskType; linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; + nodeInitializationTaints?: string[]; nodeLabels?: { [propertyName: string]: string; }; @@ -49,6 +69,7 @@ export interface AgentPool extends SubResource { osDiskType?: OSDiskType; osSKU?: Ossku; osType?: OSType; + podIPAllocationMode?: PodIPAllocationMode; podSubnetID?: string; powerState?: PowerState; readonly provisioningState?: string; @@ -56,18 +77,26 @@ export interface AgentPool extends SubResource { scaleDownMode?: ScaleDownMode; scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; scaleSetPriority?: ScaleSetPriority; + securityProfile?: AgentPoolSecurityProfile; spotMaxPrice?: number; tags?: { [propertyName: string]: string; }; typePropertiesType?: AgentPoolType; upgradeSettings?: AgentPoolUpgradeSettings; + virtualMachineNodesStatus?: VirtualMachineNodes[]; + virtualMachinesProfile?: VirtualMachinesProfile; vmSize?: string; vnetSubnetID?: string; windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } +// @public (undocumented) +export interface AgentPoolArtifactStreamingProfile { + enabled?: boolean; +} + // @public export interface AgentPoolAvailableVersions { agentPoolVersions?: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]; @@ -83,6 +112,21 @@ export interface AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { kubernetesVersion?: string; } +// @public +export interface AgentPoolDeleteMachinesParameter { + machineNames: string[]; +} + +// @public +export interface AgentPoolGatewayProfile { + publicIPPrefixSize?: number; +} + +// @public (undocumented) +export interface AgentPoolGPUProfile { + installGPUDriver?: boolean; +} + // @public export interface AgentPoolListResult { readonly nextLink?: string; @@ -107,6 +151,8 @@ export interface AgentPools { beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise, AgentPoolsDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise; + beginDeleteMachines(resourceGroupName: string, resourceName: string, agentPoolName: string, machines: AgentPoolDeleteMachinesParameter, options?: AgentPoolsDeleteMachinesOptionalParams): Promise, AgentPoolsDeleteMachinesResponse>>; + beginDeleteMachinesAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, machines: AgentPoolDeleteMachinesParameter, options?: AgentPoolsDeleteMachinesOptionalParams): Promise; beginUpgradeNodeImageVersion(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsUpgradeNodeImageVersionOptionalParams): Promise, void>>; beginUpgradeNodeImageVersionAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsUpgradeNodeImageVersionOptionalParams): Promise; get(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsGetOptionalParams): Promise; @@ -132,6 +178,8 @@ export type AgentPoolsAbortLatestOperationResponse = AgentPoolsAbortLatestOperat // @public export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; resumeFrom?: string; updateIntervalInMs?: number; } @@ -144,8 +192,24 @@ export interface AgentPoolsDeleteHeaders { location?: string; } +// @public +export interface AgentPoolsDeleteMachinesHeaders { + location?: string; +} + +// @public +export interface AgentPoolsDeleteMachinesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AgentPoolsDeleteMachinesResponse = AgentPoolsDeleteMachinesHeaders; + // @public export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -153,6 +217,13 @@ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOpti // @public export type AgentPoolsDeleteResponse = AgentPoolsDeleteHeaders; +// @public +export interface AgentPoolSecurityProfile { + enableSecureBoot?: boolean; + enableVtpm?: boolean; + sshAccess?: AgentPoolSSHAccess; +} + // @public export interface AgentPoolsGetAvailableAgentPoolVersionsOptionalParams extends coreClient.OperationOptions { } @@ -188,6 +259,9 @@ export interface AgentPoolsListOptionalParams extends coreClient.OperationOption // @public export type AgentPoolsListResponse = AgentPoolListResult; +// @public +export type AgentPoolSSHAccess = string; + // @public export interface AgentPoolsUpgradeNodeImageVersionHeaders { azureAsyncOperation?: string; @@ -204,6 +278,7 @@ export type AgentPoolType = string; // @public export interface AgentPoolUpgradeProfile { + componentsByReleases?: ComponentsByRelease[]; readonly id?: string; kubernetesVersion: string; latestNodeImageVersion?: string; @@ -224,6 +299,7 @@ export interface AgentPoolUpgradeSettings { drainTimeoutInMinutes?: number; maxSurge?: string; nodeSoakDurationInMinutes?: number; + undrainableNodeBehavior?: UndrainableNodeBehavior; } // @public @@ -231,6 +307,16 @@ export interface AgentPoolWindowsProfile { disableOutboundNat?: boolean; } +// @public +export type ArtifactSource = string; + +// @public +export interface AutoScaleProfile { + maxCount?: number; + minCount?: number; + sizes?: string[]; +} + // @public export interface AzureKeyVaultKms { enabled?: boolean; @@ -255,6 +341,9 @@ export interface CloudErrorBody { target?: string; } +// @public +export type ClusterServiceLoadBalancerHealthProbeMode = string; + // @public export interface ClusterUpgradeSettings { overrideSettings?: UpgradeOverrideSettings; @@ -269,6 +358,19 @@ export interface CompatibleVersions { versions?: string[]; } +// @public (undocumented) +export interface Component { + hasBreakingChanges?: boolean; + name?: string; + version?: string; +} + +// @public +export interface ComponentsByRelease { + components?: Component[]; + kubernetesVersion?: string; +} + // @public export type ConnectionStatus = string; @@ -282,12 +384,20 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + loadBalancers: LoadBalancers; + // (undocumented) + machines: Machines; + // (undocumented) maintenanceConfigurations: MaintenanceConfigurations; // (undocumented) managedClusters: ManagedClusters; // (undocumented) + managedClusterSnapshots: ManagedClusterSnapshots; + // (undocumented) operations: Operations; // (undocumented) + operationStatusResultOperations: OperationStatusResultOperations; + // (undocumented) privateEndpointConnections: PrivateEndpointConnections; // (undocumented) privateLinkResources: PrivateLinkResources; @@ -318,8 +428,10 @@ export interface ContainerServiceLinuxProfile { // @public export interface ContainerServiceNetworkProfile { + advancedNetworking?: AdvancedNetworking; dnsServiceIP?: string; ipFamilies?: IpFamily[]; + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; loadBalancerProfile?: ManagedClusterLoadBalancerProfile; loadBalancerSku?: LoadBalancerSku; natGatewayProfile?: ManagedClusterNATGatewayProfile; @@ -331,8 +443,25 @@ export interface ContainerServiceNetworkProfile { outboundType?: OutboundType; podCidr?: string; podCidrs?: string[]; + podLinkLocalAccess?: PodLinkLocalAccess; serviceCidr?: string; serviceCidrs?: string[]; + staticEgressGatewayProfile?: ManagedClusterStaticEgressGatewayProfile; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfig { + enabled?: boolean; + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + mode?: Mode; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + scheduler?: IpvsScheduler; + tcpFinTimeoutSeconds?: number; + tcpTimeoutSeconds?: number; + udpTimeoutSeconds?: number; } // @public @@ -438,6 +567,26 @@ export function getContinuationToken(page: unknown): string | undefined; // @public export type GPUInstanceProfile = string; +// @public +export interface GuardrailsAvailableVersion extends Resource { + properties: GuardrailsAvailableVersionsProperties; +} + +// @public +export interface GuardrailsAvailableVersionsList { + readonly nextLink?: string; + value?: GuardrailsAvailableVersion[]; +} + +// @public +export interface GuardrailsAvailableVersionsProperties { + readonly isDefaultVersion?: boolean; + readonly support?: GuardrailsSupport; +} + +// @public +export type GuardrailsSupport = string; + // @public export type IpFamily = string; @@ -447,6 +596,9 @@ export interface IPTag { tag?: string; } +// @public +export type IpvsScheduler = string; + // @public export interface IstioCertificateAuthority { plugin?: IstioPluginCertificateAuthority; @@ -491,24 +643,50 @@ export interface IstioServiceMesh { // @public export type KeyVaultNetworkAccessTypes = string; +// @public +export enum KnownAddonAutoscaling { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownAgentPoolMode { + Gateway = "Gateway", System = "System", User = "User" } +// @public +export enum KnownAgentPoolSSHAccess { + Disabled = "Disabled", + LocalUser = "LocalUser" +} + // @public export enum KnownAgentPoolType { AvailabilitySet = "AvailabilitySet", + VirtualMachines = "VirtualMachines", VirtualMachineScaleSets = "VirtualMachineScaleSets" } +// @public +export enum KnownArtifactSource { + Cache = "Cache", + Direct = "Direct" +} + // @public export enum KnownBackendPoolType { NodeIP = "NodeIP", NodeIPConfiguration = "NodeIPConfiguration" } +// @public +export enum KnownClusterServiceLoadBalancerHealthProbeMode { + ServiceNodePort = "ServiceNodePort", + Shared = "Shared" +} + // @public export enum KnownCode { Running = "Running", @@ -559,12 +737,24 @@ export enum KnownGPUInstanceProfile { MIG7G = "MIG7g" } +// @public +export enum KnownGuardrailsSupport { + Preview = "Preview", + Stable = "Stable" +} + // @public export enum KnownIpFamily { IPv4 = "IPv4", IPv6 = "IPv6" } +// @public +export enum KnownIpvsScheduler { + LeastConnection = "LeastConnection", + RoundRobin = "RoundRobin" +} + // @public export enum KnownIstioIngressGatewayMode { External = "External", @@ -589,6 +779,13 @@ export enum KnownKubernetesSupportPlan { KubernetesOfficial = "KubernetesOfficial" } +// @public +export enum KnownLevel { + Enforcement = "Enforcement", + Off = "Off", + Warning = "Warning" +} + // @public export enum KnownLicenseType { None = "None", @@ -613,6 +810,7 @@ export enum KnownManagedClusterPodIdentityProvisioningState { // @public export enum KnownManagedClusterSKUName { + Automatic = "Automatic", Base = "Base" } @@ -623,6 +821,12 @@ export enum KnownManagedClusterSKUTier { Standard = "Standard" } +// @public +export enum KnownMode { + Iptables = "IPTABLES", + Ipvs = "IPVS" +} + // @public export enum KnownNetworkDataplane { Azure = "azure", @@ -651,16 +855,32 @@ export enum KnownNetworkPluginMode { export enum KnownNetworkPolicy { Azure = "azure", Calico = "calico", - Cilium = "cilium" + Cilium = "cilium", + None = "none" } // @public export enum KnownNodeOSUpgradeChannel { NodeImage = "NodeImage", None = "None", + SecurityPatch = "SecurityPatch", Unmanaged = "Unmanaged" } +// @public +export enum KnownNodeProvisioningMode { + Auto = "Auto", + Manual = "Manual" +} + +// @public +export enum KnownOperator { + DoesNotExist = "DoesNotExist", + Exists = "Exists", + In = "In", + NotIn = "NotIn" +} + // @public export enum KnownOSDiskType { Ephemeral = "Ephemeral", @@ -671,9 +891,11 @@ export enum KnownOSDiskType { export enum KnownOssku { AzureLinux = "AzureLinux", CBLMariner = "CBLMariner", + Mariner = "Mariner", Ubuntu = "Ubuntu", Windows2019 = "Windows2019", - Windows2022 = "Windows2022" + Windows2022 = "Windows2022", + WindowsAnnual = "WindowsAnnual" } // @public @@ -686,10 +908,23 @@ export enum KnownOSType { export enum KnownOutboundType { LoadBalancer = "loadBalancer", ManagedNATGateway = "managedNATGateway", + None = "none", UserAssignedNATGateway = "userAssignedNATGateway", UserDefinedRouting = "userDefinedRouting" } +// @public +export enum KnownPodIPAllocationMode { + DynamicIndividual = "DynamicIndividual", + StaticBlock = "StaticBlock" +} + +// @public +export enum KnownPodLinkLocalAccess { + Imds = "IMDS", + None = "None" +} + // @public export enum KnownPrivateEndpointConnectionProvisioningState { Canceled = "Canceled", @@ -708,7 +943,20 @@ export enum KnownProtocol { // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" +} + +// @public +export enum KnownRestrictionLevel { + ReadOnly = "ReadOnly", + Unrestricted = "Unrestricted" +} + +// @public +export enum KnownSafeguardsSupport { + Preview = "Preview", + Stable = "Stable" } // @public @@ -737,6 +985,7 @@ export enum KnownServiceMeshMode { // @public export enum KnownSnapshotType { + ManagedCluster = "ManagedCluster", NodePool = "NodePool" } @@ -758,6 +1007,12 @@ export enum KnownType { Third = "Third" } +// @public +export enum KnownUndrainableNodeBehavior { + Cordon = "Cordon", + Schedule = "Schedule" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -780,6 +1035,7 @@ export enum KnownWeekDay { // @public export enum KnownWorkloadRuntime { + KataMshvVmIsolation = "KataMshvVmIsolation", OCIContainer = "OCIContainer", WasmWasi = "WasmWasi" } @@ -832,6 +1088,22 @@ export interface KubernetesVersionListResult { values?: KubernetesVersion[]; } +// @public +export interface LabelSelector { + matchExpressions?: LabelSelectorRequirement[]; + matchLabels?: string[]; +} + +// @public +export interface LabelSelectorRequirement { + key?: string; + operator?: Operator; + values?: string[]; +} + +// @public +export type Level = string; + // @public export type LicenseType = string; @@ -843,9 +1115,138 @@ export interface LinuxOSConfig { transparentHugePageEnabled?: string; } +// @public +export interface LoadBalancer extends ProxyResource { + allowServicePlacement?: boolean; + namePropertiesName?: string; + nodeSelector?: LabelSelector; + primaryAgentPoolName?: string; + readonly provisioningState?: string; + serviceLabelSelector?: LabelSelector; + serviceNamespaceSelector?: LabelSelector; +} + +// @public +export interface LoadBalancerListResult { + readonly nextLink?: string; + value?: LoadBalancer[]; +} + +// @public +export interface LoadBalancers { + beginDelete(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise, LoadBalancersDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersGetOptionalParams): Promise; + listByManagedCluster(resourceGroupName: string, resourceName: string, options?: LoadBalancersListByManagedClusterOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LoadBalancersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + allowServicePlacement?: boolean; + name?: string; + nodeSelector?: LabelSelector; + primaryAgentPoolName?: string; + serviceLabelSelector?: LabelSelector; + serviceNamespaceSelector?: LabelSelector; +} + +// @public +export type LoadBalancersCreateOrUpdateResponse = LoadBalancer; + +// @public +export interface LoadBalancersDeleteHeaders { + location?: string; +} + +// @public +export interface LoadBalancersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LoadBalancersDeleteResponse = LoadBalancersDeleteHeaders; + +// @public +export interface LoadBalancersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersGetResponse = LoadBalancer; + // @public export type LoadBalancerSku = string; +// @public +export interface LoadBalancersListByManagedClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersListByManagedClusterNextResponse = LoadBalancerListResult; + +// @public +export interface LoadBalancersListByManagedClusterOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersListByManagedClusterResponse = LoadBalancerListResult; + +// @public +export interface Machine extends SubResource { + readonly properties?: MachineProperties; +} + +// @public +export interface MachineIpAddress { + readonly family?: IpFamily; + readonly ip?: string; +} + +// @public +export interface MachineListResult { + readonly nextLink?: string; + value?: Machine[]; +} + +// @public +export interface MachineNetworkProperties { + readonly ipAddresses?: MachineIpAddress[]; +} + +// @public +export interface MachineProperties { + readonly network?: MachineNetworkProperties; + readonly resourceId?: string; +} + +// @public +export interface Machines { + get(resourceGroupName: string, resourceName: string, agentPoolName: string, machineName: string, options?: MachinesGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: MachinesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MachinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesGetResponse = Machine; + +// @public +export interface MachinesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListNextResponse = MachineListResult; + +// @public +export interface MachinesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListResponse = MachineListResult; + // @public export interface MaintenanceConfiguration extends SubResource { maintenanceWindow?: MaintenanceWindow; @@ -917,17 +1318,22 @@ export interface ManagedCluster extends TrackedResource { [propertyName: string]: ManagedClusterAddonProfile; }; agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; + aiToolchainOperatorProfile?: ManagedClusterAIToolchainOperatorProfile; apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; azureMonitorProfile?: ManagedClusterAzureMonitorProfile; readonly azurePortalFqdn?: string; + bootstrapProfile?: ManagedClusterBootstrapProfile; + creationData?: CreationData; readonly currentKubernetesVersion?: string; disableLocalAccounts?: boolean; diskEncryptionSetID?: string; dnsPrefix?: string; + enableNamespaceResources?: boolean; enablePodSecurityPolicy?: boolean; enableRbac?: boolean; + readonly eTag?: string; extendedLocation?: ExtendedLocation; readonly fqdn?: string; fqdnSubdomain?: string; @@ -937,12 +1343,15 @@ export interface ManagedCluster extends TrackedResource { [propertyName: string]: UserAssignedIdentity; }; ingressProfile?: ManagedClusterIngressProfile; + kind?: string; kubernetesVersion?: string; linuxProfile?: ContainerServiceLinuxProfile; readonly maxAgentPools?: number; metricsProfile?: ManagedClusterMetricsProfile; networkProfile?: ContainerServiceNetworkProfile; + nodeProvisioningProfile?: ManagedClusterNodeProvisioningProfile; nodeResourceGroup?: string; + nodeResourceGroupProfile?: ManagedClusterNodeResourceGroupProfile; oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; podIdentityProfile?: ManagedClusterPodIdentityProfile; readonly powerState?: PowerState; @@ -951,6 +1360,7 @@ export interface ManagedCluster extends TrackedResource { readonly provisioningState?: string; publicNetworkAccess?: PublicNetworkAccess; readonly resourceUID?: string; + safeguardsProfile?: SafeguardsProfile; securityProfile?: ManagedClusterSecurityProfile; serviceMeshProfile?: ServiceMeshProfile; servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; @@ -998,27 +1408,34 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; availabilityZones?: string[]; capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; enableUltraSSD?: boolean; + readonly eTag?: string; + gatewayProfile?: AgentPoolGatewayProfile; gpuInstanceProfile?: GPUInstanceProfile; + gpuProfile?: AgentPoolGPUProfile; hostGroupID?: string; kubeletConfig?: KubeletConfig; kubeletDiskType?: KubeletDiskType; linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; + nodeInitializationTaints?: string[]; nodeLabels?: { [propertyName: string]: string; }; @@ -1029,6 +1446,7 @@ export interface ManagedClusterAgentPoolProfileProperties { osDiskType?: OSDiskType; osSKU?: Ossku; osType?: OSType; + podIPAllocationMode?: PodIPAllocationMode; podSubnetID?: string; powerState?: PowerState; readonly provisioningState?: string; @@ -1036,25 +1454,35 @@ export interface ManagedClusterAgentPoolProfileProperties { scaleDownMode?: ScaleDownMode; scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; scaleSetPriority?: ScaleSetPriority; + securityProfile?: AgentPoolSecurityProfile; spotMaxPrice?: number; tags?: { [propertyName: string]: string; }; type?: AgentPoolType; upgradeSettings?: AgentPoolUpgradeSettings; + virtualMachineNodesStatus?: VirtualMachineNodes[]; + virtualMachinesProfile?: VirtualMachinesProfile; vmSize?: string; vnetSubnetID?: string; windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } +// @public +export interface ManagedClusterAIToolchainOperatorProfile { + enabled?: boolean; +} + // @public export interface ManagedClusterAPIServerAccessProfile { authorizedIPRanges?: string[]; disableRunCommand?: boolean; enablePrivateCluster?: boolean; enablePrivateClusterPublicFqdn?: boolean; + enableVnetIntegration?: boolean; privateDNSZone?: string; + subnetId?: string; } // @public @@ -1065,9 +1493,44 @@ export interface ManagedClusterAutoUpgradeProfile { // @public export interface ManagedClusterAzureMonitorProfile { + appMonitoring?: ManagedClusterAzureMonitorProfileAppMonitoring; + containerInsights?: ManagedClusterAzureMonitorProfileContainerInsights; metrics?: ManagedClusterAzureMonitorProfileMetrics; } +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoring { + autoInstrumentation?: ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; + openTelemetryLogs?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; + openTelemetryMetrics?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation { + enabled?: boolean; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs { + enabled?: boolean; + port?: number; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics { + enabled?: boolean; + port?: number; +} + +// @public +export interface ManagedClusterAzureMonitorProfileContainerInsights { + disableCustomMetrics?: boolean; + disablePrometheusMetricsScraping?: boolean; + enabled?: boolean; + logAnalyticsWorkspaceResourceId?: string; + syslogPort?: number; +} + // @public export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { metricAnnotationsAllowList?: string; @@ -1080,6 +1543,12 @@ export interface ManagedClusterAzureMonitorProfileMetrics { kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; } +// @public +export interface ManagedClusterBootstrapProfile { + artifactSource?: ArtifactSource; + containerRegistryId?: string; +} + // @public export interface ManagedClusterCostAnalysis { enabled?: boolean; @@ -1087,6 +1556,7 @@ export interface ManagedClusterCostAnalysis { // @public export interface ManagedClusterHttpProxyConfig { + readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1128,6 +1598,7 @@ export interface ManagedClusterListResult { export interface ManagedClusterLoadBalancerProfile { allocatedOutboundPorts?: number; backendPoolType?: BackendPoolType; + clusterServiceLoadBalancerHealthProbeMode?: ClusterServiceLoadBalancerHealthProbeMode; effectiveOutboundIPs?: ResourceReference[]; enableMultipleStandardLoadBalancers?: boolean; idleTimeoutInMinutes?: number; @@ -1169,6 +1640,16 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } +// @public (undocumented) +export interface ManagedClusterNodeProvisioningProfile { + mode?: NodeProvisioningMode; +} + +// @public +export interface ManagedClusterNodeResourceGroupProfile { + restrictionLevel?: RestrictionLevel; +} + // @public export interface ManagedClusterOidcIssuerProfile { enabled?: boolean; @@ -1225,6 +1706,7 @@ export type ManagedClusterPodIdentityProvisioningState = string; // @public export interface ManagedClusterPoolUpgradeProfile { + componentsByReleases?: ComponentsByRelease[]; kubernetesVersion: string; name?: string; osType: OSType; @@ -1240,7 +1722,10 @@ export interface ManagedClusterPoolUpgradeProfileUpgradesItem { // @public export interface ManagedClusterPropertiesAutoScalerProfile { balanceSimilarNodeGroups?: string; + daemonsetEvictionForEmptyNodes?: boolean; + daemonsetEvictionForOccupiedNodes?: boolean; expander?: Expander; + ignoreDaemonsetsUtilization?: boolean; maxEmptyBulkDelete?: string; maxGracefulTerminationSec?: string; maxNodeProvisionTime?: string; @@ -1258,6 +1743,14 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } +// @public +export interface ManagedClusterPropertiesForSnapshot { + enableRbac?: boolean; + kubernetesVersion?: string; + readonly networkProfile?: NetworkProfileForSnapshot; + sku?: ManagedClusterSKU; +} + // @public export interface ManagedClusters { beginAbortLatestOperation(resourceGroupName: string, resourceName: string, options?: ManagedClustersAbortLatestOperationOptionalParams): Promise, ManagedClustersAbortLatestOperationResponse>>; @@ -1266,6 +1759,8 @@ export interface ManagedClusters { beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise, ManagedClustersDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise; + beginRebalanceLoadBalancers(resourceGroupName: string, resourceName: string, parameters: RebalanceLoadBalancersRequestBody, options?: ManagedClustersRebalanceLoadBalancersOptionalParams): Promise, ManagedClustersRebalanceLoadBalancersResponse>>; + beginRebalanceLoadBalancersAndWait(resourceGroupName: string, resourceName: string, parameters: RebalanceLoadBalancersRequestBody, options?: ManagedClustersRebalanceLoadBalancersOptionalParams): Promise; beginResetAADProfile(resourceGroupName: string, resourceName: string, parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams): Promise, void>>; beginResetAADProfileAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams): Promise; beginResetServicePrincipalProfile(resourceGroupName: string, resourceName: string, parameters: ManagedClusterServicePrincipalProfile, options?: ManagedClustersResetServicePrincipalProfileOptionalParams): Promise, void>>; @@ -1285,19 +1780,23 @@ export interface ManagedClusters { get(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetOptionalParams): Promise; getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options?: ManagedClustersGetAccessProfileOptionalParams): Promise; getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options?: ManagedClustersGetCommandResultOptionalParams): Promise; + getGuardrailsVersions(location: string, version: string, options?: ManagedClustersGetGuardrailsVersionsOptionalParams): Promise; getMeshRevisionProfile(location: string, mode: string, options?: ManagedClustersGetMeshRevisionProfileOptionalParams): Promise; getMeshUpgradeProfile(resourceGroupName: string, resourceName: string, mode: string, options?: ManagedClustersGetMeshUpgradeProfileOptionalParams): Promise; getOSOptions(location: string, options?: ManagedClustersGetOSOptionsOptionalParams): Promise; + getSafeguardsVersions(location: string, version: string, options?: ManagedClustersGetSafeguardsVersionsOptionalParams): Promise; getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetUpgradeProfileOptionalParams): Promise; list(options?: ManagedClustersListOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: ManagedClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listClusterAdminCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterAdminCredentialsOptionalParams): Promise; listClusterMonitoringUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterMonitoringUserCredentialsOptionalParams): Promise; listClusterUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterUserCredentialsOptionalParams): Promise; + listGuardrailsVersions(location: string, options?: ManagedClustersListGuardrailsVersionsOptionalParams): PagedAsyncIterableIterator; listKubernetesVersions(location: string, options?: ManagedClustersListKubernetesVersionsOptionalParams): Promise; listMeshRevisionProfiles(location: string, options?: ManagedClustersListMeshRevisionProfilesOptionalParams): PagedAsyncIterableIterator; listMeshUpgradeProfiles(resourceGroupName: string, resourceName: string, options?: ManagedClustersListMeshUpgradeProfilesOptionalParams): PagedAsyncIterableIterator; listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; + listSafeguardsVersions(location: string, options?: ManagedClustersListSafeguardsVersionsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1317,6 +1816,8 @@ export type ManagedClustersAbortLatestOperationResponse = ManagedClustersAbortLa // @public export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1331,6 +1832,8 @@ export interface ManagedClustersDeleteHeaders { // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1341,8 +1844,11 @@ export type ManagedClustersDeleteResponse = ManagedClustersDeleteHeaders; // @public export interface ManagedClusterSecurityProfile { azureKeyVaultKms?: AzureKeyVaultKms; + customCATrustCertificates?: Uint8Array[]; defender?: ManagedClusterSecurityProfileDefender; imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } @@ -1363,6 +1869,16 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +// @public +export interface ManagedClusterSecurityProfileImageIntegrity { + enabled?: boolean; +} + +// @public +export interface ManagedClusterSecurityProfileNodeRestriction { + enabled?: boolean; +} + // @public export interface ManagedClusterSecurityProfileWorkloadIdentity { enabled?: boolean; @@ -1393,6 +1909,13 @@ export interface ManagedClustersGetCommandResultOptionalParams extends coreClien // @public export type ManagedClustersGetCommandResultResponse = RunCommandResult; +// @public +export interface ManagedClustersGetGuardrailsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetGuardrailsVersionsResponse = GuardrailsAvailableVersion; + // @public export interface ManagedClustersGetMeshRevisionProfileOptionalParams extends coreClient.OperationOptions { } @@ -1422,6 +1945,13 @@ export type ManagedClustersGetOSOptionsResponse = OSOptionProfile; // @public export type ManagedClustersGetResponse = ManagedCluster; +// @public +export interface ManagedClustersGetSafeguardsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetSafeguardsVersionsResponse = SafeguardsAvailableVersion; + // @public export interface ManagedClustersGetUpgradeProfileOptionalParams extends coreClient.OperationOptions { } @@ -1480,6 +2010,20 @@ export interface ManagedClustersListClusterUserCredentialsOptionalParams extends // @public export type ManagedClustersListClusterUserCredentialsResponse = CredentialResults; +// @public +export interface ManagedClustersListGuardrailsVersionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListGuardrailsVersionsNextResponse = GuardrailsAvailableVersionsList; + +// @public +export interface ManagedClustersListGuardrailsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListGuardrailsVersionsResponse = GuardrailsAvailableVersionsList; + // @public export interface ManagedClustersListKubernetesVersionsOptionalParams extends coreClient.OperationOptions { } @@ -1543,6 +2087,110 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; +// @public +export interface ManagedClustersListSafeguardsVersionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListSafeguardsVersionsNextResponse = SafeguardsAvailableVersionsList; + +// @public +export interface ManagedClustersListSafeguardsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListSafeguardsVersionsResponse = SafeguardsAvailableVersionsList; + +// @public +export interface ManagedClusterSnapshot extends TrackedResource { + creationData?: CreationData; + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; + snapshotType?: SnapshotType; +} + +// @public +export interface ManagedClusterSnapshotListResult { + readonly nextLink?: string; + value?: ManagedClusterSnapshot[]; +} + +// @public +export interface ManagedClusterSnapshots { + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedClusterSnapshot, options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsGetOptionalParams): Promise; + list(options?: ManagedClusterSnapshotsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, resourceName: string, parameters: TagsObject, options?: ManagedClusterSnapshotsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsCreateOrUpdateResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedClusterSnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClustersRebalanceLoadBalancersHeaders { + location?: string; +} + +// @public +export interface ManagedClustersRebalanceLoadBalancersOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedClustersRebalanceLoadBalancersResponse = ManagedClustersRebalanceLoadBalancersHeaders; + // @public export interface ManagedClustersResetAADProfileHeaders { location?: string; @@ -1581,7 +2229,6 @@ export type ManagedClustersRotateClusterCertificatesResponse = ManagedClustersRo // @public export interface ManagedClustersRotateServiceAccountSigningKeysHeaders { - // (undocumented) location?: string; } @@ -1636,6 +2283,11 @@ export interface ManagedClustersStopOptionalParams extends coreClient.OperationO // @public export type ManagedClustersStopResponse = ManagedClustersStopHeaders; +// @public +export interface ManagedClusterStaticEgressGatewayProfile { + enabled?: boolean; +} + // @public export interface ManagedClusterStorageProfile { blobCSIDriver?: ManagedClusterStorageProfileBlobCSIDriver; @@ -1652,6 +2304,7 @@ export interface ManagedClusterStorageProfileBlobCSIDriver { // @public export interface ManagedClusterStorageProfileDiskCSIDriver { enabled?: boolean; + version?: string; } // @public @@ -1666,6 +2319,7 @@ export interface ManagedClusterStorageProfileSnapshotController { // @public export interface ManagedClustersUpdateTagsOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1694,6 +2348,7 @@ export interface ManagedClusterWindowsProfile { // @public export interface ManagedClusterWorkloadAutoScalerProfile { keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + // (undocumented) verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } @@ -1702,8 +2357,9 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } -// @public +// @public (undocumented) export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + addonAutoscaling?: AddonAutoscaling; enabled: boolean; } @@ -1713,6 +2369,12 @@ export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly principalId?: string; } +// @public +export interface ManualScaleProfile { + count?: number; + sizes?: string[]; +} + // @public export interface MeshRevision { compatibleWith?: CompatibleVersions[]; @@ -1752,6 +2414,9 @@ export interface MeshUpgradeProfileList { export interface MeshUpgradeProfileProperties extends MeshRevision { } +// @public +export type Mode = string; + // @public export type NetworkDataplane = string; @@ -1767,9 +2432,21 @@ export type NetworkPluginMode = string; // @public export type NetworkPolicy = string; +// @public +export interface NetworkProfileForSnapshot { + loadBalancerSku?: LoadBalancerSku; + networkMode?: NetworkMode; + networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; + networkPolicy?: NetworkPolicy; +} + // @public export type NodeOSUpgradeChannel = string; +// @public +export type NodeProvisioningMode = string; + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -1787,6 +2464,60 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationListResult; +// @public +export interface OperationStatusResult { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: OperationStatusResult[]; + percentComplete?: number; + readonly resourceId?: string; + startTime?: Date; + status: string; +} + +// @public +export interface OperationStatusResultGetByAgentPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultGetByAgentPoolResponse = OperationStatusResult; + +// @public +export interface OperationStatusResultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultGetResponse = OperationStatusResult; + +// @public +export interface OperationStatusResultList { + readonly nextLink?: string; + readonly value?: OperationStatusResult[]; +} + +// @public +export interface OperationStatusResultListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultListNextResponse = OperationStatusResultList; + +// @public +export interface OperationStatusResultListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultListResponse = OperationStatusResultList; + +// @public +export interface OperationStatusResultOperations { + get(resourceGroupName: string, resourceName: string, operationId: string, options?: OperationStatusResultGetOptionalParams): Promise; + getByAgentPool(resourceGroupName: string, resourceName: string, agentPoolName: string, operationId: string, options?: OperationStatusResultGetByAgentPoolOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: OperationStatusResultListOptionalParams): PagedAsyncIterableIterator; +} + // @public export interface OperationValue { readonly description?: string; @@ -1797,6 +2528,9 @@ export interface OperationValue { readonly resource?: string; } +// @public +export type Operator = string; + // @public export type OSDiskType = string; @@ -1835,6 +2569,12 @@ export interface OutboundEnvironmentEndpointCollection { // @public export type OutboundType = string; +// @public +export type PodIPAllocationMode = string; + +// @public +export type PodLinkLocalAccess = string; + // @public export interface PortRange { portEnd?: number; @@ -1949,6 +2689,11 @@ export interface ProxyResource extends Resource { // @public export type PublicNetworkAccess = string; +// @public +export interface RebalanceLoadBalancersRequestBody { + loadBalancerNames?: string[]; +} + // @public export interface RelativeMonthlySchedule { dayOfWeek: WeekDay; @@ -1984,6 +2729,9 @@ export interface ResourceReference { id?: string; } +// @public +export type RestrictionLevel = string; + // @public export interface RunCommandRequest { clusterToken?: string; @@ -2002,9 +2750,43 @@ export interface RunCommandResult { readonly startedAt?: Date; } +// @public +export interface SafeguardsAvailableVersion extends Resource { + properties: SafeguardsAvailableVersionsProperties; +} + +// @public +export interface SafeguardsAvailableVersionsList { + readonly nextLink?: string; + value?: SafeguardsAvailableVersion[]; +} + +// @public +export interface SafeguardsAvailableVersionsProperties { + readonly isDefaultVersion?: boolean; + readonly support?: SafeguardsSupport; +} + +// @public +export interface SafeguardsProfile { + excludedNamespaces?: string[]; + level: Level; + readonly systemExcludedNamespaces?: string[]; + version?: string; +} + +// @public +export type SafeguardsSupport = string; + // @public export type ScaleDownMode = string; +// @public +export interface ScaleProfile { + autoscale?: AutoScaleProfile[]; + manual?: ManualScaleProfile[]; +} + // @public export type ScaleSetEvictionPolicy = string; @@ -2302,6 +3084,9 @@ export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; // @public export type Type = string; +// @public +export type UndrainableNodeBehavior = string; + // @public export type UpgradeChannel = string; @@ -2318,6 +3103,17 @@ export interface UserAssignedIdentity { resourceId?: string; } +// @public +export interface VirtualMachineNodes { + count?: number; + size?: string; +} + +// @public +export interface VirtualMachinesProfile { + scale?: ScaleProfile; +} + // @public export type WeekDay = string; diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts index 7e4bb689cb5..4b542c97da2 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsAbortOperation.json + * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAbortOperation.json */ async function abortOperationOnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts index 363ff526543..a848a5a393a 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts @@ -18,45 +18,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAssociate_CRG.json */ -async function createAgentPoolUsingAnAgentPoolSnapshot() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const agentPoolName = "agentpool1"; - const parameters: AgentPool = { - count: 3, - creationData: { - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - }, - enableFips: true, - orchestratorVersion: "", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - agentPoolName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. - * - * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_CRG.json - */ -async function createAgentPoolWithCapacityReservationGroup() { +async function associateAgentPoolWithCapacityReservationGroup() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -87,7 +51,75 @@ async function createAgentPoolWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Snapshot.json + */ +async function createAgentPoolUsingAnAgentPoolSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + }, + enableFips: true, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json + */ +async function createAgentPoolWithCustomCaTrustEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + enableCustomCATrust: true, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json */ async function createAgentPoolWithDedicatedHostGroup() { const subscriptionId = @@ -120,7 +152,7 @@ async function createAgentPoolWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json */ async function createAgentPoolWithEncryptionAtHostEnabled() { const subscriptionId = @@ -152,7 +184,7 @@ async function createAgentPoolWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Ephemeral.json */ async function createAgentPoolWithEphemeralOSDisk() { const subscriptionId = @@ -185,7 +217,7 @@ async function createAgentPoolWithEphemeralOSDisk() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableFIPS.json */ async function createAgentPoolWithFipsEnabledOS() { const subscriptionId = @@ -217,7 +249,7 @@ async function createAgentPoolWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_GPUMIG.json */ async function createAgentPoolWithGpumig() { const subscriptionId = @@ -270,7 +302,7 @@ async function createAgentPoolWithGpumig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WasmWasi.json */ async function createAgentPoolWithKrustletAndTheWasiRuntime() { const subscriptionId = @@ -304,7 +336,7 @@ async function createAgentPoolWithKrustletAndTheWasiRuntime() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json */ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { const subscriptionId = @@ -356,7 +388,41 @@ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json + */ +async function createAgentPoolWithMessageOfTheDay() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + messageOfTheDay: "Zm9vCg==", + mode: "User", + orchestratorVersion: "", + osDiskSizeGB: 64, + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_OSSKU.json */ async function createAgentPoolWithOssku() { const subscriptionId = @@ -409,7 +475,7 @@ async function createAgentPoolWithOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_PPG.json */ async function createAgentPoolWithPpg() { const subscriptionId = @@ -442,7 +508,7 @@ async function createAgentPoolWithPpg() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json */ async function createAgentPoolWithUltraSsdEnabled() { const subscriptionId = @@ -474,7 +540,89 @@ async function createAgentPoolWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json + */ +async function createAgentPoolWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.9.6", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + manual: [{ count: 5, sizes: ["Standard_D2_v2", "Standard_D2_v3"] }], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + */ +async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.29.0", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + autoscale: [ + { + maxCount: 5, + minCount: 1, + sizes: ["Standard_D2_v2", "Standard_D2_v3"], + }, + ], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json */ async function createAgentPoolWithWindowsOssku() { const subscriptionId = @@ -506,7 +654,7 @@ async function createAgentPoolWithWindowsOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Spot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Spot.json */ async function createSpotAgentPool() { const subscriptionId = @@ -542,7 +690,7 @@ async function createSpotAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ async function createWindowsAgentPoolWithDisablingOutboundNat() { const subscriptionId = @@ -575,7 +723,7 @@ async function createWindowsAgentPoolWithDisablingOutboundNat() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Update.json */ async function createOrUpdateAgentPool() { const subscriptionId = @@ -612,7 +760,7 @@ async function createOrUpdateAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Start.json */ async function startAgentPool() { const subscriptionId = @@ -638,7 +786,7 @@ async function startAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Stop.json */ async function stopAgentPool() { const subscriptionId = @@ -664,7 +812,7 @@ async function stopAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Update.json */ async function updateAgentPool() { const subscriptionId = @@ -698,8 +846,9 @@ async function updateAgentPool() { } async function main() { + associateAgentPoolWithCapacityReservationGroup(); createAgentPoolUsingAnAgentPoolSnapshot(); - createAgentPoolWithCapacityReservationGroup(); + createAgentPoolWithCustomCaTrustEnabled(); createAgentPoolWithDedicatedHostGroup(); createAgentPoolWithEncryptionAtHostEnabled(); createAgentPoolWithEphemeralOSDisk(); @@ -707,9 +856,12 @@ async function main() { createAgentPoolWithGpumig(); createAgentPoolWithKrustletAndTheWasiRuntime(); createAgentPoolWithKubeletConfigAndLinuxOSConfig(); + createAgentPoolWithMessageOfTheDay(); createAgentPoolWithOssku(); createAgentPoolWithPpg(); createAgentPoolWithUltraSsdEnabled(); + createAgentPoolWithVirtualMachinesPoolType(); + createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled(); createAgentPoolWithWindowsOssku(); createSpotAgentPool(); createWindowsAgentPoolWithDisablingOutboundNat(); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts new file mode 100644 index 00000000000..9dc109b094e --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + AgentPoolDeleteMachinesParameter, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes specific machines in an agent pool. + * + * @summary Deletes specific machines in an agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json + */ +async function deleteSpecificMachinesInAnAgentPool() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const machines: AgentPoolDeleteMachinesParameter = { + machineNames: [ + "aks-nodepool1-42263519-vmss00000a", + "aks-nodepool1-42263519-vmss00000b", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteMachinesAndWait( + resourceGroupName, + resourceName, + agentPoolName, + machines, + ); + console.log(result); +} + +async function main() { + deleteSpecificMachinesInAnAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts index 87d1eae8b0d..b14d114f9f5 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. * * @summary Deletes an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json */ async function deleteAgentPool() { const subscriptionId = @@ -38,8 +38,33 @@ async function deleteAgentPool() { console.log(result); } +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ +async function deleteAgentPoolByIgnoringPodDisruptionBudget() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + async function main() { deleteAgentPool(); + deleteAgentPoolByIgnoringPodDisruptionBudget(); } main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts index c45d57c36d1..05d9489f7bd 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. * * @summary See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json */ async function getAvailableVersionsForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts index b8c4428f46b..c5baca9cc49 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified managed cluster agent pool. * * @summary Gets the specified managed cluster agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGet.json */ async function getAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts index 57d406c33df..70aca87b139 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile for an agent pool. * * @summary Gets the upgrade profile for an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetUpgradeProfile.json */ async function getUpgradeProfileForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts index 84188ff4f6c..09ba7cdf458 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of agent pools in the specified managed cluster. * * @summary Gets a list of agent pools in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsList.json */ async function listAgentPoolsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts index 5c336689cb7..879adadac0b 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade * * @summary Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json */ async function upgradeAgentPoolNodeImageVersion() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts new file mode 100644 index 00000000000..3d6992ee028 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster. + * + * @summary Creates or updates a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json + */ +async function createOrUpdateALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + createOrUpdateALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts new file mode 100644 index 00000000000..019c8106b09 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a load balancer in the specified managed cluster. + * + * @summary Deletes a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json + */ +async function deleteALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.beginDeleteAndWait( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + deleteALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts similarity index 71% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts index 87d1eae8b0d..e823053da3a 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts @@ -15,31 +15,31 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * This sample demonstrates how to Gets the specified load balancer. * - * @summary Deletes an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsDelete.json + * @summary Gets the specified load balancer. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json */ -async function deleteAgentPool() { +async function getLoadBalancer() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; - const agentPoolName = "agentpool1"; + const loadBalancerName = "kubernetes"; const credential = new DefaultAzureCredential(); const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( + const result = await client.loadBalancers.get( resourceGroupName, resourceName, - agentPoolName, + loadBalancerName, ); console.log(result); } async function main() { - deleteAgentPool(); + getLoadBalancer(); } main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts new file mode 100644 index 00000000000..ad5bda7e833 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of load balancers in the specified managed cluster. + * + * @summary Gets a list of load balancers in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json + */ +async function listLoadBalancersByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.loadBalancers.listByManagedCluster( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLoadBalancersByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts new file mode 100644 index 00000000000..3f96b8fefde --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get a specific machine in the specified agent pool. + * + * @summary Get a specific machine in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineGet.json + */ +async function getAMachineInAnAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const machineName = "aks-nodepool1-42263519-vmss00000t"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.machines.get( + resourceGroupName, + resourceName, + agentPoolName, + machineName, + ); + console.log(result); +} + +async function main() { + getAMachineInAnAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts new file mode 100644 index 00000000000..77e47342fc0 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of machines in the specified agent pool. + * + * @summary Gets a list of machines in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json + */ +async function listMachinesInAnAgentpoolByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.machines.list( + resourceGroupName, + resourceName, + agentPoolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listMachinesInAnAgentpoolByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts index e3868e35987..3b5e6b02991 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update.json */ async function createOrUpdateMaintenanceConfiguration() { const subscriptionId = @@ -55,7 +55,7 @@ async function createOrUpdateMaintenanceConfiguration() { * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ async function createOrUpdateMaintenanceConfigurationWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts index ddbc1e49c62..57ae4f8acbf 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete.json */ async function deleteMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function deleteMaintenanceConfiguration() { * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ async function deleteMaintenanceConfigurationForNodeOSUpgrade() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts index a7466137bb2..c90e77ae08a 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet.json */ async function getMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function getMaintenanceConfiguration() { * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json */ async function getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts index 38350e136ee..bd5b5faf309 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList.json */ async function listMaintenanceConfigurationsByManagedCluster() { const subscriptionId = @@ -43,7 +43,7 @@ async function listMaintenanceConfigurationsByManagedCluster() { * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json */ async function listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts new file mode 100644 index 00000000000..abe6d19c5c6 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + ManagedClusterSnapshot, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a managed cluster snapshot. + * + * @summary Creates or updates a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json + */ +async function createOrUpdateManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: ManagedClusterSnapshot = { + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1", + }, + location: "westus", + tags: { key1: "val1", key2: "val2" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.createOrUpdate( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts new file mode 100644 index 00000000000..a744246ede6 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a managed cluster snapshot. + * + * @summary Deletes a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json + */ +async function deleteManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.delete( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + deleteManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts new file mode 100644 index 00000000000..21574707398 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a managed cluster snapshot. + * + * @summary Gets a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json + */ +async function getManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.get( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + getManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts new file mode 100644 index 00000000000..70d890aeef9 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group. + * + * @summary Lists managed cluster snapshots in the specified subscription and resource group. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json + */ +async function listManagedClusterSnapshotsByResourceGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshotsByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts new file mode 100644 index 00000000000..a0a1a9e1de3 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription. + * + * @summary Gets a list of managed cluster snapshots in the specified subscription. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json + */ +async function listManagedClusterSnapshots() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshots(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts new file mode 100644 index 00000000000..4d8282b44ef --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsObject, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates tags on a managed cluster snapshot. + * + * @summary Updates tags on a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json + */ +async function updateManagedClusterSnapshotTags() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: TagsObject = { tags: { key2: "new-val2", key3: "val3" } }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.updateTags( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + updateManagedClusterSnapshotTags(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts index c410ca894c5..d18439819b0 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersAbortOperation.json + * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAbortOperation.json */ async function abortOperationOnManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts index e173ede036c..ae042fe1a81 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts @@ -21,202 +21,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAssociate_CRG.json */ -async function createManagedClusterUsingAnAgentPoolSnapshot() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: {}, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - creationData: { - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - }, - enableFips: true, - enableNodePublicIP: true, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: false, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, - loadBalancerSku: "standard", - outboundType: "loadBalancer", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_ManagedNATGateway.json - */ -async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: {}, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - enableNodePublicIP: false, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: true, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerSku: "standard", - natGatewayProfile: { managedOutboundIPProfile: { count: 2 } }, - outboundType: "managedNATGateway", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json - */ -async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: { - azureKeyvaultSecretsProvider: { - config: { enableSecretRotation: "true", rotationPollInterval: "2m" }, - enabled: true, - }, - }, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - enableNodePublicIP: true, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: true, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, - loadBalancerSku: "standard", - outboundType: "loadBalancer", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_CRG.json - */ -async function createManagedClusterWithCapacityReservationGroup() { +async function associateManagedClusterWithCapacityReservationGroup() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -277,7 +84,377 @@ async function createManagedClusterWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_MCSnapshot.json + */ +async function createManagedClusterUsingAManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1", + }, + dnsPrefix: "dnsprefix1", + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Snapshot.json + */ +async function createManagedClusterUsingAnAgentPoolSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + }, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json + */ +async function createManagedClusterWithAiToolchainOperatorEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + aiToolchainOperatorProfile: { enabled: true }, + dnsPrefix: "dnsprefix1", + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json + */ +async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: false, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerSku: "standard", + natGatewayProfile: { managedOutboundIPProfile: { count: 2 } }, + outboundType: "managedNATGateway", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ +async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: { + azureKeyvaultSecretsProvider: { + config: { enableSecretRotation: "true", rotationPollInterval: "2m" }, + enabled: true, + }, + }, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json + */ +async function createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableCustomCATrust: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + securityProfile: { + customCATrustCertificates: [ + Buffer.from( + "ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=", + ), + ], + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json */ async function createManagedClusterWithDedicatedHostGroup() { const subscriptionId = @@ -302,7 +479,7 @@ async function createManagedClusterWithDedicatedHostGroup() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -339,7 +516,7 @@ async function createManagedClusterWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json */ async function createManagedClusterWithEncryptionAtHostEnabled() { const subscriptionId = @@ -364,7 +541,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -401,7 +578,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json */ async function createManagedClusterWithFipsEnabledOS() { const subscriptionId = @@ -426,7 +603,7 @@ async function createManagedClusterWithFipsEnabledOS() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -463,7 +640,7 @@ async function createManagedClusterWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_GPUMIG.json */ async function createManagedClusterWithGpumig() { const subscriptionId = @@ -488,7 +665,7 @@ async function createManagedClusterWithGpumig() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -531,7 +708,7 @@ async function createManagedClusterWithGpumig() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_HTTPProxy.json */ async function createManagedClusterWithHttpProxyConfigured() { const subscriptionId = @@ -555,7 +732,7 @@ async function createManagedClusterWithHttpProxyConfigured() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -598,7 +775,7 @@ async function createManagedClusterWithHttpProxyConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Premium.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Premium.json */ async function createManagedClusterWithLongTermSupport() { const subscriptionId = @@ -660,7 +837,64 @@ async function createManagedClusterWithLongTermSupport() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json + */ +async function createManagedClusterWithNodeAutoProvisioning() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json */ async function createManagedClusterWithNodePublicIPPrefix() { const subscriptionId = @@ -686,7 +920,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -723,7 +957,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_OSSKU.json */ async function createManagedClusterWithOssku() { const subscriptionId = @@ -748,7 +982,7 @@ async function createManagedClusterWithOssku() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -791,7 +1025,7 @@ async function createManagedClusterWithOssku() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PPG.json */ async function createManagedClusterWithPpg() { const subscriptionId = @@ -817,7 +1051,7 @@ async function createManagedClusterWithPpg() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -854,7 +1088,7 @@ async function createManagedClusterWithPpg() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PodIdentity.json */ async function createManagedClusterWithPodIdentityEnabled() { const subscriptionId = @@ -878,7 +1112,7 @@ async function createManagedClusterWithPodIdentityEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -916,7 +1150,7 @@ async function createManagedClusterWithPodIdentityEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json */ async function createManagedClusterWithRunCommandDisabled() { const subscriptionId = @@ -977,7 +1211,7 @@ async function createManagedClusterWithRunCommandDisabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_SecurityProfile.json */ async function createManagedClusterWithSecurityProfileConfigured() { const subscriptionId = @@ -1016,7 +1250,6 @@ async function createManagedClusterWithSecurityProfileConfigured() { "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", securityMonitoring: { enabled: true }, }, - workloadIdentity: { enabled: true }, }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -1035,7 +1268,7 @@ async function createManagedClusterWithSecurityProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json */ async function createManagedClusterWithUltraSsdEnabled() { const subscriptionId = @@ -1060,7 +1293,7 @@ async function createManagedClusterWithUltraSsdEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1097,7 +1330,63 @@ async function createManagedClusterWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_VirtualMachines.json + */ +async function createManagedClusterWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachines", + count: 3, + enableFips: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { const subscriptionId = @@ -1155,7 +1444,7 @@ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json */ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { const subscriptionId = @@ -1179,7 +1468,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1215,7 +1504,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ async function createManagedPrivateClusterWithPublicFqdnSpecified() { const subscriptionId = @@ -1279,7 +1568,7 @@ async function createManagedPrivateClusterWithPublicFqdnSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { const subscriptionId = @@ -1344,7 +1633,7 @@ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { const subscriptionId = @@ -1370,7 +1659,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1407,7 +1696,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Update.json */ async function createOrUpdateManagedCluster() { const subscriptionId = @@ -1441,14 +1730,14 @@ async function createOrUpdateManagedCluster() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1468,7 +1757,7 @@ async function createOrUpdateManagedCluster() { tags: { archv2: "", tier: "production" }, upgradeSettings: { overrideSettings: { - forceUpgrade: false, + forceUpgrade: true, until: new Date("2022-11-01T13:00:00Z"), }, }, @@ -1491,7 +1780,7 @@ async function createOrUpdateManagedCluster() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json */ async function createOrUpdateManagedClusterWithAzureServiceMesh() { const subscriptionId = @@ -1520,7 +1809,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1576,7 +1865,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json */ async function createOrUpdateManagedClusterWithEnableAhub() { const subscriptionId = @@ -1601,14 +1890,14 @@ async function createOrUpdateManagedClusterWithEnableAhub() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1646,7 +1935,70 @@ async function createOrUpdateManagedClusterWithEnableAhub() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json + */ +async function createOrUpdateManagedClusterWithEnableNamespaceResources() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + availabilityZones: ["1", "2", "3"], + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS1_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enableNamespaceResources: true, + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json */ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { const subscriptionId = @@ -1671,14 +2023,14 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1716,7 +2068,7 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json */ async function createOrUpdateManagedClusterWithDualStackNetworking() { const subscriptionId = @@ -1750,14 +2102,14 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1792,16 +2144,20 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { } async function main() { + associateManagedClusterWithCapacityReservationGroup(); + createManagedClusterUsingAManagedClusterSnapshot(); createManagedClusterUsingAnAgentPoolSnapshot(); + createManagedClusterWithAiToolchainOperatorEnabled(); createManagedClusterWithAksManagedNatGatewayAsOutboundType(); createManagedClusterWithAzureKeyVaultSecretsProviderAddon(); - createManagedClusterWithCapacityReservationGroup(); + createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled(); createManagedClusterWithDedicatedHostGroup(); createManagedClusterWithEncryptionAtHostEnabled(); createManagedClusterWithFipsEnabledOS(); createManagedClusterWithGpumig(); createManagedClusterWithHttpProxyConfigured(); createManagedClusterWithLongTermSupport(); + createManagedClusterWithNodeAutoProvisioning(); createManagedClusterWithNodePublicIPPrefix(); createManagedClusterWithOssku(); createManagedClusterWithPpg(); @@ -1809,6 +2165,7 @@ async function main() { createManagedClusterWithRunCommandDisabled(); createManagedClusterWithSecurityProfileConfigured(); createManagedClusterWithUltraSsdEnabled(); + createManagedClusterWithVirtualMachinesPoolType(); createManagedClusterWithWebAppRoutingIngressProfileConfigured(); createManagedClusterWithUserAssignedNatGatewayAsOutboundType(); createManagedPrivateClusterWithPublicFqdnSpecified(); @@ -1817,6 +2174,7 @@ async function main() { createOrUpdateManagedCluster(); createOrUpdateManagedClusterWithAzureServiceMesh(); createOrUpdateManagedClusterWithEnableAhub(); + createOrUpdateManagedClusterWithEnableNamespaceResources(); createOrUpdateManagedClusterWithWindowsGMsaEnabled(); createOrUpdateManagedClusterWithDualStackNetworking(); } diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts index f9997726b78..2cb4e4e73bd 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a managed cluster. * * @summary Deletes a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersDelete.json */ async function deleteManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts index 302016b6ca4..52a640e0691 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . * * @summary **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetAccessProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetAccessProfile.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts index e9176c96200..0bc690bc2c1 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultFailed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultFailed.json */ async function commandFailedResult() { const subscriptionId = @@ -42,7 +42,7 @@ async function commandFailedResult() { * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultSucceed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultSucceed.json */ async function commandSucceedResult() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts new file mode 100644 index 00000000000..c571a354609 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json + */ +async function getGuardrailsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getGuardrailsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getGuardrailsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts index ae7f8a46cf4..18f55fb4cbc 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json */ async function getAMeshRevisionProfileForAMeshMode() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts index 12f589d3afe..b59c4f3cad1 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets available upgrades for a service mesh in a cluster. * * @summary Gets available upgrades for a service mesh in a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json */ async function getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetOSOptionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetOSOptionsSample.ts index 595c0bb661a..6140d4067f2 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetOSOptionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetOSOptionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets supported OS options in the specified subscription. * * @summary Gets supported OS options in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ContainerServiceGetOSOptions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json */ async function getContainerServiceOSOptions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts new file mode 100644 index 00000000000..0e75cdd7e38 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json + */ +async function getSafeguardsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getSafeguardsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getSafeguardsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts index 60657bf9f06..e7d70d921e4 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a managed cluster. * * @summary Gets a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts index ce9f961e65a..b6925b65b67 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile of a managed cluster. * * @summary Gets the upgrade profile of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetUpgradeProfile.json */ async function getUpgradeProfileForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts index 7395f473101..ecf04e75b7f 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists managed clusters in the specified subscription and resource group. * * @summary Lists managed clusters in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListByResourceGroup.json */ async function getManagedClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts index 944d86f9798..beeccbbd40e 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the admin credentials of a managed cluster. * * @summary Lists the admin credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts index aa63a1ed1f8..31712b76b37 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the cluster monitoring user credentials of a managed cluster. * * @summary Lists the cluster monitoring user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts index 6ff69f25e32..70c8290b7d9 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the user credentials of a managed cluster. * * @summary Lists the user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts new file mode 100644 index 00000000000..fcf9933e83b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains list of Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListGuardrailsVersions.json + */ +async function listGuardrailsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listGuardrailsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGuardrailsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts index 48e43d3fdc6..5568d2ca41e 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version * * @summary Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/KubernetesVersions_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/KubernetesVersions_List.json */ async function listKubernetesVersions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts index d3172f3565a..7551e3f65bc 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json */ async function listMeshRevisionProfilesInALocation() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts index f5594e073dd..1927204be01 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available upgrades for all service meshes in a specific cluster. * * @summary Lists available upgrades for all service meshes in a specific cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json */ async function listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts index a914279fdde..1d3fdef78c6 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. * * @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json */ async function listOutboundNetworkDependenciesEndpointsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts new file mode 100644 index 00000000000..423105f6bfa --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains list of Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListSafeguardsVersions.json + */ +async function listSafeguardsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listSafeguardsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSafeguardsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts index 5e0f2e49232..50d1fe65cf7 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of managed clusters in the specified subscription. * * @summary Gets a list of managed clusters in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts new file mode 100644 index 00000000000..5e8bd533a7f --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RebalanceLoadBalancersRequestBody, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Rebalance nodes across specific load balancers. + * + * @summary Rebalance nodes across specific load balancers. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Rebalance.json + */ +async function listAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: RebalanceLoadBalancersRequestBody = { + loadBalancerNames: ["kubernetes"], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = + await client.managedClusters.beginRebalanceLoadBalancersAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + listAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts index 85ab2668657..13b369364f4 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @summary **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetAADProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetAADProfile.json */ async function resetAadProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts index 3d9bf0f7688..bf848a8d03b 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to This action cannot be performed on a cluster that is not using a service principal * * @summary This action cannot be performed on a cluster that is not using a service principal - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json */ async function resetServicePrincipalProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts index 0a055896bf2..da84b8c1449 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. * * @summary See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateClusterCertificates.json */ async function rotateClusterCertificates() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts index 5dfb252e589..3dfa7c3b18b 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Rotates the service account signing keys of a managed cluster. * * @summary Rotates the service account signing keys of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json */ async function rotateClusterServiceAccountSigningKeys() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts index 39edfb2531c..d7a6d0b62ab 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @summary AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandRequest.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandRequest.json */ async function submitNewCommand() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts index eebb13eed2d..5b13ff2d416 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. * * @summary See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStart.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStart.json */ async function startManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts index 76aa27bba4f..d9b54c74b68 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. * * @summary This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStop.json */ async function stopManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts index 685fd1cfd28..dbc89941046 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a managed cluster. * * @summary Updates tags on a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersUpdateTags.json */ async function updateManagedClusterTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts new file mode 100644 index 00000000000..8a734d59d90 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified agent pool. + * + * @summary Get the status of a specific operation in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGetByAgentPool.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.getByAgentPool( + resourceGroupName, + resourceName, + agentPoolName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts new file mode 100644 index 00000000000..1e3b29abbed --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified managed cluster. + * + * @summary Get the status of a specific operation in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGet.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.get( + resourceGroupName, + resourceName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts new file mode 100644 index 00000000000..c7b6065ddc2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of operations in the specified managedCluster + * + * @summary Gets a list of operations in the specified managedCluster + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultList.json + */ +async function listOfOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationStatusResultOperations.list( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOfOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts index 8d60588421d..752125e7633 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of operations. * * @summary Gets a list of operations. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/Operation_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/Operation_List.json */ async function listAvailableOperationsForTheContainerServiceResourceProvider() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts index a32c8f41e78..5b4a5353e65 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts index cffc3207864..f29c79937fa 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts index e6f1590d102..eb71dc16998 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts index 5691e0d46d3..00cce910492 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts index 00ff4b67b82..ab4a8144d84 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts index 6d756e4ca28..4bc763e050f 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts index 4680ba688c3..06852294d6f 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts index 646390d9737..fdf98652ce2 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts index 34e9b9bede8..a82f5303571 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts index 8e8dce7809b..aa435810fa9 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts index 203223d05e6..1c54045f95e 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts index 33d12a910cb..6d693fc285c 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts index 7929d444a8a..64a54f274c9 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts index 2f2fff560af..ce2e130d32d 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts index 007aba8b3c7..99698f02a53 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts index d4ab636316a..7fdd0e7a3a7 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts index 841fff32450..b418b3d9889 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/README.md b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/README.md similarity index 55% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/README.md rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/README.md index 60c34239750..59322988788 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/README.md +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/README.md @@ -1,66 +1,87 @@ -# client library samples for JavaScript +# 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** | -| --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsAbortLatestOperationSample.js][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsAbortOperation.json | -| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Snapshot.json | -| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsDelete.json | -| [agentPoolsGetAvailableAgentPoolVersionsSample.js][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json | -| [agentPoolsGetSample.js][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGet.json | -| [agentPoolsGetUpgradeProfileSample.js][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetUpgradeProfile.json | -| [agentPoolsListSample.js][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsList.json | -| [agentPoolsUpgradeNodeImageVersionSample.js][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsUpgradeNodeImageVersion.json | -| [maintenanceConfigurationsCreateOrUpdateSample.js][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update.json | -| [maintenanceConfigurationsDeleteSample.js][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete.json | -| [maintenanceConfigurationsGetSample.js][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet.json | -| [maintenanceConfigurationsListByManagedClusterSample.js][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList.json | -| [managedClustersAbortLatestOperationSample.js][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersAbortOperation.json | -| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Snapshot.json | -| [managedClustersDeleteSample.js][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersDelete.json | -| [managedClustersGetAccessProfileSample.js][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetAccessProfile.json | -| [managedClustersGetCommandResultSample.js][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultFailed.json | -| [managedClustersGetMeshRevisionProfileSample.js][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshRevisionProfile.json | -| [managedClustersGetMeshUpgradeProfileSample.js][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshUpgradeProfile.json | -| [managedClustersGetOSOptionsSample.js][managedclustersgetosoptionssample] | Gets supported OS options in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ContainerServiceGetOSOptions.json | -| [managedClustersGetSample.js][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet.json | -| [managedClustersGetUpgradeProfileSample.js][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetUpgradeProfile.json | -| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListByResourceGroup.json | -| [managedClustersListClusterAdminCredentialsSample.js][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterAdminCredentials.json | -| [managedClustersListClusterMonitoringUserCredentialsSample.js][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json | -| [managedClustersListClusterUserCredentialsSample.js][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterUserCredentials.json | -| [managedClustersListKubernetesVersionsSample.js][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/KubernetesVersions_List.json | -| [managedClustersListMeshRevisionProfilesSample.js][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshRevisionProfiles.json | -| [managedClustersListMeshUpgradeProfilesSample.js][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshUpgradeProfiles.json | -| [managedClustersListOutboundNetworkDependenciesEndpointsSample.js][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/OutboundNetworkDependenciesEndpointsList.json | -| [managedClustersListSample.js][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList.json | -| [managedClustersResetAadProfileSample.js][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetAADProfile.json | -| [managedClustersResetServicePrincipalProfileSample.js][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetServicePrincipalProfile.json | -| [managedClustersRotateClusterCertificatesSample.js][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateClusterCertificates.json | -| [managedClustersRotateServiceAccountSigningKeysSample.js][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json | -| [managedClustersRunCommandSample.js][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandRequest.json | -| [managedClustersStartSample.js][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStart.json | -| [managedClustersStopSample.js][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStop.json | -| [managedClustersUpdateTagsSample.js][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersUpdateTags.json | -| [operationsListSample.js][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/Operation_List.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsGet.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json | -| [privateEndpointConnectionsUpdateSample.js][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsUpdate.json | -| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateLinkResourcesList.json | -| [resolvePrivateLinkServiceIdPostSample.js][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ResolvePrivateLinkServiceId.json | -| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsCreate.json | -| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsDelete.json | -| [snapshotsGetSample.js][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsGet.json | -| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsListByResourceGroup.json | -| [snapshotsListSample.js][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsList.json | -| [snapshotsUpdateTagsSample.js][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsUpdateTags.json | -| [trustedAccessRoleBindingsCreateOrUpdateSample.js][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | -| [trustedAccessRoleBindingsDeleteSample.js][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Delete.json | -| [trustedAccessRoleBindingsGetSample.js][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Get.json | -| [trustedAccessRoleBindingsListSample.js][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_List.json | -| [trustedAccessRolesListSample.js][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoles_List.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [agentPoolsAbortLatestOperationSample.js][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAbortOperation.json | +| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAssociate_CRG.json | +| [agentPoolsDeleteMachinesSample.js][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json | +| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json | +| [agentPoolsGetAvailableAgentPoolVersionsSample.js][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json | +| [agentPoolsGetSample.js][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGet.json | +| [agentPoolsGetUpgradeProfileSample.js][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetUpgradeProfile.json | +| [agentPoolsListSample.js][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsList.json | +| [agentPoolsUpgradeNodeImageVersionSample.js][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json | +| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json | +| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json | +| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json | +| [loadBalancersListByManagedClusterSample.js][loadbalancerslistbymanagedclustersample] | Gets a list of load balancers in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json | +| [machinesGetSample.js][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineGet.json | +| [machinesListSample.js][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json | +| [maintenanceConfigurationsCreateOrUpdateSample.js][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update.json | +| [maintenanceConfigurationsDeleteSample.js][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete.json | +| [maintenanceConfigurationsGetSample.js][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet.json | +| [maintenanceConfigurationsListByManagedClusterSample.js][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList.json | +| [managedClusterSnapshotsCreateOrUpdateSample.js][managedclustersnapshotscreateorupdatesample] | Creates or updates a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json | +| [managedClusterSnapshotsDeleteSample.js][managedclustersnapshotsdeletesample] | Deletes a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json | +| [managedClusterSnapshotsGetSample.js][managedclustersnapshotsgetsample] | Gets a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json | +| [managedClusterSnapshotsListByResourceGroupSample.js][managedclustersnapshotslistbyresourcegroupsample] | Lists managed cluster snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json | +| [managedClusterSnapshotsListSample.js][managedclustersnapshotslistsample] | Gets a list of managed cluster snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json | +| [managedClusterSnapshotsUpdateTagsSample.js][managedclustersnapshotsupdatetagssample] | Updates tags on a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json | +| [managedClustersAbortLatestOperationSample.js][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAbortOperation.json | +| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAssociate_CRG.json | +| [managedClustersDeleteSample.js][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersDelete.json | +| [managedClustersGetAccessProfileSample.js][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetAccessProfile.json | +| [managedClustersGetCommandResultSample.js][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultFailed.json | +| [managedClustersGetGuardrailsVersionsSample.js][managedclustersgetguardrailsversionssample] | Contains Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json | +| [managedClustersGetMeshRevisionProfileSample.js][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json | +| [managedClustersGetMeshUpgradeProfileSample.js][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json | +| [managedClustersGetOSOptionsSample.js][managedclustersgetosoptionssample] | Gets supported OS options in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json | +| [managedClustersGetSafeguardsVersionsSample.js][managedclustersgetsafeguardsversionssample] | Contains Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json | +| [managedClustersGetSample.js][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet.json | +| [managedClustersGetUpgradeProfileSample.js][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetUpgradeProfile.json | +| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListByResourceGroup.json | +| [managedClustersListClusterAdminCredentialsSample.js][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterMonitoringUserCredentialsSample.js][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterUserCredentialsSample.js][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListGuardrailsVersionsSample.js][managedclusterslistguardrailsversionssample] | Contains list of Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListGuardrailsVersions.json | +| [managedClustersListKubernetesVersionsSample.js][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/KubernetesVersions_List.json | +| [managedClustersListMeshRevisionProfilesSample.js][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json | +| [managedClustersListMeshUpgradeProfilesSample.js][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json | +| [managedClustersListOutboundNetworkDependenciesEndpointsSample.js][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json | +| [managedClustersListSafeguardsVersionsSample.js][managedclusterslistsafeguardsversionssample] | Contains list of Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListSafeguardsVersions.json | +| [managedClustersListSample.js][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList.json | +| [managedClustersRebalanceLoadBalancersSample.js][managedclustersrebalanceloadbalancerssample] | Rebalance nodes across specific load balancers. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Rebalance.json | +| [managedClustersResetAadProfileSample.js][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetAADProfile.json | +| [managedClustersResetServicePrincipalProfileSample.js][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json | +| [managedClustersRotateClusterCertificatesSample.js][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateClusterCertificates.json | +| [managedClustersRotateServiceAccountSigningKeysSample.js][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json | +| [managedClustersRunCommandSample.js][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandRequest.json | +| [managedClustersStartSample.js][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStart.json | +| [managedClustersStopSample.js][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStop.json | +| [managedClustersUpdateTagsSample.js][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersUpdateTags.json | +| [operationStatusResultGetByAgentPoolSample.js][operationstatusresultgetbyagentpoolsample] | Get the status of a specific operation in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGetByAgentPool.json | +| [operationStatusResultGetSample.js][operationstatusresultgetsample] | Get the status of a specific operation in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGet.json | +| [operationStatusResultListSample.js][operationstatusresultlistsample] | Gets a list of operations in the specified managedCluster x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultList.json | +| [operationsListSample.js][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/Operation_List.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json | +| [privateEndpointConnectionsUpdateSample.js][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json | +| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json | +| [resolvePrivateLinkServiceIdPostSample.js][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json | +| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json | +| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json | +| [snapshotsGetSample.js][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json | +| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json | +| [snapshotsListSample.js][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json | +| [snapshotsUpdateTagsSample.js][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json | +| [trustedAccessRoleBindingsCreateOrUpdateSample.js][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | +| [trustedAccessRoleBindingsDeleteSample.js][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json | +| [trustedAccessRoleBindingsGetSample.js][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json | +| [trustedAccessRoleBindingsListSample.js][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json | +| [trustedAccessRolesListSample.js][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json | ## Prerequisites @@ -100,63 +121,84 @@ npx cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="=18.0.0" }, @@ -25,8 +25,8 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", "dependencies": { - "@azure/arm-containerservice": "latest", + "@azure/arm-containerservice": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.0.1" } } diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsDeleteSample.js index c632ff36895..f747883d96b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsGetSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsGetSample.js index f243cf8237c..991c394640b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsListSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsListSample.js index 92c0360392c..41dd2b084f2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsUpdateSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsUpdateSample.js index 929f29017b6..da4583b2bd7 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateEndpointConnectionsUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateEndpointConnectionsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateLinkResourcesListSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateLinkResourcesListSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/privateLinkResourcesListSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateLinkResourcesListSample.js index 1461f863b3e..f4b911a40f0 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/privateLinkResourcesListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/privateLinkResourcesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/resolvePrivateLinkServiceIdPostSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/resolvePrivateLinkServiceIdPostSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/resolvePrivateLinkServiceIdPostSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/resolvePrivateLinkServiceIdPostSample.js index 9791883a17c..9d4b6410e30 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/resolvePrivateLinkServiceIdPostSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/resolvePrivateLinkServiceIdPostSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/sample.env b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/sample.env similarity index 100% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/sample.env rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/sample.env diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsCreateOrUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsCreateOrUpdateSample.js similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsCreateOrUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsCreateOrUpdateSample.js index 2cbf7603ddb..022b2c9b51f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsCreateOrUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsDeleteSample.js index c4b2459f2f6..ad5237f7cd0 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsGetSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsGetSample.js index f6c55687c82..aa90b6bac32 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListByResourceGroupSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListByResourceGroupSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListByResourceGroupSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListByResourceGroupSample.js index 714a8be1384..c8966a101d8 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListByResourceGroupSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListSample.js index bd8b19a4151..3345ec241ec 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsUpdateTagsSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsUpdateTagsSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsUpdateTagsSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsUpdateTagsSample.js index 6a6eaef116c..1be62f4432f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/snapshotsUpdateTagsSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/snapshotsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js index 78d4a7dacc5..d0f1b4fa106 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsDeleteSample.js index 6c65459a6e3..524d9bc3aef 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsGetSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsGetSample.js index 1bbabe8eebe..560b4aa0924 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsListSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsListSample.js index 50653be3076..baf27212d01 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRoleBindingsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRoleBindingsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRolesListSample.js b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRolesListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRolesListSample.js rename to sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRolesListSample.js index 814c64fc446..769a175f12b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/javascript/trustedAccessRolesListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/javascript/trustedAccessRolesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/README.md b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/README.md similarity index 55% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/README.md rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/README.md index 2ec40385480..2c9cfc4a9a3 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/README.md +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/README.md @@ -1,66 +1,87 @@ -# client library samples for TypeScript +# 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** | -| --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsAbortLatestOperationSample.ts][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsAbortOperation.json | -| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Snapshot.json | -| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsDelete.json | -| [agentPoolsGetAvailableAgentPoolVersionsSample.ts][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json | -| [agentPoolsGetSample.ts][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGet.json | -| [agentPoolsGetUpgradeProfileSample.ts][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetUpgradeProfile.json | -| [agentPoolsListSample.ts][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsList.json | -| [agentPoolsUpgradeNodeImageVersionSample.ts][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsUpgradeNodeImageVersion.json | -| [maintenanceConfigurationsCreateOrUpdateSample.ts][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update.json | -| [maintenanceConfigurationsDeleteSample.ts][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete.json | -| [maintenanceConfigurationsGetSample.ts][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet.json | -| [maintenanceConfigurationsListByManagedClusterSample.ts][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList.json | -| [managedClustersAbortLatestOperationSample.ts][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersAbortOperation.json | -| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Snapshot.json | -| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersDelete.json | -| [managedClustersGetAccessProfileSample.ts][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetAccessProfile.json | -| [managedClustersGetCommandResultSample.ts][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultFailed.json | -| [managedClustersGetMeshRevisionProfileSample.ts][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshRevisionProfile.json | -| [managedClustersGetMeshUpgradeProfileSample.ts][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshUpgradeProfile.json | -| [managedClustersGetOSOptionsSample.ts][managedclustersgetosoptionssample] | Gets supported OS options in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ContainerServiceGetOSOptions.json | -| [managedClustersGetSample.ts][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet.json | -| [managedClustersGetUpgradeProfileSample.ts][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetUpgradeProfile.json | -| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListByResourceGroup.json | -| [managedClustersListClusterAdminCredentialsSample.ts][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterAdminCredentials.json | -| [managedClustersListClusterMonitoringUserCredentialsSample.ts][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json | -| [managedClustersListClusterUserCredentialsSample.ts][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterUserCredentials.json | -| [managedClustersListKubernetesVersionsSample.ts][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/KubernetesVersions_List.json | -| [managedClustersListMeshRevisionProfilesSample.ts][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshRevisionProfiles.json | -| [managedClustersListMeshUpgradeProfilesSample.ts][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshUpgradeProfiles.json | -| [managedClustersListOutboundNetworkDependenciesEndpointsSample.ts][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/OutboundNetworkDependenciesEndpointsList.json | -| [managedClustersListSample.ts][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList.json | -| [managedClustersResetAadProfileSample.ts][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetAADProfile.json | -| [managedClustersResetServicePrincipalProfileSample.ts][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetServicePrincipalProfile.json | -| [managedClustersRotateClusterCertificatesSample.ts][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateClusterCertificates.json | -| [managedClustersRotateServiceAccountSigningKeysSample.ts][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json | -| [managedClustersRunCommandSample.ts][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandRequest.json | -| [managedClustersStartSample.ts][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStart.json | -| [managedClustersStopSample.ts][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStop.json | -| [managedClustersUpdateTagsSample.ts][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersUpdateTags.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/Operation_List.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsGet.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json | -| [privateEndpointConnectionsUpdateSample.ts][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsUpdate.json | -| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateLinkResourcesList.json | -| [resolvePrivateLinkServiceIdPostSample.ts][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ResolvePrivateLinkServiceId.json | -| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsCreate.json | -| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsDelete.json | -| [snapshotsGetSample.ts][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsGet.json | -| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsListByResourceGroup.json | -| [snapshotsListSample.ts][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsList.json | -| [snapshotsUpdateTagsSample.ts][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsUpdateTags.json | -| [trustedAccessRoleBindingsCreateOrUpdateSample.ts][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | -| [trustedAccessRoleBindingsDeleteSample.ts][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Delete.json | -| [trustedAccessRoleBindingsGetSample.ts][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Get.json | -| [trustedAccessRoleBindingsListSample.ts][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_List.json | -| [trustedAccessRolesListSample.ts][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoles_List.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [agentPoolsAbortLatestOperationSample.ts][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAbortOperation.json | +| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAssociate_CRG.json | +| [agentPoolsDeleteMachinesSample.ts][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json | +| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json | +| [agentPoolsGetAvailableAgentPoolVersionsSample.ts][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json | +| [agentPoolsGetSample.ts][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGet.json | +| [agentPoolsGetUpgradeProfileSample.ts][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetUpgradeProfile.json | +| [agentPoolsListSample.ts][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsList.json | +| [agentPoolsUpgradeNodeImageVersionSample.ts][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json | +| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json | +| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json | +| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json | +| [loadBalancersListByManagedClusterSample.ts][loadbalancerslistbymanagedclustersample] | Gets a list of load balancers in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json | +| [machinesGetSample.ts][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineGet.json | +| [machinesListSample.ts][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json | +| [maintenanceConfigurationsCreateOrUpdateSample.ts][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update.json | +| [maintenanceConfigurationsDeleteSample.ts][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete.json | +| [maintenanceConfigurationsGetSample.ts][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet.json | +| [maintenanceConfigurationsListByManagedClusterSample.ts][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList.json | +| [managedClusterSnapshotsCreateOrUpdateSample.ts][managedclustersnapshotscreateorupdatesample] | Creates or updates a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json | +| [managedClusterSnapshotsDeleteSample.ts][managedclustersnapshotsdeletesample] | Deletes a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json | +| [managedClusterSnapshotsGetSample.ts][managedclustersnapshotsgetsample] | Gets a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json | +| [managedClusterSnapshotsListByResourceGroupSample.ts][managedclustersnapshotslistbyresourcegroupsample] | Lists managed cluster snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json | +| [managedClusterSnapshotsListSample.ts][managedclustersnapshotslistsample] | Gets a list of managed cluster snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json | +| [managedClusterSnapshotsUpdateTagsSample.ts][managedclustersnapshotsupdatetagssample] | Updates tags on a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json | +| [managedClustersAbortLatestOperationSample.ts][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAbortOperation.json | +| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAssociate_CRG.json | +| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersDelete.json | +| [managedClustersGetAccessProfileSample.ts][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetAccessProfile.json | +| [managedClustersGetCommandResultSample.ts][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultFailed.json | +| [managedClustersGetGuardrailsVersionsSample.ts][managedclustersgetguardrailsversionssample] | Contains Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json | +| [managedClustersGetMeshRevisionProfileSample.ts][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json | +| [managedClustersGetMeshUpgradeProfileSample.ts][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json | +| [managedClustersGetOSOptionsSample.ts][managedclustersgetosoptionssample] | Gets supported OS options in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json | +| [managedClustersGetSafeguardsVersionsSample.ts][managedclustersgetsafeguardsversionssample] | Contains Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json | +| [managedClustersGetSample.ts][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet.json | +| [managedClustersGetUpgradeProfileSample.ts][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetUpgradeProfile.json | +| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListByResourceGroup.json | +| [managedClustersListClusterAdminCredentialsSample.ts][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterMonitoringUserCredentialsSample.ts][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterUserCredentialsSample.ts][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListGuardrailsVersionsSample.ts][managedclusterslistguardrailsversionssample] | Contains list of Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListGuardrailsVersions.json | +| [managedClustersListKubernetesVersionsSample.ts][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/KubernetesVersions_List.json | +| [managedClustersListMeshRevisionProfilesSample.ts][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json | +| [managedClustersListMeshUpgradeProfilesSample.ts][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json | +| [managedClustersListOutboundNetworkDependenciesEndpointsSample.ts][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json | +| [managedClustersListSafeguardsVersionsSample.ts][managedclusterslistsafeguardsversionssample] | Contains list of Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListSafeguardsVersions.json | +| [managedClustersListSample.ts][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList.json | +| [managedClustersRebalanceLoadBalancersSample.ts][managedclustersrebalanceloadbalancerssample] | Rebalance nodes across specific load balancers. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Rebalance.json | +| [managedClustersResetAadProfileSample.ts][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetAADProfile.json | +| [managedClustersResetServicePrincipalProfileSample.ts][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json | +| [managedClustersRotateClusterCertificatesSample.ts][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateClusterCertificates.json | +| [managedClustersRotateServiceAccountSigningKeysSample.ts][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json | +| [managedClustersRunCommandSample.ts][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandRequest.json | +| [managedClustersStartSample.ts][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStart.json | +| [managedClustersStopSample.ts][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStop.json | +| [managedClustersUpdateTagsSample.ts][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersUpdateTags.json | +| [operationStatusResultGetByAgentPoolSample.ts][operationstatusresultgetbyagentpoolsample] | Get the status of a specific operation in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGetByAgentPool.json | +| [operationStatusResultGetSample.ts][operationstatusresultgetsample] | Get the status of a specific operation in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGet.json | +| [operationStatusResultListSample.ts][operationstatusresultlistsample] | Gets a list of operations in the specified managedCluster x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultList.json | +| [operationsListSample.ts][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/Operation_List.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json | +| [privateEndpointConnectionsUpdateSample.ts][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json | +| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json | +| [resolvePrivateLinkServiceIdPostSample.ts][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json | +| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json | +| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json | +| [snapshotsGetSample.ts][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json | +| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json | +| [snapshotsListSample.ts][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json | +| [snapshotsUpdateTagsSample.ts][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json | +| [trustedAccessRoleBindingsCreateOrUpdateSample.ts][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | +| [trustedAccessRoleBindingsDeleteSample.ts][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json | +| [trustedAccessRoleBindingsGetSample.ts][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json | +| [trustedAccessRoleBindingsListSample.ts][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json | +| [trustedAccessRolesListSample.ts][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json | ## Prerequisites @@ -112,63 +133,84 @@ npx cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="=18.0.0" }, @@ -29,9 +29,9 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", "dependencies": { - "@azure/arm-containerservice": "latest", + "@azure/arm-containerservice": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.0.1" }, "devDependencies": { "@types/node": "^18.0.0", diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/sample.env b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/sample.env similarity index 100% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/sample.env rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/sample.env diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts similarity index 88% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsAbortLatestOperationSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts index 7e4bb689cb5..4b542c97da2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsAbortOperation.json + * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAbortOperation.json */ async function abortOperationOnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts similarity index 75% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts index 363ff526543..a848a5a393a 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts @@ -18,45 +18,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAssociate_CRG.json */ -async function createAgentPoolUsingAnAgentPoolSnapshot() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const agentPoolName = "agentpool1"; - const parameters: AgentPool = { - count: 3, - creationData: { - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - }, - enableFips: true, - orchestratorVersion: "", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - agentPoolName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. - * - * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_CRG.json - */ -async function createAgentPoolWithCapacityReservationGroup() { +async function associateAgentPoolWithCapacityReservationGroup() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -87,7 +51,75 @@ async function createAgentPoolWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Snapshot.json + */ +async function createAgentPoolUsingAnAgentPoolSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + }, + enableFips: true, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json + */ +async function createAgentPoolWithCustomCaTrustEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + enableCustomCATrust: true, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json */ async function createAgentPoolWithDedicatedHostGroup() { const subscriptionId = @@ -120,7 +152,7 @@ async function createAgentPoolWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json */ async function createAgentPoolWithEncryptionAtHostEnabled() { const subscriptionId = @@ -152,7 +184,7 @@ async function createAgentPoolWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Ephemeral.json */ async function createAgentPoolWithEphemeralOSDisk() { const subscriptionId = @@ -185,7 +217,7 @@ async function createAgentPoolWithEphemeralOSDisk() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableFIPS.json */ async function createAgentPoolWithFipsEnabledOS() { const subscriptionId = @@ -217,7 +249,7 @@ async function createAgentPoolWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_GPUMIG.json */ async function createAgentPoolWithGpumig() { const subscriptionId = @@ -270,7 +302,7 @@ async function createAgentPoolWithGpumig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WasmWasi.json */ async function createAgentPoolWithKrustletAndTheWasiRuntime() { const subscriptionId = @@ -304,7 +336,7 @@ async function createAgentPoolWithKrustletAndTheWasiRuntime() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json */ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { const subscriptionId = @@ -356,7 +388,41 @@ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json + */ +async function createAgentPoolWithMessageOfTheDay() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + messageOfTheDay: "Zm9vCg==", + mode: "User", + orchestratorVersion: "", + osDiskSizeGB: 64, + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_OSSKU.json */ async function createAgentPoolWithOssku() { const subscriptionId = @@ -409,7 +475,7 @@ async function createAgentPoolWithOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_PPG.json */ async function createAgentPoolWithPpg() { const subscriptionId = @@ -442,7 +508,7 @@ async function createAgentPoolWithPpg() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json */ async function createAgentPoolWithUltraSsdEnabled() { const subscriptionId = @@ -474,7 +540,89 @@ async function createAgentPoolWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json + */ +async function createAgentPoolWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.9.6", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + manual: [{ count: 5, sizes: ["Standard_D2_v2", "Standard_D2_v3"] }], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + */ +async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.29.0", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + autoscale: [ + { + maxCount: 5, + minCount: 1, + sizes: ["Standard_D2_v2", "Standard_D2_v3"], + }, + ], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json */ async function createAgentPoolWithWindowsOssku() { const subscriptionId = @@ -506,7 +654,7 @@ async function createAgentPoolWithWindowsOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Spot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Spot.json */ async function createSpotAgentPool() { const subscriptionId = @@ -542,7 +690,7 @@ async function createSpotAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ async function createWindowsAgentPoolWithDisablingOutboundNat() { const subscriptionId = @@ -575,7 +723,7 @@ async function createWindowsAgentPoolWithDisablingOutboundNat() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Update.json */ async function createOrUpdateAgentPool() { const subscriptionId = @@ -612,7 +760,7 @@ async function createOrUpdateAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Start.json */ async function startAgentPool() { const subscriptionId = @@ -638,7 +786,7 @@ async function startAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Stop.json */ async function stopAgentPool() { const subscriptionId = @@ -664,7 +812,7 @@ async function stopAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPools_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Update.json */ async function updateAgentPool() { const subscriptionId = @@ -698,8 +846,9 @@ async function updateAgentPool() { } async function main() { + associateAgentPoolWithCapacityReservationGroup(); createAgentPoolUsingAnAgentPoolSnapshot(); - createAgentPoolWithCapacityReservationGroup(); + createAgentPoolWithCustomCaTrustEnabled(); createAgentPoolWithDedicatedHostGroup(); createAgentPoolWithEncryptionAtHostEnabled(); createAgentPoolWithEphemeralOSDisk(); @@ -707,9 +856,12 @@ async function main() { createAgentPoolWithGpumig(); createAgentPoolWithKrustletAndTheWasiRuntime(); createAgentPoolWithKubeletConfigAndLinuxOSConfig(); + createAgentPoolWithMessageOfTheDay(); createAgentPoolWithOssku(); createAgentPoolWithPpg(); createAgentPoolWithUltraSsdEnabled(); + createAgentPoolWithVirtualMachinesPoolType(); + createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled(); createAgentPoolWithWindowsOssku(); createSpotAgentPool(); createWindowsAgentPoolWithDisablingOutboundNat(); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteMachinesSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteMachinesSample.ts new file mode 100644 index 00000000000..9dc109b094e --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteMachinesSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + AgentPoolDeleteMachinesParameter, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes specific machines in an agent pool. + * + * @summary Deletes specific machines in an agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json + */ +async function deleteSpecificMachinesInAnAgentPool() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const machines: AgentPoolDeleteMachinesParameter = { + machineNames: [ + "aks-nodepool1-42263519-vmss00000a", + "aks-nodepool1-42263519-vmss00000b", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteMachinesAndWait( + resourceGroupName, + resourceName, + agentPoolName, + machines, + ); + console.log(result); +} + +async function main() { + deleteSpecificMachinesInAnAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteSample.ts new file mode 100644 index 00000000000..b14d114f9f5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsDeleteSample.ts @@ -0,0 +1,70 @@ +/* + * 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 { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json + */ +async function deleteAgentPool() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ +async function deleteAgentPoolByIgnoringPodDisruptionBudget() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + +async function main() { + deleteAgentPool(); + deleteAgentPoolByIgnoringPodDisruptionBudget(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts index c45d57c36d1..05d9489f7bd 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. * * @summary See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json */ async function getAvailableVersionsForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetSample.ts index b8c4428f46b..c5baca9cc49 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified managed cluster agent pool. * * @summary Gets the specified managed cluster agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGet.json */ async function getAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts index 57d406c33df..70aca87b139 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile for an agent pool. * * @summary Gets the upgrade profile for an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetUpgradeProfile.json */ async function getUpgradeProfileForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsListSample.ts index 84188ff4f6c..09ba7cdf458 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of agent pools in the specified managed cluster. * * @summary Gets a list of agent pools in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsList.json */ async function listAgentPoolsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts index 5c336689cb7..879adadac0b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade * * @summary Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json */ async function upgradeAgentPoolNodeImageVersion() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts new file mode 100644 index 00000000000..3d6992ee028 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster. + * + * @summary Creates or updates a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json + */ +async function createOrUpdateALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + createOrUpdateALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersDeleteSample.ts new file mode 100644 index 00000000000..019c8106b09 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a load balancer in the specified managed cluster. + * + * @summary Deletes a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json + */ +async function deleteALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.beginDeleteAndWait( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + deleteALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersGetSample.ts new file mode 100644 index 00000000000..e823053da3a --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified load balancer. + * + * @summary Gets the specified load balancer. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json + */ +async function getLoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.get( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + getLoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersListByManagedClusterSample.ts new file mode 100644 index 00000000000..ad5bda7e833 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/loadBalancersListByManagedClusterSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of load balancers in the specified managed cluster. + * + * @summary Gets a list of load balancers in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json + */ +async function listLoadBalancersByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.loadBalancers.listByManagedCluster( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLoadBalancersByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesGetSample.ts new file mode 100644 index 00000000000..3f96b8fefde --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get a specific machine in the specified agent pool. + * + * @summary Get a specific machine in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineGet.json + */ +async function getAMachineInAnAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const machineName = "aks-nodepool1-42263519-vmss00000t"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.machines.get( + resourceGroupName, + resourceName, + agentPoolName, + machineName, + ); + console.log(result); +} + +async function main() { + getAMachineInAnAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesListSample.ts new file mode 100644 index 00000000000..77e47342fc0 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/machinesListSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of machines in the specified agent pool. + * + * @summary Gets a list of machines in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json + */ +async function listMachinesInAnAgentpoolByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.machines.list( + resourceGroupName, + resourceName, + agentPoolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listMachinesInAnAgentpoolByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts index e3868e35987..3b5e6b02991 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update.json */ async function createOrUpdateMaintenanceConfiguration() { const subscriptionId = @@ -55,7 +55,7 @@ async function createOrUpdateMaintenanceConfiguration() { * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ async function createOrUpdateMaintenanceConfigurationWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts similarity index 90% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts index ddbc1e49c62..57ae4f8acbf 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete.json */ async function deleteMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function deleteMaintenanceConfiguration() { * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ async function deleteMaintenanceConfigurationForNodeOSUpgrade() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsGetSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsGetSample.ts index a7466137bb2..c90e77ae08a 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet.json */ async function getMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function getMaintenanceConfiguration() { * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json */ async function getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts index 38350e136ee..bd5b5faf309 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList.json */ async function listMaintenanceConfigurationsByManagedCluster() { const subscriptionId = @@ -43,7 +43,7 @@ async function listMaintenanceConfigurationsByManagedCluster() { * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json */ async function listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts new file mode 100644 index 00000000000..abe6d19c5c6 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + ManagedClusterSnapshot, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a managed cluster snapshot. + * + * @summary Creates or updates a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json + */ +async function createOrUpdateManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: ManagedClusterSnapshot = { + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1", + }, + location: "westus", + tags: { key1: "val1", key2: "val2" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.createOrUpdate( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts new file mode 100644 index 00000000000..a744246ede6 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a managed cluster snapshot. + * + * @summary Deletes a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json + */ +async function deleteManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.delete( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + deleteManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsGetSample.ts new file mode 100644 index 00000000000..21574707398 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a managed cluster snapshot. + * + * @summary Gets a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json + */ +async function getManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.get( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + getManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts new file mode 100644 index 00000000000..70d890aeef9 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group. + * + * @summary Lists managed cluster snapshots in the specified subscription and resource group. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json + */ +async function listManagedClusterSnapshotsByResourceGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshotsByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListSample.ts new file mode 100644 index 00000000000..a0a1a9e1de3 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsListSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription. + * + * @summary Gets a list of managed cluster snapshots in the specified subscription. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json + */ +async function listManagedClusterSnapshots() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshots(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts new file mode 100644 index 00000000000..4d8282b44ef --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsObject, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates tags on a managed cluster snapshot. + * + * @summary Updates tags on a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json + */ +async function updateManagedClusterSnapshotTags() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: TagsObject = { tags: { key2: "new-val2", key3: "val3" } }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.updateTags( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + updateManagedClusterSnapshotTags(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersAbortLatestOperationSample.ts similarity index 90% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersAbortLatestOperationSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersAbortLatestOperationSample.ts index c410ca894c5..d18439819b0 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersAbortOperation.json + * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAbortOperation.json */ async function abortOperationOnManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersCreateOrUpdateSample.ts similarity index 77% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersCreateOrUpdateSample.ts index e173ede036c..ae042fe1a81 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersCreateOrUpdateSample.ts @@ -21,202 +21,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAssociate_CRG.json */ -async function createManagedClusterUsingAnAgentPoolSnapshot() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: {}, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - creationData: { - sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - }, - enableFips: true, - enableNodePublicIP: true, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: false, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, - loadBalancerSku: "standard", - outboundType: "loadBalancer", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_ManagedNATGateway.json - */ -async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: {}, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - enableNodePublicIP: false, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: true, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerSku: "standard", - natGatewayProfile: { managedOutboundIPProfile: { count: 2 } }, - outboundType: "managedNATGateway", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json - */ -async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { - const subscriptionId = - process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; - const resourceName = "clustername1"; - const parameters: ManagedCluster = { - addonProfiles: { - azureKeyvaultSecretsProvider: { - config: { enableSecretRotation: "true", rotationPollInterval: "2m" }, - enabled: true, - }, - }, - agentPoolProfiles: [ - { - name: "nodepool1", - type: "VirtualMachineScaleSets", - count: 3, - enableNodePublicIP: true, - mode: "System", - osType: "Linux", - vmSize: "Standard_DS2_v2", - }, - ], - autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, - diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - dnsPrefix: "dnsprefix1", - enablePodSecurityPolicy: true, - enableRbac: true, - kubernetesVersion: "", - linuxProfile: { - adminUsername: "azureuser", - ssh: { publicKeys: [{ keyData: "keydata" }] }, - }, - location: "location1", - networkProfile: { - loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, - loadBalancerSku: "standard", - outboundType: "loadBalancer", - }, - servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, - sku: { name: "Basic", tier: "Free" }, - tags: { archv2: "", tier: "production" }, - windowsProfile: { - adminPassword: "replacePassword1234$", - adminUsername: "azureuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a managed cluster. - * - * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_CRG.json - */ -async function createManagedClusterWithCapacityReservationGroup() { +async function associateManagedClusterWithCapacityReservationGroup() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -277,7 +84,377 @@ async function createManagedClusterWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_MCSnapshot.json + */ +async function createManagedClusterUsingAManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1", + }, + dnsPrefix: "dnsprefix1", + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Snapshot.json + */ +async function createManagedClusterUsingAnAgentPoolSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + }, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json + */ +async function createManagedClusterWithAiToolchainOperatorEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + aiToolchainOperatorProfile: { enabled: true }, + dnsPrefix: "dnsprefix1", + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json + */ +async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: false, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerSku: "standard", + natGatewayProfile: { managedOutboundIPProfile: { count: 2 } }, + outboundType: "managedNATGateway", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ +async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: { + azureKeyvaultSecretsProvider: { + config: { enableSecretRotation: "true", rotationPollInterval: "2m" }, + enabled: true, + }, + }, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json + */ +async function createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableCustomCATrust: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + securityProfile: { + customCATrustCertificates: [ + Buffer.from( + "ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=", + ), + ], + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json */ async function createManagedClusterWithDedicatedHostGroup() { const subscriptionId = @@ -302,7 +479,7 @@ async function createManagedClusterWithDedicatedHostGroup() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -339,7 +516,7 @@ async function createManagedClusterWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json */ async function createManagedClusterWithEncryptionAtHostEnabled() { const subscriptionId = @@ -364,7 +541,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -401,7 +578,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json */ async function createManagedClusterWithFipsEnabledOS() { const subscriptionId = @@ -426,7 +603,7 @@ async function createManagedClusterWithFipsEnabledOS() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -463,7 +640,7 @@ async function createManagedClusterWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_GPUMIG.json */ async function createManagedClusterWithGpumig() { const subscriptionId = @@ -488,7 +665,7 @@ async function createManagedClusterWithGpumig() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -531,7 +708,7 @@ async function createManagedClusterWithGpumig() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_HTTPProxy.json */ async function createManagedClusterWithHttpProxyConfigured() { const subscriptionId = @@ -555,7 +732,7 @@ async function createManagedClusterWithHttpProxyConfigured() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -598,7 +775,7 @@ async function createManagedClusterWithHttpProxyConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Premium.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Premium.json */ async function createManagedClusterWithLongTermSupport() { const subscriptionId = @@ -660,7 +837,64 @@ async function createManagedClusterWithLongTermSupport() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json + */ +async function createManagedClusterWithNodeAutoProvisioning() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json */ async function createManagedClusterWithNodePublicIPPrefix() { const subscriptionId = @@ -686,7 +920,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -723,7 +957,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_OSSKU.json */ async function createManagedClusterWithOssku() { const subscriptionId = @@ -748,7 +982,7 @@ async function createManagedClusterWithOssku() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -791,7 +1025,7 @@ async function createManagedClusterWithOssku() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PPG.json */ async function createManagedClusterWithPpg() { const subscriptionId = @@ -817,7 +1051,7 @@ async function createManagedClusterWithPpg() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -854,7 +1088,7 @@ async function createManagedClusterWithPpg() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PodIdentity.json */ async function createManagedClusterWithPodIdentityEnabled() { const subscriptionId = @@ -878,7 +1112,7 @@ async function createManagedClusterWithPodIdentityEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -916,7 +1150,7 @@ async function createManagedClusterWithPodIdentityEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json */ async function createManagedClusterWithRunCommandDisabled() { const subscriptionId = @@ -977,7 +1211,7 @@ async function createManagedClusterWithRunCommandDisabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_SecurityProfile.json */ async function createManagedClusterWithSecurityProfileConfigured() { const subscriptionId = @@ -1016,7 +1250,6 @@ async function createManagedClusterWithSecurityProfileConfigured() { "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", securityMonitoring: { enabled: true }, }, - workloadIdentity: { enabled: true }, }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -1035,7 +1268,7 @@ async function createManagedClusterWithSecurityProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json */ async function createManagedClusterWithUltraSsdEnabled() { const subscriptionId = @@ -1060,7 +1293,7 @@ async function createManagedClusterWithUltraSsdEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1097,7 +1330,63 @@ async function createManagedClusterWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_VirtualMachines.json + */ +async function createManagedClusterWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachines", + count: 3, + enableFips: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { const subscriptionId = @@ -1155,7 +1444,7 @@ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json */ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { const subscriptionId = @@ -1179,7 +1468,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1215,7 +1504,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ async function createManagedPrivateClusterWithPublicFqdnSpecified() { const subscriptionId = @@ -1279,7 +1568,7 @@ async function createManagedPrivateClusterWithPublicFqdnSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { const subscriptionId = @@ -1344,7 +1633,7 @@ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { const subscriptionId = @@ -1370,7 +1659,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1407,7 +1696,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_Update.json */ async function createOrUpdateManagedCluster() { const subscriptionId = @@ -1441,14 +1730,14 @@ async function createOrUpdateManagedCluster() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1468,7 +1757,7 @@ async function createOrUpdateManagedCluster() { tags: { archv2: "", tier: "production" }, upgradeSettings: { overrideSettings: { - forceUpgrade: false, + forceUpgrade: true, until: new Date("2022-11-01T13:00:00Z"), }, }, @@ -1491,7 +1780,7 @@ async function createOrUpdateManagedCluster() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json */ async function createOrUpdateManagedClusterWithAzureServiceMesh() { const subscriptionId = @@ -1520,7 +1809,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1576,7 +1865,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json */ async function createOrUpdateManagedClusterWithEnableAhub() { const subscriptionId = @@ -1601,14 +1890,14 @@ async function createOrUpdateManagedClusterWithEnableAhub() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1646,7 +1935,70 @@ async function createOrUpdateManagedClusterWithEnableAhub() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json + */ +async function createOrUpdateManagedClusterWithEnableNamespaceResources() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + availabilityZones: ["1", "2", "3"], + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS1_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enableNamespaceResources: true, + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json */ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { const subscriptionId = @@ -1671,14 +2023,14 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1716,7 +2068,7 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json */ async function createOrUpdateManagedClusterWithDualStackNetworking() { const subscriptionId = @@ -1750,14 +2102,14 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1792,16 +2144,20 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { } async function main() { + associateManagedClusterWithCapacityReservationGroup(); + createManagedClusterUsingAManagedClusterSnapshot(); createManagedClusterUsingAnAgentPoolSnapshot(); + createManagedClusterWithAiToolchainOperatorEnabled(); createManagedClusterWithAksManagedNatGatewayAsOutboundType(); createManagedClusterWithAzureKeyVaultSecretsProviderAddon(); - createManagedClusterWithCapacityReservationGroup(); + createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled(); createManagedClusterWithDedicatedHostGroup(); createManagedClusterWithEncryptionAtHostEnabled(); createManagedClusterWithFipsEnabledOS(); createManagedClusterWithGpumig(); createManagedClusterWithHttpProxyConfigured(); createManagedClusterWithLongTermSupport(); + createManagedClusterWithNodeAutoProvisioning(); createManagedClusterWithNodePublicIPPrefix(); createManagedClusterWithOssku(); createManagedClusterWithPpg(); @@ -1809,6 +2165,7 @@ async function main() { createManagedClusterWithRunCommandDisabled(); createManagedClusterWithSecurityProfileConfigured(); createManagedClusterWithUltraSsdEnabled(); + createManagedClusterWithVirtualMachinesPoolType(); createManagedClusterWithWebAppRoutingIngressProfileConfigured(); createManagedClusterWithUserAssignedNatGatewayAsOutboundType(); createManagedPrivateClusterWithPublicFqdnSpecified(); @@ -1817,6 +2174,7 @@ async function main() { createOrUpdateManagedCluster(); createOrUpdateManagedClusterWithAzureServiceMesh(); createOrUpdateManagedClusterWithEnableAhub(); + createOrUpdateManagedClusterWithEnableNamespaceResources(); createOrUpdateManagedClusterWithWindowsGMsaEnabled(); createOrUpdateManagedClusterWithDualStackNetworking(); } diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersDeleteSample.ts index f9997726b78..2cb4e4e73bd 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a managed cluster. * * @summary Deletes a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersDelete.json */ async function deleteManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetAccessProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetAccessProfileSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetAccessProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetAccessProfileSample.ts index 302016b6ca4..52a640e0691 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetAccessProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetAccessProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . * * @summary **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetAccessProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetAccessProfile.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetCommandResultSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetCommandResultSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetCommandResultSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetCommandResultSample.ts index e9176c96200..0bc690bc2c1 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetCommandResultSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetCommandResultSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultFailed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultFailed.json */ async function commandFailedResult() { const subscriptionId = @@ -42,7 +42,7 @@ async function commandFailedResult() { * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandResultSucceed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultSucceed.json */ async function commandSucceedResult() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts new file mode 100644 index 00000000000..c571a354609 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json + */ +async function getGuardrailsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getGuardrailsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getGuardrailsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshRevisionProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshRevisionProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts index ae7f8a46cf4..18f55fb4cbc 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshRevisionProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json */ async function getAMeshRevisionProfileForAMeshMode() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts index 12f589d3afe..b59c4f3cad1 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets available upgrades for a service mesh in a cluster. * * @summary Gets available upgrades for a service mesh in a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json */ async function getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetOSOptionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetOSOptionsSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetOSOptionsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetOSOptionsSample.ts index 595c0bb661a..6140d4067f2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetOSOptionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetOSOptionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets supported OS options in the specified subscription. * * @summary Gets supported OS options in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ContainerServiceGetOSOptions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json */ async function getContainerServiceOSOptions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts new file mode 100644 index 00000000000..0e75cdd7e38 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json + */ +async function getSafeguardsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getSafeguardsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getSafeguardsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSample.ts index 60657bf9f06..e7d70d921e4 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a managed cluster. * * @summary Gets a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts index ce9f961e65a..b6925b65b67 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile of a managed cluster. * * @summary Gets the upgrade profile of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetUpgradeProfile.json */ async function getUpgradeProfileForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListByResourceGroupSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListByResourceGroupSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListByResourceGroupSample.ts index 7395f473101..ecf04e75b7f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists managed clusters in the specified subscription and resource group. * * @summary Lists managed clusters in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListByResourceGroup.json */ async function getManagedClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterAdminCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterAdminCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts index 944d86f9798..beeccbbd40e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterAdminCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the admin credentials of a managed cluster. * * @summary Lists the admin credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts index aa63a1ed1f8..31712b76b37 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the cluster monitoring user credentials of a managed cluster. * * @summary Lists the cluster monitoring user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterUserCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts index 6ff69f25e32..70c8290b7d9 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListClusterUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the user credentials of a managed cluster. * * @summary Lists the user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts new file mode 100644 index 00000000000..fcf9933e83b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains list of Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListGuardrailsVersions.json + */ +async function listGuardrailsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listGuardrailsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGuardrailsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListKubernetesVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListKubernetesVersionsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts index 48e43d3fdc6..5568d2ca41e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListKubernetesVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version * * @summary Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/KubernetesVersions_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/KubernetesVersions_List.json */ async function listKubernetesVersions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshRevisionProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshRevisionProfilesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts index d3172f3565a..7551e3f65bc 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshRevisionProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json */ async function listMeshRevisionProfilesInALocation() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts index f5594e073dd..1927204be01 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available upgrades for all service meshes in a specific cluster. * * @summary Lists available upgrades for all service meshes in a specific cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json */ async function listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts index a914279fdde..1d3fdef78c6 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. * * @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json */ async function listOutboundNetworkDependenciesEndpointsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts new file mode 100644 index 00000000000..423105f6bfa --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains list of Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListSafeguardsVersions.json + */ +async function listSafeguardsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listSafeguardsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSafeguardsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSample.ts index 5e0f2e49232..50d1fe65cf7 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of managed clusters in the specified subscription. * * @summary Gets a list of managed clusters in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts new file mode 100644 index 00000000000..5e8bd533a7f --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RebalanceLoadBalancersRequestBody, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Rebalance nodes across specific load balancers. + * + * @summary Rebalance nodes across specific load balancers. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Rebalance.json + */ +async function listAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: RebalanceLoadBalancersRequestBody = { + loadBalancerNames: ["kubernetes"], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = + await client.managedClusters.beginRebalanceLoadBalancersAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + listAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetAadProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetAadProfileSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetAadProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetAadProfileSample.ts index 85ab2668657..13b369364f4 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetAadProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetAadProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @summary **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetAADProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetAADProfile.json */ async function resetAadProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetServicePrincipalProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetServicePrincipalProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts index 3d9bf0f7688..bf848a8d03b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersResetServicePrincipalProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to This action cannot be performed on a cluster that is not using a service principal * * @summary This action cannot be performed on a cluster that is not using a service principal - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json */ async function resetServicePrincipalProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateClusterCertificatesSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateClusterCertificatesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts index 0a055896bf2..da84b8c1449 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateClusterCertificatesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. * * @summary See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateClusterCertificates.json */ async function rotateClusterCertificates() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts index 5dfb252e589..3dfa7c3b18b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Rotates the service account signing keys of a managed cluster. * * @summary Rotates the service account signing keys of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json */ async function rotateClusterServiceAccountSigningKeys() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRunCommandSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRunCommandSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRunCommandSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRunCommandSample.ts index 39edfb2531c..d7a6d0b62ab 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersRunCommandSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersRunCommandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @summary AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/RunCommandRequest.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandRequest.json */ async function submitNewCommand() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStartSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStartSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStartSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStartSample.ts index eebb13eed2d..5b13ff2d416 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStartSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. * * @summary See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStart.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStart.json */ async function startManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStopSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStopSample.ts similarity index 95% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStopSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStopSample.ts index 76aa27bba4f..d9b54c74b68 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersStopSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. * * @summary This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersStop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStop.json */ async function stopManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersUpdateTagsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersUpdateTagsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersUpdateTagsSample.ts index 685fd1cfd28..dbc89941046 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/managedClustersUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/managedClustersUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a managed cluster. * * @summary Updates tags on a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ManagedClustersUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersUpdateTags.json */ async function updateManagedClusterTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts new file mode 100644 index 00000000000..8a734d59d90 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified agent pool. + * + * @summary Get the status of a specific operation in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGetByAgentPool.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.getByAgentPool( + resourceGroupName, + resourceName, + agentPoolName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetSample.ts new file mode 100644 index 00000000000..1e3b29abbed --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified managed cluster. + * + * @summary Get the status of a specific operation in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGet.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.get( + resourceGroupName, + resourceName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultListSample.ts new file mode 100644 index 00000000000..c7b6065ddc2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationStatusResultListSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of operations in the specified managedCluster + * + * @summary Gets a list of operations in the specified managedCluster + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultList.json + */ +async function listOfOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationStatusResultOperations.list( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOfOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/operationsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/operationsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationsListSample.ts index 8d60588421d..752125e7633 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/operationsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of operations. * * @summary Gets a list of operations. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/Operation_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/Operation_List.json */ async function listAvailableOperationsForTheContainerServiceResourceProvider() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index a32c8f41e78..5b4a5353e65 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsGetSample.ts index cffc3207864..f29c79937fa 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsListSample.ts index e6f1590d102..eb71dc16998 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts index 5691e0d46d3..00cce910492 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateLinkResourcesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateLinkResourcesListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateLinkResourcesListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateLinkResourcesListSample.ts index 00ff4b67b82..ab4a8144d84 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/privateLinkResourcesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/resolvePrivateLinkServiceIdPostSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/resolvePrivateLinkServiceIdPostSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts index 6d756e4ca28..4bc763e050f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/resolvePrivateLinkServiceIdPostSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsCreateOrUpdateSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsCreateOrUpdateSample.ts index 4680ba688c3..06852294d6f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsDeleteSample.ts index 646390d9737..fdf98652ce2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsGetSample.ts index 34e9b9bede8..a82f5303571 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListByResourceGroupSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListByResourceGroupSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListByResourceGroupSample.ts index 8e8dce7809b..aa435810fa9 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListSample.ts index 203223d05e6..1c54045f95e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsUpdateTagsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsUpdateTagsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsUpdateTagsSample.ts index 33d12a910cb..6d693fc285c 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/snapshotsUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/snapshotsUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts index 7929d444a8a..64a54f274c9 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts index 2f2fff560af..ce2e130d32d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts index 007aba8b3c7..99698f02a53 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsListSample.ts index d4ab636316a..7fdd0e7a3a7 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRoleBindingsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRoleBindingsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRolesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRolesListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRolesListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRolesListSample.ts index 841fff32450..b418b3d9889 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/src/trustedAccessRolesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/src/trustedAccessRolesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-02-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v20/typescript/tsconfig.json b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/tsconfig.json similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v20/typescript/tsconfig.json rename to sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/tsconfig.json index e26ce2a6d8f..984eed535aa 100644 --- a/sdk/containerservice/arm-containerservice/samples/v20/typescript/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/samples/v20-beta/typescript/tsconfig.json @@ -12,6 +12,6 @@ "rootDir": "src" }, "include": [ - "src/**.ts" + "src/**/*.ts" ] } diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 272fa5ebc4d..8c20fd885fc 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -19,24 +19,32 @@ import { ManagedClustersImpl, MaintenanceConfigurationsImpl, AgentPoolsImpl, + MachinesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, + OperationStatusResultOperationsImpl, SnapshotsImpl, - TrustedAccessRoleBindingsImpl, + ManagedClusterSnapshotsImpl, TrustedAccessRolesImpl, + TrustedAccessRoleBindingsImpl, + LoadBalancersImpl, } from "./operations"; import { Operations, ManagedClusters, MaintenanceConfigurations, AgentPools, + Machines, PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, + OperationStatusResultOperations, Snapshots, - TrustedAccessRoleBindings, + ManagedClusterSnapshots, TrustedAccessRoles, + TrustedAccessRoleBindings, + LoadBalancers, } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -72,7 +80,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-containerservice/20.0.1`; + const packageDetails = `azsdk-js-arm-containerservice/20.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -126,19 +134,24 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-02-01"; + this.apiVersion = options.apiVersion || "2024-04-02-preview"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); this.agentPools = new AgentPoolsImpl(this); + this.machines = new MachinesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.resolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdImpl( this, ); + this.operationStatusResultOperations = + new OperationStatusResultOperationsImpl(this); this.snapshots = new SnapshotsImpl(this); - this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsImpl(this); this.trustedAccessRoles = new TrustedAccessRolesImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.loadBalancers = new LoadBalancersImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -174,10 +187,14 @@ export class ContainerServiceClient extends coreClient.ServiceClient { managedClusters: ManagedClusters; maintenanceConfigurations: MaintenanceConfigurations; agentPools: AgentPools; + machines: Machines; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; + operationStatusResultOperations: OperationStatusResultOperations; snapshots: Snapshots; - trustedAccessRoleBindings: TrustedAccessRoleBindings; + managedClusterSnapshots: ManagedClusterSnapshots; trustedAccessRoles: TrustedAccessRoles; + trustedAccessRoleBindings: TrustedAccessRoleBindings; + loadBalancers: LoadBalancers; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 87d444133f0..e9d049eefff 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -209,8 +209,19 @@ export interface PowerState { code?: Code; } +/** Data used when creating a target resource from a source resource. */ +export interface CreationData { + /** This is the ARM ID of the source object to be used to create the target object. */ + sourceResourceId?: string; +} + /** Properties for the container service agent pool profile. */ export interface ManagedClusterAgentPoolProfileProperties { + /** + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eTag?: string; /** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */ count?: number; /** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */ @@ -223,15 +234,19 @@ export interface ManagedClusterAgentPoolProfileProperties { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; + /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ + messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ podSubnetID?: string; + /** The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. */ + podIPAllocationMode?: PodIPAllocationMode; /** The maximum number of pods that can run on a node. */ maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -245,10 +260,10 @@ export interface ManagedClusterAgentPoolProfileProperties { type?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; /** - * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentOrchestratorVersion?: string; @@ -270,6 +285,8 @@ export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -284,6 +301,8 @@ export interface ManagedClusterAgentPoolProfileProperties { nodeLabels?: { [propertyName: string]: string }; /** The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ nodeTaints?: string[]; + /** These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-` */ + nodeInitializationTaints?: string[]; /** The ID for Proximity Placement Group. */ proximityPlacementGroupID?: string; /** The Kubelet configuration on the agent pool nodes. */ @@ -304,10 +323,22 @@ export interface ManagedClusterAgentPoolProfileProperties { capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; - /** Network-related settings of an agent pool. */ - networkProfile?: AgentPoolNetworkProfile; /** The Windows agent pool's specific profile. */ windowsProfile?: AgentPoolWindowsProfile; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; + /** The security settings of an agent pool. */ + securityProfile?: AgentPoolSecurityProfile; + /** The GPU settings of an agent pool. */ + gpuProfile?: AgentPoolGPUProfile; + /** Configuration for using artifact streaming on AKS. */ + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; + /** Specifications on VirtualMachines agent pool. */ + virtualMachinesProfile?: VirtualMachinesProfile; + /** The status of nodes in a VirtualMachines agent pool. */ + virtualMachineNodesStatus?: VirtualMachineNodes[]; + /** Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. */ + gatewayProfile?: AgentPoolGatewayProfile; } /** Settings for upgrading an agentpool */ @@ -318,6 +349,8 @@ export interface AgentPoolUpgradeSettings { drainTimeoutInMinutes?: number; /** The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes. */ nodeSoakDurationInMinutes?: number; + /** Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. */ + undrainableNodeBehavior?: UndrainableNodeBehavior; } /** See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. */ @@ -418,10 +451,10 @@ export interface SysctlConfig { vmVfsCachePressure?: number; } -/** Data used when creating a target resource from a source resource. */ -export interface CreationData { - /** This is the ARM ID of the source object to be used to create the target object. */ - sourceResourceId?: string; +/** The Windows agent pool's specific profile. */ +export interface AgentPoolWindowsProfile { + /** The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. */ + disableOutboundNat?: boolean; } /** Network settings of an agent pool. */ @@ -452,10 +485,70 @@ export interface PortRange { protocol?: Protocol; } -/** The Windows agent pool's specific profile. */ -export interface AgentPoolWindowsProfile { - /** The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. */ - disableOutboundNat?: boolean; +/** The security settings of an agent pool. */ +export interface AgentPoolSecurityProfile { + /** SSH access method of an agent pool. */ + sshAccess?: AgentPoolSSHAccess; + /** vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. */ + enableVtpm?: boolean; + /** Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. */ + enableSecureBoot?: boolean; +} + +export interface AgentPoolGPUProfile { + /** The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU driver installation themselves. */ + installGPUDriver?: boolean; +} + +export interface AgentPoolArtifactStreamingProfile { + /** Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. */ + enabled?: boolean; +} + +/** Specifications on VirtualMachines agent pool. */ +export interface VirtualMachinesProfile { + /** Specifications on how to scale a VirtualMachines agent pool. */ + scale?: ScaleProfile; +} + +/** Specifications on how to scale a VirtualMachines agent pool. */ +export interface ScaleProfile { + /** Specifications on how to scale the VirtualMachines agent pool to a fixed size. Currently, at most one ManualScaleProfile is allowed. */ + manual?: ManualScaleProfile[]; + /** Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. Currently, at most one AutoScaleProfile is allowed. */ + autoscale?: AutoScaleProfile[]; +} + +/** Specifications on number of machines. */ +export interface ManualScaleProfile { + /** The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the first available one when scaling. If a VM size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. */ + sizes?: string[]; + /** Number of nodes. */ + count?: number; +} + +/** Specifications on auto-scaling. */ +export interface AutoScaleProfile { + /** The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the first available one when auto scaling. If a VM size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. */ + sizes?: string[]; + /** The minimum number of nodes of the specified sizes. */ + minCount?: number; + /** The maximum number of nodes of the specified sizes. */ + maxCount?: number; +} + +/** Current status on a group of nodes of the same vm size. */ +export interface VirtualMachineNodes { + /** The VM size of the agents used to host this group of nodes. */ + size?: string; + /** Number of nodes. */ + count?: number; +} + +/** Profile of the managed cluster gateway agent pool. */ +export interface AgentPoolGatewayProfile { + /** The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. */ + publicIPPrefixSize?: number; } /** Profile for Linux VMs in the container service cluster. */ @@ -608,11 +701,17 @@ export interface ManagedClusterOidcIssuerProfile { enabled?: boolean; } +/** Node resource group lockdown profile for a managed cluster. */ +export interface ManagedClusterNodeResourceGroupProfile { + /** The restriction level applied to the cluster's node resource group */ + restrictionLevel?: RestrictionLevel; +} + /** Profile of network configuration. */ export interface ContainerServiceNetworkProfile { /** Network plugin used for building the Kubernetes network. */ networkPlugin?: NetworkPlugin; - /** The mode the network plugin should use. */ + /** Network plugin mode used for building the Kubernetes network. */ networkPluginMode?: NetworkPluginMode; /** Network policy used for building the Kubernetes network. */ networkPolicy?: NetworkPolicy; @@ -634,12 +733,20 @@ export interface ContainerServiceNetworkProfile { loadBalancerProfile?: ManagedClusterLoadBalancerProfile; /** Profile of the cluster NAT gateway. */ natGatewayProfile?: ManagedClusterNATGatewayProfile; + /** The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. */ + staticEgressGatewayProfile?: ManagedClusterStaticEgressGatewayProfile; /** 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[]; /** 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[]; /** IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. */ ipFamilies?: IpFamily[]; + /** Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. */ + podLinkLocalAccess?: PodLinkLocalAccess; + /** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; + /** Advanced Networking profile for enabling observability on a cluster. Note that enabling advanced networking features may incur additional costs. For more information see aka.ms/aksadvancednetworking. */ + advancedNetworking?: AdvancedNetworking; } /** Profile of the managed cluster load balancer. */ @@ -660,6 +767,8 @@ export interface ManagedClusterLoadBalancerProfile { enableMultipleStandardLoadBalancers?: boolean; /** The type of the managed inbound Load Balancer BackendPool. */ backendPoolType?: BackendPoolType; + /** The health probing behavior for External Traffic Policy Cluster services. */ + clusterServiceLoadBalancerHealthProbeMode?: ClusterServiceLoadBalancerHealthProbeMode; } /** Desired managed outbound IPs for the cluster load balancer. */ @@ -704,6 +813,46 @@ export interface ManagedClusterManagedOutboundIPProfile { count?: number; } +/** The Static Egress Gateway addon configuration for the cluster. */ +export interface ManagedClusterStaticEgressGatewayProfile { + /** Indicates if Static Egress Gateway addon is enabled or not. */ + enabled?: boolean; +} + +/** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfig { + /** Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). */ + enabled?: boolean; + /** Specify which proxy mode to use ('IPTABLES' or 'IPVS') */ + mode?: Mode; + /** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; +} + +/** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + /** IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. */ + scheduler?: IpvsScheduler; + /** The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. */ + tcpTimeoutSeconds?: number; + /** The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. */ + tcpFinTimeoutSeconds?: number; + /** The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. */ + udpTimeoutSeconds?: number; +} + +/** Advanced Networking profile for enabling observability on a cluster. Note that enabling advanced networking features may incur additional costs. For more information see aka.ms/aksadvancednetworking. */ +export interface AdvancedNetworking { + /** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ + observability?: AdvancedNetworkingObservability; +} + +/** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ +export interface AdvancedNetworkingObservability { + /** Indicates the enablement of Advanced Networking observability functionalities on clusters. */ + enabled?: boolean; +} + /** For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). */ export interface ManagedClusterAADProfile { /** Whether to enable managed AAD. */ @@ -726,7 +875,7 @@ export interface ManagedClusterAADProfile { export interface ManagedClusterAutoUpgradeProfile { /** For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). */ upgradeChannel?: UpgradeChannel; - /** Manner in which the OS on your nodes is updated. The default is NodeImage. */ + /** The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. */ nodeOSUpgradeChannel?: NodeOSUpgradeChannel; } @@ -748,7 +897,13 @@ export interface UpgradeOverrideSettings { export interface ManagedClusterPropertiesAutoScalerProfile { /** Valid values are 'true' and 'false' */ balanceSimilarNodeGroups?: string; - /** If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information. */ + /** If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. */ + daemonsetEvictionForEmptyNodes?: boolean; + /** If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted. */ + daemonsetEvictionForOccupiedNodes?: boolean; + /** If set to true, the resources used by daemonset will be taken into account when making scaling down decisions. */ + ignoreDaemonsetsUtilization?: boolean; + /** Available values are: 'least-waste', 'most-pods', 'priority', 'random'. */ expander?: Expander; /** The default is 10. */ maxEmptyBulkDelete?: string; @@ -794,6 +949,10 @@ export interface ManagedClusterAPIServerAccessProfile { enablePrivateClusterPublicFqdn?: boolean; /** Whether to disable run command for the cluster or not. */ disableRunCommand?: boolean; + /** Whether to enable apiserver vnet integration for the cluster or not. */ + enableVnetIntegration?: boolean; + /** It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. */ + subnetId?: string; } /** A private link resource */ @@ -823,6 +982,11 @@ export interface ManagedClusterHttpProxyConfig { httpsProxy?: string; /** The endpoints that should not go through proxy. */ noProxy?: string[]; + /** + * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of noProxy and values injected by AKS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly effectiveNoProxy?: string[]; /** Alternative CA cert to use for connecting to proxy servers. */ trustedCa?: string; } @@ -837,6 +1001,12 @@ export interface ManagedClusterSecurityProfile { workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; /** Image Cleaner settings for the security profile. */ imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + /** Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. See https://aka.ms/aks/image-integrity for how to use this feature via policy. */ + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; + /** [Node Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) settings for the security profile. */ + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; + /** A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust feature enabled. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority) */ + customCATrustCertificates?: Uint8Array[]; } /** Microsoft Defender settings for the security profile. */ @@ -879,6 +1049,18 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +/** Image integrity related settings for the security profile. */ +export interface ManagedClusterSecurityProfileImageIntegrity { + /** Whether to enable image integrity. The default value is false. */ + enabled?: boolean; +} + +/** Node Restriction settings for the security profile. */ +export interface ManagedClusterSecurityProfileNodeRestriction { + /** Whether to enable Node Restriction */ + enabled?: boolean; +} + /** Storage profile for the container service cluster. */ export interface ManagedClusterStorageProfile { /** AzureDisk CSI Driver settings for the storage profile. */ @@ -895,6 +1077,8 @@ export interface ManagedClusterStorageProfile { export interface ManagedClusterStorageProfileDiskCSIDriver { /** Whether to enable AzureDisk CSI Driver. The default value is true. */ enabled?: boolean; + /** The version of AzureDisk CSI Driver. The default value is v1. */ + version?: string; } /** AzureFile CSI Driver settings for the storage profile. */ @@ -917,18 +1101,18 @@ export interface ManagedClusterStorageProfileBlobCSIDriver { /** Ingress profile for the container service cluster. */ export interface ManagedClusterIngressProfile { - /** App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. */ + /** Web App Routing settings for the ingress profile. */ webAppRouting?: ManagedClusterIngressProfileWebAppRouting; } -/** Application Routing add-on settings for the ingress profile. */ +/** Web App Routing settings for the ingress profile. */ export interface ManagedClusterIngressProfileWebAppRouting { - /** Whether to enable the Application Routing add-on. */ + /** Whether to enable Web App Routing. */ enabled?: boolean; - /** Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group. */ + /** Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group. */ dnsZoneResourceIds?: string[]; /** - * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. + * Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly identity?: UserAssignedIdentity; @@ -938,7 +1122,6 @@ export interface ManagedClusterIngressProfileWebAppRouting { export interface ManagedClusterWorkloadAutoScalerProfile { /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ keda?: ManagedClusterWorkloadAutoScalerProfileKeda; - /** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } @@ -948,34 +1131,100 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } -/** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { - /** Whether to enable VPA. Default value is false. */ + /** Whether to enable VPA add-on in cluster. Default value is false. */ enabled: boolean; + /** Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. */ + addonAutoscaling?: AddonAutoscaling; } -/** Azure Monitor addon profiles for monitoring the managed cluster. */ +/** Prometheus addon profile for the container service cluster */ export interface ManagedClusterAzureMonitorProfile { - /** Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. */ + /** Metrics profile for the prometheus service addon */ metrics?: ManagedClusterAzureMonitorProfileMetrics; + /** Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. */ + containerInsights?: ManagedClusterAzureMonitorProfileContainerInsights; + /** Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + appMonitoring?: ManagedClusterAzureMonitorProfileAppMonitoring; } -/** Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. */ +/** Metrics profile for the prometheus service addon */ export interface ManagedClusterAzureMonitorProfileMetrics { - /** Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. */ + /** Whether to enable the Prometheus collector */ enabled: boolean; - /** Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. */ + /** Kube State Metrics for prometheus addon profile for the container service cluster */ kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; } -/** Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. */ +/** Kube State Metrics for prometheus addon profile for the container service cluster */ export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { - /** Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels. */ + /** Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. */ metricLabelsAllowlist?: string; - /** Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only resource name and namespace labels. */ + /** Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. */ metricAnnotationsAllowList?: string; } +/** Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. */ +export interface ManagedClusterAzureMonitorProfileContainerInsights { + /** Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. */ + enabled?: boolean; + /** Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights Logs. */ + logAnalyticsWorkspaceResourceId?: string; + /** The syslog host port. If not specified, the default port is 28330. */ + syslogPort?: number; + /** Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No custom metrics will be emitted if this field is false but the container insights enabled field is false */ + disableCustomMetrics?: boolean; + /** Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the container insights enabled field is false */ + disablePrometheusMetricsScraping?: boolean; +} + +/** Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoring { + /** Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + autoInstrumentation?: ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; + /** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + openTelemetryMetrics?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; + /** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + openTelemetryLogs?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; +} + +/** Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation { + /** Indicates if Application Monitoring Auto Instrumentation is enabled or not. */ + enabled?: boolean; +} + +/** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics { + /** Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. */ + enabled?: boolean; + /** The Open Telemetry host port for Open Telemetry metrics. If not specified, the default port is 28333. */ + port?: number; +} + +/** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs { + /** Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. */ + enabled?: boolean; + /** The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the default port is 28331. */ + port?: number; +} + +/** The Safeguards profile. */ +export interface SafeguardsProfile { + /** + * List of namespaces specified by AKS to be excluded from Safeguards + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemExcludedNamespaces?: string[]; + /** The version of constraints to use */ + version?: string; + /** The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces */ + level: Level; + /** List of namespaces excluded from Safeguards checks */ + excludedNamespaces?: string[]; +} + /** Service mesh profile for a managed cluster. */ export interface ServiceMeshProfile { /** Mode of the service mesh. */ @@ -1048,6 +1297,25 @@ export interface ManagedClusterCostAnalysis { enabled?: boolean; } +/** When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed inference against them. */ +export interface ManagedClusterAIToolchainOperatorProfile { + /** Indicates if AI toolchain operator enabled or not. */ + enabled?: boolean; +} + +export interface ManagedClusterNodeProvisioningProfile { + /** Once the mode it set to Auto, it cannot be changed back to Manual. */ + mode?: NodeProvisioningMode; +} + +/** The bootstrap profile. */ +export interface ManagedClusterBootstrapProfile { + /** The source where the artifacts are downloaded from. */ + artifactSource?: ArtifactSource; + /** The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. */ + containerRegistryId?: string; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -1121,6 +1389,8 @@ export interface ManagedClusterPoolUpgradeProfile { osType: OSType; /** List of orchestrator types and versions available for upgrade. */ upgrades?: ManagedClusterPoolUpgradeProfileUpgradesItem[]; + /** List of components grouped by kubernetes major.minor version. */ + componentsByReleases?: ComponentsByRelease[]; } export interface ManagedClusterPoolUpgradeProfileUpgradesItem { @@ -1130,6 +1400,23 @@ export interface ManagedClusterPoolUpgradeProfileUpgradesItem { isPreview?: boolean; } +/** components of given Kubernetes version. */ +export interface ComponentsByRelease { + /** The Kubernetes version (major.minor). */ + kubernetesVersion?: string; + /** components of current or upgraded Kubernetes version in the cluster. */ + components?: Component[]; +} + +export interface Component { + /** Component name. */ + name?: string; + /** Component version. */ + version?: string; + /** If upgraded component version contains breaking changes from the current version. To see a detailed description of what the breaking changes are, visit https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. */ + hasBreakingChanges?: boolean; +} + /** The list credential result response. */ export interface CredentialResults { /** @@ -1240,7 +1527,7 @@ export interface AbsoluteMonthlySchedule { export interface RelativeMonthlySchedule { /** Specifies the number of months between each set of occurrences. */ intervalMonths: number; - /** Specifies on which week of the month the dayOfWeek applies. */ + /** Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. */ weekIndex: Type; /** Specifies on which day of the week the maintenance occurs. */ dayOfWeek: WeekDay; @@ -1307,6 +1594,8 @@ export interface AgentPoolUpgradeProfile { osType: OSType; /** List of orchestrator types and versions available for upgrade. */ upgrades?: AgentPoolUpgradeProfilePropertiesUpgradesItem[]; + /** List of components grouped by kubernetes major.minor version. */ + componentsByReleases?: ComponentsByRelease[]; /** The latest AKS supported node image version. */ latestNodeImageVersion?: string; } @@ -1318,6 +1607,109 @@ export interface AgentPoolUpgradeProfilePropertiesUpgradesItem { isPreview?: boolean; } +/** Specifies a list of machine names from the agent pool to be deleted. */ +export interface AgentPoolDeleteMachinesParameter { + /** The agent pool machine names. */ + machineNames: string[]; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** The response from the List Machines operation. */ +export interface MachineListResult { + /** The list of Machines in cluster. */ + value?: Machine[]; + /** + * The URL to get the next set of machine results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The properties of the machine */ +export interface MachineProperties { + /** + * network properties of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly network?: MachineNetworkProperties; + /** + * Arm resource id of the machine. It can be used to GET underlying VM Instance + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; +} + +/** network properties of the machine */ +export interface MachineNetworkProperties { + /** + * IPv4, IPv6 addresses of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddresses?: MachineIpAddress[]; +} + +/** The machine IP address details. */ +export interface MachineIpAddress { + /** + * IPv4 or IPv6 address of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ip?: string; + /** + * To determine if address belongs IPv4 or IPv6 family. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly family?: IpFamily; +} + /** The list of available versions for an agent pool. */ export interface AgentPoolAvailableVersions { /** @@ -1490,6 +1882,45 @@ export interface EndpointDetail { description?: string; } +/** The operations list. It contains an URL link to get the next set of results. */ +export interface OperationStatusResultList { + /** + * List of operations + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: OperationStatusResult[]; + /** + * 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 current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** + * Fully qualified ID of the resource against which the original async operation was started. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; +} + /** The response from the List Snapshots operation. */ export interface SnapshotListResult { /** The list of snapshots. */ @@ -1501,109 +1932,44 @@ export interface SnapshotListResult { readonly nextLink?: string; } -/** Holds an array of MeshRevisionsProfiles */ -export interface MeshRevisionProfileList { - /** Array of service mesh add-on revision profiles for all supported mesh modes. */ - value?: MeshRevisionProfile[]; +/** The response from the List Managed Cluster Snapshots operation. */ +export interface ManagedClusterSnapshotListResult { + /** The list of managed cluster snapshots. */ + value?: ManagedClusterSnapshot[]; /** - * The URL to get the next set of mesh revision profile. + * The URL to get the next set of managed cluster snapshot results. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; } -/** Mesh revision profile properties for a mesh */ -export interface MeshRevisionProfileProperties { - meshRevisions?: MeshRevision[]; +/** managed cluster properties for snapshot, these properties are read only. */ +export interface ManagedClusterPropertiesForSnapshot { + /** The current kubernetes version. */ + kubernetesVersion?: string; + /** The current managed cluster sku. */ + sku?: ManagedClusterSKU; + /** Whether the cluster has enabled Kubernetes Role-Based Access Control or not. */ + enableRbac?: boolean; + /** + * The current network profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkProfile?: NetworkProfileForSnapshot; } -/** Holds information on upgrades and compatibility for given major.minor mesh release. */ -export interface MeshRevision { - /** The revision of the mesh release. */ - revision?: string; - /** List of revisions available for upgrade of a specific mesh revision */ - upgrades?: string[]; - /** List of items this revision of service mesh is compatible with, and their associated versions. */ - compatibleWith?: CompatibleVersions[]; -} - -/** Version information about a product/service that is compatible with a service mesh revision. */ -export interface CompatibleVersions { - /** The product/service name. */ - name?: string; - /** Product/service versions compatible with a service mesh add-on revision. */ - versions?: string[]; -} - -/** Holds an array of MeshUpgradeProfiles */ -export interface MeshUpgradeProfileList { - /** Array of supported service mesh add-on upgrade profiles. */ - value?: MeshUpgradeProfile[]; - /** - * The URL to get the next set of mesh upgrade profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** List of trusted access role bindings */ -export interface TrustedAccessRoleBindingListResult { - /** Role binding list */ - value?: TrustedAccessRoleBinding[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; +/** network profile for managed cluster snapshot, these properties are read only. */ +export interface NetworkProfileForSnapshot { + /** networkPlugin for managed cluster snapshot. */ + networkPlugin?: NetworkPlugin; + /** NetworkPluginMode for managed cluster snapshot. */ + networkPluginMode?: NetworkPluginMode; + /** networkPolicy for managed cluster snapshot. */ + networkPolicy?: NetworkPolicy; + /** networkMode for managed cluster snapshot. */ + networkMode?: NetworkMode; + /** loadBalancerSku for managed cluster snapshot. */ + loadBalancerSku?: LoadBalancerSku; } /** List of trusted access roles */ @@ -1668,6 +2034,141 @@ export interface TrustedAccessRoleRule { readonly nonResourceURLs?: string[]; } +/** List of trusted access role bindings */ +export interface TrustedAccessRoleBindingListResult { + /** Role binding list */ + value?: TrustedAccessRoleBinding[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Whether the version is default or not and support info. */ +export interface GuardrailsAvailableVersionsProperties { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly isDefaultVersion?: boolean; + /** + * Whether the version is preview or stable. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly support?: GuardrailsSupport; +} + +/** Hold values properties, which is array of GuardrailsVersions */ +export interface GuardrailsAvailableVersionsList { + /** Array of AKS supported Guardrails versions. */ + value?: GuardrailsAvailableVersion[]; + /** + * The URL to get the next Guardrails available version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Whether the version is default or not and support info. */ +export interface SafeguardsAvailableVersionsProperties { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly isDefaultVersion?: boolean; + /** + * Whether the version is preview or stable. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly support?: SafeguardsSupport; +} + +/** Hold values properties, which is array of SafeguardsVersions */ +export interface SafeguardsAvailableVersionsList { + /** Array of AKS supported Safeguards versions. */ + value?: SafeguardsAvailableVersion[]; + /** + * The URL to get the next Safeguards available version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Holds an array of MeshRevisionsProfiles */ +export interface MeshRevisionProfileList { + /** Array of service mesh add-on revision profiles for all supported mesh modes. */ + value?: MeshRevisionProfile[]; + /** + * The URL to get the next set of mesh revision profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Mesh revision profile properties for a mesh */ +export interface MeshRevisionProfileProperties { + meshRevisions?: MeshRevision[]; +} + +/** Holds information on upgrades and compatibility for given major.minor mesh release. */ +export interface MeshRevision { + /** The revision of the mesh release. */ + revision?: string; + /** List of revisions available for upgrade of a specific mesh revision */ + upgrades?: string[]; + /** List of items this revision of service mesh is compatible with, and their associated versions. */ + compatibleWith?: CompatibleVersions[]; +} + +/** Version information about a product/service that is compatible with a service mesh revision. */ +export interface CompatibleVersions { + /** The product/service name. */ + name?: string; + /** Product/service versions compatible with a service mesh add-on revision. */ + versions?: string[]; +} + +/** Holds an array of MeshUpgradeProfiles */ +export interface MeshUpgradeProfileList { + /** Array of supported service mesh add-on upgrade profiles. */ + value?: MeshUpgradeProfile[]; + /** + * The URL to get the next set of mesh upgrade profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The response from the List Load Balancers operation. */ +export interface LoadBalancerListResult { + /** The list of Load Balancers. */ + value?: LoadBalancer[]; + /** + * The URL to get the next set of load balancer results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. */ +export interface LabelSelector { + /** matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only `value`. The requirements are ANDed. */ + matchLabels?: string[]; + /** matchExpressions is a list of label selector requirements. The requirements are ANDed. */ + matchExpressions?: LabelSelectorRequirement[]; +} + +/** A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ +export interface LabelSelectorRequirement { + /** key is the label key that the selector applies to. */ + key?: string; + /** operator represents a key's relationship to a set of values. Valid operators are In and NotIn */ + operator?: Operator; + /** values is an array of string values, the values array must be non-empty. */ + values?: string[]; +} + +/** The names of the load balancers to rebalance. If set to empty, all load balancers will be rebalanced. */ +export interface RebalanceLoadBalancersRequestBody { + /** The load balancer names list. */ + loadBalancerNames?: string[]; +} + /** Profile for the container service agent pool. */ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { @@ -1687,9 +2188,6 @@ 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 {} - /** Defines binding between a resource and role */ export interface TrustedAccessRoleBinding extends Resource { /** @@ -1703,6 +2201,21 @@ export interface TrustedAccessRoleBinding extends Resource { roles: string[]; } +/** Available Guardrails Version */ +export interface GuardrailsAvailableVersion extends Resource { + /** Whether the version is default or not and support info. */ + properties: GuardrailsAvailableVersionsProperties; +} + +/** Available Safeguards Version */ +export interface SafeguardsAvailableVersion extends Resource { + /** Whether the version is default or not and support info. */ + properties: SafeguardsAvailableVersionsProperties; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned maintenance. */ export interface MaintenanceConfiguration extends SubResource { /** @@ -1720,6 +2233,11 @@ export interface MaintenanceConfiguration extends SubResource { /** Agent Pool. */ export interface AgentPool extends SubResource { + /** + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eTag?: string; /** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */ count?: number; /** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */ @@ -1732,15 +2250,19 @@ export interface AgentPool extends SubResource { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; + /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ + messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ podSubnetID?: string; + /** The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. */ + podIPAllocationMode?: PodIPAllocationMode; /** The maximum number of pods that can run on a node. */ maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -1754,10 +2276,10 @@ export interface AgentPool extends SubResource { typePropertiesType?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; /** - * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentOrchestratorVersion?: string; @@ -1779,6 +2301,8 @@ export interface AgentPool extends SubResource { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -1793,6 +2317,8 @@ export interface AgentPool extends SubResource { nodeLabels?: { [propertyName: string]: string }; /** The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ nodeTaints?: string[]; + /** These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-` */ + nodeInitializationTaints?: string[]; /** The ID for Proximity Placement Group. */ proximityPlacementGroupID?: string; /** The Kubelet configuration on the agent pool nodes. */ @@ -1813,10 +2339,31 @@ export interface AgentPool extends SubResource { capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; - /** Network-related settings of an agent pool. */ - networkProfile?: AgentPoolNetworkProfile; /** The Windows agent pool's specific profile. */ windowsProfile?: AgentPoolWindowsProfile; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; + /** The security settings of an agent pool. */ + securityProfile?: AgentPoolSecurityProfile; + /** The GPU settings of an agent pool. */ + gpuProfile?: AgentPoolGPUProfile; + /** Configuration for using artifact streaming on AKS. */ + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; + /** Specifications on VirtualMachines agent pool. */ + virtualMachinesProfile?: VirtualMachinesProfile; + /** The status of nodes in a VirtualMachines agent pool. */ + virtualMachineNodesStatus?: VirtualMachineNodes[]; + /** Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. */ + gatewayProfile?: AgentPoolGatewayProfile; +} + +/** A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. */ +export interface Machine extends SubResource { + /** + * The properties of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: MachineProperties; } /** Mesh upgrade profile properties for a major.minor release. */ @@ -1824,12 +2371,19 @@ export interface MeshUpgradeProfileProperties extends MeshRevision {} /** Managed cluster. */ export interface ManagedCluster extends TrackedResource { + /** + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eTag?: string; /** The managed cluster SKU. */ sku?: ManagedClusterSKU; /** The extended location of the Virtual Machine. */ extendedLocation?: ExtendedLocation; /** The identity of the managed cluster, if configured. */ identity?: ManagedClusterIdentity; + /** This is primarily used to expose different UI experiences in the portal for different kinds */ + kind?: string; /** * The current provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1840,15 +2394,17 @@ export interface ManagedCluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly powerState?: PowerState; + /** CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. */ + creationData?: CreationData; /** * The max number of agent pools for the managed cluster. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly maxAgentPools?: number; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ + /** When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ kubernetesVersion?: string; /** - * If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used. + * The version of Kubernetes the Managed Cluster is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentKubernetesVersion?: string; @@ -1887,12 +2443,16 @@ export interface ManagedCluster extends TrackedResource { oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; /** The name of the resource group containing agent pool nodes. */ nodeResourceGroup?: string; + /** The node resource group configuration profile. */ + nodeResourceGroupProfile?: ManagedClusterNodeResourceGroupProfile; /** Whether to enable Kubernetes Role-Based Access Control. */ enableRbac?: boolean; /** The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. */ supportPlan?: KubernetesSupportPlan; /** (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. */ enablePodSecurityPolicy?: boolean; + /** The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. */ + enableNamespaceResources?: boolean; /** The network configuration profile. */ networkProfile?: ContainerServiceNetworkProfile; /** The Azure Active Directory configuration. */ @@ -1925,8 +2485,10 @@ export interface ManagedCluster extends TrackedResource { publicNetworkAccess?: PublicNetworkAccess; /** Workload Auto-scaler profile for the managed cluster. */ workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; - /** Azure Monitor addon profiles for monitoring the managed cluster. */ + /** Prometheus addon profile for the container service cluster */ azureMonitorProfile?: ManagedClusterAzureMonitorProfile; + /** The Safeguards profile holds all the safeguards information for a given cluster */ + safeguardsProfile?: SafeguardsProfile; /** Service mesh profile for a managed cluster. */ serviceMeshProfile?: ServiceMeshProfile; /** @@ -1936,6 +2498,12 @@ export interface ManagedCluster extends TrackedResource { readonly resourceUID?: string; /** Optional cluster metrics configuration. */ metricsProfile?: ManagedClusterMetricsProfile; + /** AI toolchain operator settings that apply to the whole cluster. */ + aiToolchainOperatorProfile?: ManagedClusterAIToolchainOperatorProfile; + /** Node provisioning settings that apply to the whole cluster. */ + nodeProvisioningProfile?: ManagedClusterNodeProvisioningProfile; + /** Profile of the cluster bootstrap configuration. */ + bootstrapProfile?: ManagedClusterBootstrapProfile; } /** Managed cluster Access Profile. */ @@ -1966,7 +2534,7 @@ export interface Snapshot extends TrackedResource { */ readonly osType?: OSType; /** - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osSku?: Ossku; @@ -1982,6 +2550,19 @@ export interface Snapshot extends TrackedResource { readonly enableFips?: boolean; } +/** A managed cluster snapshot resource. */ +export interface ManagedClusterSnapshot extends TrackedResource { + /** CreationData to be used to specify the source resource ID to create this snapshot. */ + creationData?: CreationData; + /** The type of a snapshot. The default is NodePool. */ + snapshotType?: SnapshotType; + /** + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; +} + /** Mesh revision profile for a mesh. */ export interface MeshRevisionProfile extends ProxyResource { /** Mesh revision profile properties for a mesh */ @@ -1994,6 +2575,27 @@ export interface MeshUpgradeProfile extends ProxyResource { properties?: MeshUpgradeProfileProperties; } +/** The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration named `kubernetes`. */ +export interface LoadBalancer extends ProxyResource { + /** Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list. */ + namePropertiesName?: string; + /** Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. */ + primaryAgentPoolName?: string; + /** Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it. */ + allowServicePlacement?: boolean; + /** Only services that must match this selector can be placed on this load balancer. */ + serviceLabelSelector?: LabelSelector; + /** Services created in namespaces that match the selector can be placed on this load balancer. */ + serviceNamespaceSelector?: LabelSelector; + /** Nodes that match this selector will be possible members of this load balancer. */ + nodeSelector?: LabelSelector; + /** + * The current provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + /** Defines headers for ManagedClusters_delete operation. */ export interface ManagedClustersDeleteHeaders { /** URL to query for status of the operation. */ @@ -2012,12 +2614,6 @@ export interface ManagedClustersResetAADProfileHeaders { location?: string; } -/** Defines headers for ManagedClusters_rotateClusterCertificates operation. */ -export interface ManagedClustersRotateClusterCertificatesHeaders { - /** URL to query for status of the operation. */ - location?: string; -} - /** Defines headers for ManagedClusters_abortLatestOperation operation. */ export interface ManagedClustersAbortLatestOperationHeaders { /** URL to query for status of the operation. */ @@ -2026,8 +2622,15 @@ export interface ManagedClustersAbortLatestOperationHeaders { azureAsyncOperation?: string; } +/** Defines headers for ManagedClusters_rotateClusterCertificates operation. */ +export interface ManagedClustersRotateClusterCertificatesHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Defines headers for ManagedClusters_rotateServiceAccountSigningKeys operation. */ export interface ManagedClustersRotateServiceAccountSigningKeysHeaders { + /** URL to query for status of the operation. */ location?: string; } @@ -2055,6 +2658,12 @@ export interface ManagedClustersGetCommandResultHeaders { location?: string; } +/** Defines headers for ManagedClusters_rebalanceLoadBalancers operation. */ +export interface ManagedClustersRebalanceLoadBalancersHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Defines headers for AgentPools_abortLatestOperation operation. */ export interface AgentPoolsAbortLatestOperationHeaders { /** URL to query for status of the operation. */ @@ -2069,6 +2678,12 @@ export interface AgentPoolsDeleteHeaders { location?: string; } +/** Defines headers for AgentPools_deleteMachines operation. */ +export interface AgentPoolsDeleteMachinesHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Defines headers for AgentPools_upgradeNodeImageVersion operation. */ export interface AgentPoolsUpgradeNodeImageVersionHeaders { /** URL to query for status of the operation. */ @@ -2081,6 +2696,12 @@ export interface TrustedAccessRoleBindingsDeleteHeaders { location?: string; } +/** Defines headers for LoadBalancers_delete operation. */ +export interface LoadBalancersDeleteHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Known values of {@link KubernetesSupportPlan} that the service accepts. */ export enum KnownKubernetesSupportPlan { /** Support for the version is the same as for the open source Kubernetes offering. Official Kubernetes open source community support versions for 1 year after release. */ @@ -2103,6 +2724,8 @@ export type KubernetesSupportPlan = string; export enum KnownManagedClusterSKUName { /** Base option for the AKS control plane. */ Base = "Base", + /** Automatic clusters are optimized to run most production workloads with configuration that follows AKS best practices and recommendations for cluster and workload setup, scalability, and security. For more details about Automatic clusters see aka.ms\/aks\/automatic. */ + Automatic = "Automatic", } /** @@ -2110,7 +2733,8 @@ export enum KnownManagedClusterSKUName { * {@link KnownManagedClusterSKUName} can be used interchangeably with ManagedClusterSKUName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Base**: Base option for the AKS control plane. + * **Base**: Base option for the AKS control plane. \ + * **Automatic**: Automatic clusters are optimized to run most production workloads with configuration that follows AKS best practices and recommendations for cluster and workload setup, scalability, and security. For more details about Automatic clusters see aka.ms\/aks\/automatic. */ export type ManagedClusterSKUName = string; @@ -2210,6 +2834,8 @@ export enum KnownWorkloadRuntime { OCIContainer = "OCIContainer", /** Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). */ WasmWasi = "WasmWasi", + /** Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support Nested Virtualization such as Dv3 series. */ + KataMshvVmIsolation = "KataMshvVmIsolation", } /** @@ -2218,10 +2844,29 @@ export enum KnownWorkloadRuntime { * this enum contains the known values that the service supports. * ### Known values supported by the service * **OCIContainer**: Nodes will use Kubelet to run standard OCI container workloads. \ - * **WasmWasi**: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + * **WasmWasi**: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). \ + * **KataMshvVmIsolation**: Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support Nested Virtualization such as Dv3 series. */ export type WorkloadRuntime = string; +/** Known values of {@link PodIPAllocationMode} that the service accepts. */ +export enum KnownPodIPAllocationMode { + /** Each pod gets a single IP address assigned. This is better for maximizing a small to medium subnet of size \/16 or smaller. The Azure CNI cluster with dynamic IP allocation defaults to this mode if the customer does not explicitly specify a podIPAllocationMode */ + DynamicIndividual = "DynamicIndividual", + /** Each node is statically allocated CIDR block(s) of size \/28 = 16 IPs per block to satisfy the maxPods per node. Number of CIDR blocks >= (maxPods \/ 16). The block, rather than a single IP, counts against the Azure Vnet Private IP limit of 65K. Therefore block mode is suitable for running larger workloads with more than the current limit of 65K pods in a cluster. This mode is better suited to scale with larger subnets of \/15 or bigger */ + StaticBlock = "StaticBlock", +} + +/** + * Defines values for PodIPAllocationMode. \ + * {@link KnownPodIPAllocationMode} can be used interchangeably with PodIPAllocationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DynamicIndividual**: Each pod gets a single IP address assigned. This is better for maximizing a small to medium subnet of size \/16 or smaller. The Azure CNI cluster with dynamic IP allocation defaults to this mode if the customer does not explicitly specify a podIPAllocationMode \ + * **StaticBlock**: Each node is statically allocated CIDR block(s) of size \/28 = 16 IPs per block to satisfy the maxPods per node. Number of CIDR blocks >= (maxPods \/ 16). The block, rather than a single IP, counts against the Azure Vnet Private IP limit of 65K. Therefore block mode is suitable for running larger workloads with more than the current limit of 65K pods in a cluster. This mode is better suited to scale with larger subnets of \/15 or bigger + */ +export type PodIPAllocationMode = string; + /** Known values of {@link OSType} that the service accepts. */ export enum KnownOSType { /** Use Linux. */ @@ -2244,6 +2889,8 @@ export type OSType = string; export enum KnownOssku { /** Use Ubuntu as the OS for node images. */ Ubuntu = "Ubuntu", + /** Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ + Mariner = "Mariner", /** Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https:\//aka.ms\/azurelinux for more information. */ AzureLinux = "AzureLinux", /** Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ @@ -2252,6 +2899,8 @@ export enum KnownOssku { Windows2019 = "Windows2019", /** Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. */ Windows2022 = "Windows2022", + /** Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in https:\//aka.ms\/aks\/windows-annual-channel-details. */ + WindowsAnnual = "WindowsAnnual", } /** @@ -2260,10 +2909,12 @@ export enum KnownOssku { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Ubuntu**: Use Ubuntu as the OS for node images. \ + * **Mariner**: Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. \ * **AzureLinux**: Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https:\/\/aka.ms\/azurelinux for more information. \ * **CBLMariner**: Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. \ * **Windows2019**: Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports Windows2019 containers; it cannot run Windows2022 containers and vice versa. \ - * **Windows2022**: Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. + * **Windows2022**: Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. \ + * **WindowsAnnual**: Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in https:\/\/aka.ms\/aks\/windows-annual-channel-details. */ export type Ossku = string; @@ -2291,6 +2942,8 @@ export enum KnownAgentPoolType { VirtualMachineScaleSets = "VirtualMachineScaleSets", /** Use of this is strongly discouraged. */ AvailabilitySet = "AvailabilitySet", + /** Create an Agent Pool backed by a Single Instance VM orchestration mode. */ + VirtualMachines = "VirtualMachines", } /** @@ -2299,7 +2952,8 @@ export enum KnownAgentPoolType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **VirtualMachineScaleSets**: Create an Agent Pool backed by a Virtual Machine Scale Set. \ - * **AvailabilitySet**: Use of this is strongly discouraged. + * **AvailabilitySet**: Use of this is strongly discouraged. \ + * **VirtualMachines**: Create an Agent Pool backed by a Single Instance VM orchestration mode. */ export type AgentPoolType = string; @@ -2309,6 +2963,8 @@ export enum KnownAgentPoolMode { System = "System", /** User agent pools are primarily for hosting your application pods. */ User = "User", + /** Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see https:\//aka.ms\/aks\/static-egress-gateway. */ + Gateway = "Gateway", } /** @@ -2317,10 +2973,29 @@ export enum KnownAgentPoolMode { * this enum contains the known values that the service supports. * ### Known values supported by the service * **System**: System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. \ - * **User**: User agent pools are primarily for hosting your application pods. + * **User**: User agent pools are primarily for hosting your application pods. \ + * **Gateway**: Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see https:\/\/aka.ms\/aks\/static-egress-gateway. */ export type AgentPoolMode = string; +/** Known values of {@link UndrainableNodeBehavior} that the service accepts. */ +export enum KnownUndrainableNodeBehavior { + /** AKS will cordon the blocked nodes and replace them with surge nodes during upgrade. The blocked nodes will be cordoned and replaced by surge nodes. The blocked nodes will have label 'kubernetes.azure.com\/upgrade-status:Quarantined'. A surge node will be retained for each blocked node. A best-effort attempt will be made to delete all other surge nodes. If there are enough surge nodes to replace blocked nodes, then the upgrade operation and the managed cluster will be in failed state. Otherwise, the upgrade operation and the managed cluster will be in canceled state. */ + Cordon = "Cordon", + /** AKS will mark the blocked nodes schedulable, but the blocked nodes are not upgraded. A best-effort attempt will be made to delete all surge nodes. The upgrade operation and the managed cluster will be in failed state if there are any blocked nodes. */ + Schedule = "Schedule", +} + +/** + * Defines values for UndrainableNodeBehavior. \ + * {@link KnownUndrainableNodeBehavior} can be used interchangeably with UndrainableNodeBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cordon**: AKS will cordon the blocked nodes and replace them with surge nodes during upgrade. The blocked nodes will be cordoned and replaced by surge nodes. The blocked nodes will have label 'kubernetes.azure.com\/upgrade-status:Quarantined'. A surge node will be retained for each blocked node. A best-effort attempt will be made to delete all other surge nodes. If there are enough surge nodes to replace blocked nodes, then the upgrade operation and the managed cluster will be in failed state. Otherwise, the upgrade operation and the managed cluster will be in canceled state. \ + * **Schedule**: AKS will mark the blocked nodes schedulable, but the blocked nodes are not upgraded. A best-effort attempt will be made to delete all surge nodes. The upgrade operation and the managed cluster will be in failed state if there are any blocked nodes. + */ +export type UndrainableNodeBehavior = string; + /** Known values of {@link ScaleSetPriority} that the service accepts. */ export enum KnownScaleSetPriority { /** Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on AKS](https:\//docs.microsoft.com\/azure\/aks\/spot-node-pool) for more information. */ @@ -2402,6 +3077,24 @@ export enum KnownProtocol { */ export type Protocol = string; +/** Known values of {@link AgentPoolSSHAccess} that the service accepts. */ +export enum KnownAgentPoolSSHAccess { + /** Can SSH onto the node as a local user using private key. */ + LocalUser = "LocalUser", + /** SSH service will be turned off on the node. */ + Disabled = "Disabled", +} + +/** + * Defines values for AgentPoolSSHAccess. \ + * {@link KnownAgentPoolSSHAccess} can be used interchangeably with AgentPoolSSHAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocalUser**: Can SSH onto the node as a local user using private key. \ + * **Disabled**: SSH service will be turned off on the node. + */ +export type AgentPoolSSHAccess = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** No additional licensing is applied. */ @@ -2450,13 +3143,31 @@ export enum KnownManagedClusterPodIdentityProvisioningState { */ export type ManagedClusterPodIdentityProvisioningState = string; +/** Known values of {@link RestrictionLevel} that the service accepts. */ +export enum KnownRestrictionLevel { + /** All RBAC permissions are allowed on the managed node resource group */ + Unrestricted = "Unrestricted", + /** Only *\/read RBAC permissions allowed on the managed node resource group */ + ReadOnly = "ReadOnly", +} + +/** + * Defines values for RestrictionLevel. \ + * {@link KnownRestrictionLevel} can be used interchangeably with RestrictionLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unrestricted**: All RBAC permissions are allowed on the managed node resource group \ + * **ReadOnly**: Only *\/read RBAC permissions allowed on the managed node resource group + */ +export type RestrictionLevel = string; + /** Known values of {@link NetworkPlugin} that the service accepts. */ export enum KnownNetworkPlugin { /** Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https:\//docs.microsoft.com\/azure\/aks\/concepts-network#azure-cni-advanced-networking) for more information. */ Azure = "azure", /** Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\//docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. */ Kubenet = "kubenet", - /** No CNI plugin is pre-installed. See [BYO CNI](https:\//docs.microsoft.com\/en-us\/azure\/aks\/use-byo-cni) for more information. */ + /** Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ None = "none", } @@ -2467,13 +3178,13 @@ export enum KnownNetworkPlugin { * ### Known values supported by the service * **azure**: Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#azure-cni-advanced-networking) for more information. \ * **kubenet**: Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. \ - * **none**: No CNI plugin is pre-installed. See [BYO CNI](https:\/\/docs.microsoft.com\/en-us\/azure\/aks\/use-byo-cni) for more information. + * **none**: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ export type NetworkPlugin = string; /** Known values of {@link NetworkPluginMode} that the service accepts. */ export enum KnownNetworkPluginMode { - /** Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet's method of route tables. For more information visit https:\//aka.ms\/aks\/azure-cni-overlay. */ + /** Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet reference plugins host-local and bridge. */ Overlay = "overlay", } @@ -2482,12 +3193,14 @@ export enum KnownNetworkPluginMode { * {@link KnownNetworkPluginMode} can be used interchangeably with NetworkPluginMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **overlay**: Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet's method of route tables. For more information visit https:\/\/aka.ms\/aks\/azure-cni-overlay. + * **overlay**: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet reference plugins host-local and bridge. */ export type NetworkPluginMode = string; /** Known values of {@link NetworkPolicy} that the service accepts. */ export enum KnownNetworkPolicy { + /** Network policies will not be enforced. This is the default value when NetworkPolicy is not specified. */ + None = "none", /** Use Calico network policies. See [differences between Azure and Calico policies](https:\//docs.microsoft.com\/azure\/aks\/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. */ Calico = "calico", /** Use Azure network policies. See [differences between Azure and Calico policies](https:\//docs.microsoft.com\/azure\/aks\/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. */ @@ -2501,6 +3214,7 @@ export enum KnownNetworkPolicy { * {@link KnownNetworkPolicy} can be used interchangeably with NetworkPolicy, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **none**: Network policies will not be enforced. This is the default value when NetworkPolicy is not specified. \ * **calico**: Use Calico network policies. See [differences between Azure and Calico policies](https:\/\/docs.microsoft.com\/azure\/aks\/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. \ * **azure**: Use Azure network policies. See [differences between Azure and Calico policies](https:\/\/docs.microsoft.com\/azure\/aks\/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. \ * **cilium**: Use Cilium to enforce network policies. This requires networkDataplane to be 'cilium'. @@ -2553,6 +3267,8 @@ export enum KnownOutboundType { ManagedNATGateway = "managedNATGateway", /** The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. */ UserAssignedNATGateway = "userAssignedNATGateway", + /** The AKS cluster is not set with any outbound-type. All AKS nodes follows Azure VM default outbound behavior. Please refer to https:\//azure.microsoft.com\/en-us\/updates\/default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access\/ */ + None = "none", } /** @@ -2563,7 +3279,8 @@ export enum KnownOutboundType { * **loadBalancer**: The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. For more information see [outbound type loadbalancer](https:\/\/docs.microsoft.com\/azure\/aks\/egress-outboundtype#outbound-type-of-loadbalancer). \ * **userDefinedRouting**: Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. For more information see [outbound type userDefinedRouting](https:\/\/docs.microsoft.com\/azure\/aks\/egress-outboundtype#outbound-type-of-userdefinedrouting). \ * **managedNATGateway**: The AKS-managed NAT gateway is used for egress. \ - * **userAssignedNATGateway**: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. + * **userAssignedNATGateway**: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. \ + * **none**: The AKS cluster is not set with any outbound-type. All AKS nodes follows Azure VM default outbound behavior. Please refer to https:\/\/azure.microsoft.com\/en-us\/updates\/default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access\/ */ export type OutboundType = string; @@ -2603,11 +3320,29 @@ export enum KnownBackendPoolType { */ export type BackendPoolType = string; +/** Known values of {@link ClusterServiceLoadBalancerHealthProbeMode} that the service accepts. */ +export enum KnownClusterServiceLoadBalancerHealthProbeMode { + /** Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. */ + ServiceNodePort = "ServiceNodePort", + /** All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe targeting the backend nodes' kube-proxy health check port 10256. */ + Shared = "Shared", +} + +/** + * Defines values for ClusterServiceLoadBalancerHealthProbeMode. \ + * {@link KnownClusterServiceLoadBalancerHealthProbeMode} can be used interchangeably with ClusterServiceLoadBalancerHealthProbeMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceNodePort**: Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. \ + * **Shared**: All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe targeting the backend nodes' kube-proxy health check port 10256. + */ +export type ClusterServiceLoadBalancerHealthProbeMode = string; + /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { - /** IPv4 */ + /** IPv4 family */ IPv4 = "IPv4", - /** IPv6 */ + /** IPv6 family */ IPv6 = "IPv6", } @@ -2616,11 +3351,65 @@ export enum KnownIpFamily { * {@link KnownIpFamily} can be used interchangeably with IpFamily, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **IPv4** \ - * **IPv6** + * **IPv4**: IPv4 family \ + * **IPv6**: IPv6 family */ export type IpFamily = string; +/** Known values of {@link PodLinkLocalAccess} that the service accepts. */ +export enum KnownPodLinkLocalAccess { + /** Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. */ + Imds = "IMDS", + /** Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). */ + None = "None", +} + +/** + * Defines values for PodLinkLocalAccess. \ + * {@link KnownPodLinkLocalAccess} can be used interchangeably with PodLinkLocalAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IMDS**: Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. \ + * **None**: Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). + */ +export type PodLinkLocalAccess = string; + +/** Known values of {@link Mode} that the service accepts. */ +export enum KnownMode { + /** IPTables proxy mode */ + Iptables = "IPTABLES", + /** IPVS proxy mode. Must be using Kubernetes version >= 1.22. */ + Ipvs = "IPVS", +} + +/** + * 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 + * **IPTABLES**: IPTables proxy mode \ + * **IPVS**: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + */ +export type Mode = string; + +/** Known values of {@link IpvsScheduler} that the service accepts. */ +export enum KnownIpvsScheduler { + /** Round Robin */ + RoundRobin = "RoundRobin", + /** Least Connection */ + LeastConnection = "LeastConnection", +} + +/** + * Defines values for IpvsScheduler. \ + * {@link KnownIpvsScheduler} can be used interchangeably with IpvsScheduler, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RoundRobin**: Round Robin \ + * **LeastConnection**: Least Connection + */ +export type IpvsScheduler = string; + /** Known values of {@link UpgradeChannel} that the service accepts. */ export enum KnownUpgradeChannel { /** Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest supported minor version, the cluster first upgrades to the latest supported patch version on N-1 minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. */ @@ -2652,8 +3441,10 @@ export type UpgradeChannel = string; export enum KnownNodeOSUpgradeChannel { /** No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates */ None = "None", - /** OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice */ + /** OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice */ Unmanaged = "Unmanaged", + /** AKS will update the nodes VHD with patches from the image maintainer labelled "security only" on a regular basis. Where possible, patches will also be applied without reimaging to existing nodes. Some patches, such as kernel patches, cannot be applied to existing nodes without disruption. For such patches, the VHD will be updated, and machines will be rolling reimaged to that VHD following maintenance windows and surge settings. This option incurs the extra cost of hosting the VHDs in your node resource group. */ + SecurityPatch = "SecurityPatch", /** AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ NodeImage = "NodeImage", } @@ -2664,7 +3455,8 @@ export enum KnownNodeOSUpgradeChannel { * this enum contains the known values that the service supports. * ### Known values supported by the service * **None**: No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates \ - * **Unmanaged**: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice \ + * **Unmanaged**: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice \ + * **SecurityPatch**: AKS will update the nodes VHD with patches from the image maintainer labelled "security only" on a regular basis. Where possible, patches will also be applied without reimaging to existing nodes. Some patches, such as kernel patches, cannot be applied to existing nodes without disruption. For such patches, the VHD will be updated, and machines will be rolling reimaged to that VHD following maintenance windows and surge settings. This option incurs the extra cost of hosting the VHDs in your node resource group. \ * **NodeImage**: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ export type NodeOSUpgradeChannel = string; @@ -2713,10 +3505,12 @@ export type KeyVaultNetworkAccessTypes = string; /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ + /** Inbound\/Outbound to the managedCluster is allowed. */ Enabled = "Enabled", - /** Disabled */ + /** Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. */ Disabled = "Disabled", + /** Inbound\/Outbound traffic is managed by Microsoft.Network\/NetworkSecurityPerimeters. */ + SecuredByPerimeter = "SecuredByPerimeter", } /** @@ -2724,11 +3518,51 @@ export enum KnownPublicNetworkAccess { * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled** \ - * **Disabled** + * **Enabled**: Inbound\/Outbound to the managedCluster is allowed. \ + * **Disabled**: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. \ + * **SecuredByPerimeter**: Inbound\/Outbound traffic is managed by Microsoft.Network\/NetworkSecurityPerimeters. */ export type PublicNetworkAccess = string; +/** Known values of {@link AddonAutoscaling} that the service accepts. */ +export enum KnownAddonAutoscaling { + /** Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. */ + Enabled = "Enabled", + /** Feature to autoscale AKS-managed add-ons is disabled. */ + Disabled = "Disabled", +} + +/** + * Defines values for AddonAutoscaling. \ + * {@link KnownAddonAutoscaling} can be used interchangeably with AddonAutoscaling, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. \ + * **Disabled**: Feature to autoscale AKS-managed add-ons is disabled. + */ +export type AddonAutoscaling = string; + +/** Known values of {@link Level} that the service accepts. */ +export enum KnownLevel { + /** Off */ + Off = "Off", + /** Warning */ + Warning = "Warning", + /** Enforcement */ + Enforcement = "Enforcement", +} + +/** + * Defines values for Level. \ + * {@link KnownLevel} can be used interchangeably with Level, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off** \ + * **Warning** \ + * **Enforcement** + */ +export type Level = string; + /** Known values of {@link ServiceMeshMode} that the service accepts. */ export enum KnownServiceMeshMode { /** Istio deployed as an AKS addon. */ @@ -2765,6 +3599,42 @@ export enum KnownIstioIngressGatewayMode { */ export type IstioIngressGatewayMode = string; +/** Known values of {@link NodeProvisioningMode} that the service accepts. */ +export enum KnownNodeProvisioningMode { + /** Nodes are provisioned manually by the user */ + Manual = "Manual", + /** Nodes are provisioned automatically by AKS using Karpenter. Fixed size Node Pools can still be created, but autoscaling Node Pools cannot be. (See aka.ms\/aks\/nap for more details). */ + Auto = "Auto", +} + +/** + * Defines values for NodeProvisioningMode. \ + * {@link KnownNodeProvisioningMode} can be used interchangeably with NodeProvisioningMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual**: Nodes are provisioned manually by the user \ + * **Auto**: Nodes are provisioned automatically by AKS using Karpenter. Fixed size Node Pools can still be created, but autoscaling Node Pools cannot be. (See aka.ms\/aks\/nap for more details). + */ +export type NodeProvisioningMode = string; + +/** Known values of {@link ArtifactSource} that the service accepts. */ +export enum KnownArtifactSource { + /** pull images from Azure Container Registry with cache */ + Cache = "Cache", + /** pull images from Microsoft Artifact Registry */ + Direct = "Direct", +} + +/** + * Defines values for ArtifactSource. \ + * {@link KnownArtifactSource} can be used interchangeably with ArtifactSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cache**: pull images from Azure Container Registry with cache \ + * **Direct**: pull images from Microsoft Artifact Registry + */ +export type ArtifactSource = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -2842,15 +3712,15 @@ export type WeekDay = string; /** Known values of {@link Type} that the service accepts. */ export enum KnownType { - /** First week of the month. */ + /** First. */ First = "First", - /** Second week of the month. */ + /** Second. */ Second = "Second", - /** Third week of the month. */ + /** Third. */ Third = "Third", - /** Fourth week of the month. */ + /** Fourth. */ Fourth = "Fourth", - /** Last week of the month. */ + /** Last. */ Last = "Last", } @@ -2859,11 +3729,11 @@ export enum KnownType { * {@link KnownType} can be used interchangeably with Type, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **First**: First week of the month. \ - * **Second**: Second week of the month. \ - * **Third**: Third week of the month. \ - * **Fourth**: Fourth week of the month. \ - * **Last**: Last week of the month. + * **First**: First. \ + * **Second**: Second. \ + * **Third**: Third. \ + * **Fourth**: Fourth. \ + * **Last**: Last. */ export type Type = string; @@ -2922,6 +3792,8 @@ export type ConnectionStatus = string; export enum KnownSnapshotType { /** The snapshot is a snapshot of a node pool. */ NodePool = "NodePool", + /** The snapshot is a snapshot of a managed cluster. */ + ManagedCluster = "ManagedCluster", } /** @@ -2929,7 +3801,8 @@ export enum KnownSnapshotType { * {@link KnownSnapshotType} can be used interchangeably with SnapshotType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NodePool**: The snapshot is a snapshot of a node pool. + * **NodePool**: The snapshot is a snapshot of a node pool. \ + * **ManagedCluster**: The snapshot is a snapshot of a managed cluster. */ export type SnapshotType = string; @@ -2959,6 +3832,66 @@ export enum KnownTrustedAccessRoleBindingProvisioningState { * **Updating** */ export type TrustedAccessRoleBindingProvisioningState = string; + +/** Known values of {@link GuardrailsSupport} that the service accepts. */ +export enum KnownGuardrailsSupport { + /** The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. */ + Preview = "Preview", + /** The version is stable and can be used on critical production clusters. */ + Stable = "Stable", +} + +/** + * Defines values for GuardrailsSupport. \ + * {@link KnownGuardrailsSupport} can be used interchangeably with GuardrailsSupport, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. \ + * **Stable**: The version is stable and can be used on critical production clusters. + */ +export type GuardrailsSupport = string; + +/** Known values of {@link SafeguardsSupport} that the service accepts. */ +export enum KnownSafeguardsSupport { + /** The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. */ + Preview = "Preview", + /** The version is stable and can be used on critical production clusters. */ + Stable = "Stable", +} + +/** + * Defines values for SafeguardsSupport. \ + * {@link KnownSafeguardsSupport} can be used interchangeably with SafeguardsSupport, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. \ + * **Stable**: The version is stable and can be used on critical production clusters. + */ +export type SafeguardsSupport = string; + +/** Known values of {@link Operator} that the service accepts. */ +export enum KnownOperator { + /** The value of the key should be in the given list. */ + In = "In", + /** The value of the key should not be in the given list. */ + NotIn = "NotIn", + /** The value of the key should exist. */ + Exists = "Exists", + /** The value of the key should not exist. */ + DoesNotExist = "DoesNotExist", +} + +/** + * Defines values for Operator. \ + * {@link KnownOperator} can be used interchangeably with Operator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **In**: The value of the key should be in the given list. \ + * **NotIn**: The value of the key should not be in the given list. \ + * **Exists**: The value of the key should exist. \ + * **DoesNotExist**: The value of the key should not exist. + */ +export type Operator = string; /** Defines values for ResourceIdentityType. */ export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "None"; @@ -3063,6 +3996,10 @@ export type ManagedClustersGetResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** The request should only proceed if an entity matches this string. */ + ifMatch?: string; + /** The request should only proceed if no entity matches this string. */ + ifNoneMatch?: string; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -3075,6 +4012,8 @@ export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersUpdateTagsOptionalParams extends coreClient.OperationOptions { + /** The request should only proceed if an entity matches this string. */ + ifMatch?: string; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -3087,6 +4026,10 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + /** The request should only proceed if an entity matches this string. */ + ifMatch?: string; + /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ + ignorePodDisruptionBudget?: boolean; /** 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. */ @@ -3114,19 +4057,6 @@ export interface ManagedClustersResetAADProfileOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ManagedClustersRotateClusterCertificatesOptionalParams - 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 rotateClusterCertificates operation. */ -export type ManagedClustersRotateClusterCertificatesResponse = - ManagedClustersRotateClusterCertificatesHeaders; - /** Optional parameters. */ export interface ManagedClustersAbortLatestOperationOptionalParams extends coreClient.OperationOptions { @@ -3140,6 +4070,19 @@ export interface ManagedClustersAbortLatestOperationOptionalParams export type ManagedClustersAbortLatestOperationResponse = ManagedClustersAbortLatestOperationHeaders; +/** Optional parameters. */ +export interface ManagedClustersRotateClusterCertificatesOptionalParams + 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 rotateClusterCertificates operation. */ +export type ManagedClustersRotateClusterCertificatesResponse = + ManagedClustersRotateClusterCertificatesHeaders; + /** Optional parameters. */ export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams extends coreClient.OperationOptions { @@ -3204,6 +4147,38 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsOptional export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersGetGuardrailsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getGuardrailsVersions operation. */ +export type ManagedClustersGetGuardrailsVersionsResponse = + GuardrailsAvailableVersion; + +/** Optional parameters. */ +export interface ManagedClustersListGuardrailsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGuardrailsVersions operation. */ +export type ManagedClustersListGuardrailsVersionsResponse = + GuardrailsAvailableVersionsList; + +/** Optional parameters. */ +export interface ManagedClustersGetSafeguardsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSafeguardsVersions operation. */ +export type ManagedClustersGetSafeguardsVersionsResponse = + SafeguardsAvailableVersion; + +/** Optional parameters. */ +export interface ManagedClustersListSafeguardsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSafeguardsVersions operation. */ +export type ManagedClustersListSafeguardsVersionsResponse = + SafeguardsAvailableVersionsList; + /** Optional parameters. */ export interface ManagedClustersListMeshRevisionProfilesOptionalParams extends coreClient.OperationOptions {} @@ -3234,6 +4209,19 @@ export interface ManagedClustersGetMeshUpgradeProfileOptionalParams /** Contains response data for the getMeshUpgradeProfile operation. */ export type ManagedClustersGetMeshUpgradeProfileResponse = MeshUpgradeProfile; +/** Optional parameters. */ +export interface ManagedClustersRebalanceLoadBalancersOptionalParams + 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 rebalanceLoadBalancers operation. */ +export type ManagedClustersRebalanceLoadBalancersResponse = + ManagedClustersRebalanceLoadBalancersHeaders; + /** Optional parameters. */ export interface ManagedClustersListNextOptionalParams extends coreClient.OperationOptions {} @@ -3257,6 +4245,22 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsNextOpti export type ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersListGuardrailsVersionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGuardrailsVersionsNext operation. */ +export type ManagedClustersListGuardrailsVersionsNextResponse = + GuardrailsAvailableVersionsList; + +/** Optional parameters. */ +export interface ManagedClustersListSafeguardsVersionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSafeguardsVersionsNext operation. */ +export type ManagedClustersListSafeguardsVersionsNextResponse = + SafeguardsAvailableVersionsList; + /** Optional parameters. */ export interface ManagedClustersListMeshRevisionProfilesNextOptionalParams extends coreClient.OperationOptions {} @@ -3338,6 +4342,10 @@ export type AgentPoolsGetResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** The request should only proceed if an entity matches this string. */ + ifMatch?: string; + /** The request should only proceed if no entity matches this string. */ + ifNoneMatch?: string; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -3350,6 +4358,10 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + /** The request should only proceed if an entity matches this string. */ + ifMatch?: string; + /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ + ignorePodDisruptionBudget?: boolean; /** 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. */ @@ -3366,6 +4378,18 @@ export interface AgentPoolsGetUpgradeProfileOptionalParams /** Contains response data for the getUpgradeProfile operation. */ export type AgentPoolsGetUpgradeProfileResponse = AgentPoolUpgradeProfile; +/** Optional parameters. */ +export interface AgentPoolsDeleteMachinesOptionalParams + 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 deleteMachines operation. */ +export type AgentPoolsDeleteMachinesResponse = AgentPoolsDeleteMachinesHeaders; + /** Optional parameters. */ export interface AgentPoolsGetAvailableAgentPoolVersionsOptionalParams extends coreClient.OperationOptions {} @@ -3390,6 +4414,27 @@ export interface AgentPoolsListNextOptionalParams /** Contains response data for the listNext operation. */ export type AgentPoolsListNextResponse = AgentPoolListResult; +/** Optional parameters. */ +export interface MachinesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MachinesListResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachinesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MachinesGetResponse = Machine; + +/** Optional parameters. */ +export interface MachinesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MachinesListNextResponse = MachineListResult; + /** Optional parameters. */ export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} @@ -3436,6 +4481,34 @@ export interface ResolvePrivateLinkServiceIdPostOptionalParams /** Contains response data for the post operation. */ export type ResolvePrivateLinkServiceIdPostResponse = PrivateLinkResource; +/** Optional parameters. */ +export interface OperationStatusResultListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationStatusResultListResponse = OperationStatusResultList; + +/** Optional parameters. */ +export interface OperationStatusResultGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationStatusResultGetResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface OperationStatusResultGetByAgentPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getByAgentPool operation. */ +export type OperationStatusResultGetByAgentPoolResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface OperationStatusResultListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationStatusResultListNextResponse = OperationStatusResultList; + /** Optional parameters. */ export interface SnapshotsListOptionalParams extends coreClient.OperationOptions {} @@ -3489,6 +4562,78 @@ export interface SnapshotsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type SnapshotsListByResourceGroupNextResponse = SnapshotListResult; +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ManagedClusterSnapshotsListResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedClusterSnapshotsListByResourceGroupResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedClusterSnapshotsCreateOrUpdateResponse = + ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ManagedClusterSnapshotsListNextResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedClusterSnapshotsListByResourceGroupNextResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + /** Optional parameters. */ export interface TrustedAccessRoleBindingsListOptionalParams extends coreClient.OperationOptions {} @@ -3539,18 +4684,58 @@ export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; /** Optional parameters. */ -export interface TrustedAccessRolesListOptionalParams +export interface LoadBalancersListByManagedClusterOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; +/** Contains response data for the listByManagedCluster operation. */ +export type LoadBalancersListByManagedClusterResponse = LoadBalancerListResult; /** Optional parameters. */ -export interface TrustedAccessRolesListNextOptionalParams +export interface LoadBalancersGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; +/** Contains response data for the get operation. */ +export type LoadBalancersGetResponse = LoadBalancer; + +/** Optional parameters. */ +export interface LoadBalancersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list. */ + name?: string; + /** Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. */ + primaryAgentPoolName?: string; + /** Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it. */ + allowServicePlacement?: boolean; + /** Only services that must match this selector can be placed on this load balancer. */ + serviceLabelSelector?: LabelSelector; + /** Services created in namespaces that match the selector can be placed on this load balancer. */ + serviceNamespaceSelector?: LabelSelector; + /** Nodes that match this selector will be possible members of this load balancer. */ + nodeSelector?: LabelSelector; +} + +/** Contains response data for the createOrUpdate operation. */ +export type LoadBalancersCreateOrUpdateResponse = LoadBalancer; + +/** Optional parameters. */ +export interface LoadBalancersDeleteOptionalParams + 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 LoadBalancersDeleteResponse = LoadBalancersDeleteHeaders; + +/** Optional parameters. */ +export interface LoadBalancersListByManagedClusterNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedClusterNext operation. */ +export type LoadBalancersListByManagedClusterNextResponse = + LoadBalancerListResult; /** Optional parameters. */ export interface ContainerServiceClientOptionalParams diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 34cb9c474bb..775ee5ceaef 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -499,12 +499,34 @@ export const PowerState: coreClient.CompositeMapper = { }, }; +export const CreationData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreationData", + modelProperties: { + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String", + }, + }, + }, + }, +}; + export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", className: "ManagedClusterAgentPoolProfileProperties", modelProperties: { + eTag: { + serializedName: "eTag", + readOnly: true, + type: { + name: "String", + }, + }, count: { serializedName: "count", type: { @@ -545,6 +567,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, + messageOfTheDay: { + serializedName: "messageOfTheDay", + type: { + name: "String", + }, + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -557,6 +585,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, + podIPAllocationMode: { + serializedName: "podIPAllocationMode", + type: { + name: "String", + }, + }, maxPods: { serializedName: "maxPods", type: { @@ -670,6 +704,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Boolean", }, }, + enableCustomCATrust: { + serializedName: "enableCustomCATrust", + type: { + name: "Boolean", + }, + }, nodePublicIPPrefixID: { serializedName: "nodePublicIPPrefixID", type: { @@ -722,6 +762,17 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe }, }, }, + nodeInitializationTaints: { + serializedName: "nodeInitializationTaints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, proximityPlacementGroupID: { serializedName: "proximityPlacementGroupID", type: { @@ -785,6 +836,13 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, + windowsProfile: { + serializedName: "windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile", + }, + }, networkProfile: { serializedName: "networkProfile", type: { @@ -792,11 +850,51 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "AgentPoolNetworkProfile", }, }, - windowsProfile: { - serializedName: "windowsProfile", + securityProfile: { + serializedName: "securityProfile", type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolSecurityProfile", + }, + }, + gpuProfile: { + serializedName: "gpuProfile", + type: { + name: "Composite", + className: "AgentPoolGPUProfile", + }, + }, + artifactStreamingProfile: { + serializedName: "artifactStreamingProfile", + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + }, + }, + virtualMachinesProfile: { + serializedName: "virtualMachinesProfile", + type: { + name: "Composite", + className: "VirtualMachinesProfile", + }, + }, + virtualMachineNodesStatus: { + serializedName: "virtualMachineNodesStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNodes", + }, + }, + }, + }, + gatewayProfile: { + serializedName: "gatewayProfile", + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", }, }, }, @@ -834,6 +932,12 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { name: "Number", }, }, + undrainableNodeBehavior: { + serializedName: "undrainableNodeBehavior", + type: { + name: "String", + }, + }, }, }, }; @@ -1144,15 +1248,15 @@ export const SysctlConfig: coreClient.CompositeMapper = { }, }; -export const CreationData: coreClient.CompositeMapper = { +export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreationData", + className: "AgentPoolWindowsProfile", modelProperties: { - sourceResourceId: { - serializedName: "sourceResourceId", + disableOutboundNat: { + serializedName: "disableOutboundNat", type: { - name: "String", + name: "Boolean", }, }, }, @@ -1259,17 +1363,207 @@ export const PortRange: coreClient.CompositeMapper = { }, }; -export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { +export const AgentPoolSecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolSecurityProfile", modelProperties: { - disableOutboundNat: { - serializedName: "disableOutboundNat", + sshAccess: { + serializedName: "sshAccess", + type: { + name: "String", + }, + }, + enableVtpm: { + serializedName: "enableVTPM", type: { name: "Boolean", }, }, + enableSecureBoot: { + serializedName: "enableSecureBoot", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const AgentPoolGPUProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolGPUProfile", + modelProperties: { + installGPUDriver: { + serializedName: "installGPUDriver", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const AgentPoolArtifactStreamingProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const VirtualMachinesProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachinesProfile", + modelProperties: { + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "ScaleProfile", + }, + }, + }, + }, +}; + +export const ScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleProfile", + modelProperties: { + manual: { + serializedName: "manual", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManualScaleProfile", + }, + }, + }, + }, + autoscale: { + serializedName: "autoscale", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoScaleProfile", + }, + }, + }, + }, + }, + }, +}; + +export const ManualScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManualScaleProfile", + modelProperties: { + sizes: { + serializedName: "sizes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + count: { + serializedName: "count", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AutoScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutoScaleProfile", + modelProperties: { + sizes: { + serializedName: "sizes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + minCount: { + serializedName: "minCount", + type: { + name: "Number", + }, + }, + maxCount: { + serializedName: "maxCount", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const VirtualMachineNodes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineNodes", + modelProperties: { + size: { + serializedName: "size", + type: { + name: "String", + }, + }, + count: { + serializedName: "count", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AgentPoolGatewayProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", + modelProperties: { + publicIPPrefixSize: { + defaultValue: 31, + constraints: { + InclusiveMaximum: 31, + InclusiveMinimum: 28, + }, + serializedName: "publicIPPrefixSize", + type: { + name: "Number", + }, + }, }, }, }; @@ -1708,6 +2002,22 @@ export const ManagedClusterOidcIssuerProfile: coreClient.CompositeMapper = { }, }; +export const ManagedClusterNodeResourceGroupProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterNodeResourceGroupProfile", + modelProperties: { + restrictionLevel: { + serializedName: "restrictionLevel", + type: { + name: "String", + }, + }, + }, + }, + }; + export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1807,6 +2117,13 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { className: "ManagedClusterNATGatewayProfile", }, }, + staticEgressGatewayProfile: { + serializedName: "staticEgressGatewayProfile", + type: { + name: "Composite", + className: "ManagedClusterStaticEgressGatewayProfile", + }, + }, podCidrs: { serializedName: "podCidrs", type: { @@ -1840,6 +2157,26 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { }, }, }, + podLinkLocalAccess: { + serializedName: "podLinkLocalAccess", + type: { + name: "String", + }, + }, + kubeProxyConfig: { + serializedName: "kubeProxyConfig", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig", + }, + }, + advancedNetworking: { + serializedName: "advancedNetworking", + type: { + name: "Composite", + className: "AdvancedNetworking", + }, + }, }, }, }; @@ -1917,6 +2254,13 @@ export const ManagedClusterLoadBalancerProfile: coreClient.CompositeMapper = { name: "String", }, }, + clusterServiceLoadBalancerHealthProbeMode: { + defaultValue: "ServiceNodePort", + serializedName: "clusterServiceLoadBalancerHealthProbeMode", + type: { + name: "String", + }, + }, }, }, }; @@ -2072,6 +2416,117 @@ export const ManagedClusterManagedOutboundIPProfile: coreClient.CompositeMapper }, }; +export const ManagedClusterStaticEgressGatewayProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterStaticEgressGatewayProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ContainerServiceNetworkProfileKubeProxyConfig: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + ipvsConfig: { + serializedName: "ipvsConfig", + type: { + name: "Composite", + className: + "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + }, + }, + }, + }, + }; + +export const ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + modelProperties: { + scheduler: { + serializedName: "scheduler", + type: { + name: "String", + }, + }, + tcpTimeoutSeconds: { + serializedName: "tcpTimeoutSeconds", + type: { + name: "Number", + }, + }, + tcpFinTimeoutSeconds: { + serializedName: "tcpFinTimeoutSeconds", + type: { + name: "Number", + }, + }, + udpTimeoutSeconds: { + serializedName: "udpTimeoutSeconds", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const AdvancedNetworking: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvancedNetworking", + modelProperties: { + observability: { + serializedName: "observability", + type: { + name: "Composite", + className: "AdvancedNetworkingObservability", + }, + }, + }, + }, +}; + +export const AdvancedNetworkingObservability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvancedNetworkingObservability", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + export const ManagedClusterAADProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2198,6 +2653,24 @@ export const ManagedClusterPropertiesAutoScalerProfile: coreClient.CompositeMapp name: "String", }, }, + daemonsetEvictionForEmptyNodes: { + serializedName: "daemonset-eviction-for-empty-nodes", + type: { + name: "Boolean", + }, + }, + daemonsetEvictionForOccupiedNodes: { + serializedName: "daemonset-eviction-for-occupied-nodes", + type: { + name: "Boolean", + }, + }, + ignoreDaemonsetsUtilization: { + serializedName: "ignore-daemonsets-utilization", + type: { + name: "Boolean", + }, + }, expander: { serializedName: "expander", type: { @@ -2339,6 +2812,18 @@ export const ManagedClusterAPIServerAccessProfile: coreClient.CompositeMapper = name: "Boolean", }, }, + enableVnetIntegration: { + serializedName: "enableVnetIntegration", + type: { + name: "Boolean", + }, + }, + subnetId: { + serializedName: "subnetId", + type: { + name: "String", + }, + }, }, }, }; @@ -2422,6 +2907,18 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { }, }, }, + effectiveNoProxy: { + serializedName: "effectiveNoProxy", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, trustedCa: { serializedName: "trustedCa", type: { @@ -2465,6 +2962,34 @@ export const ManagedClusterSecurityProfile: coreClient.CompositeMapper = { className: "ManagedClusterSecurityProfileImageCleaner", }, }, + imageIntegrity: { + serializedName: "imageIntegrity", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity", + }, + }, + nodeRestriction: { + serializedName: "nodeRestriction", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileNodeRestriction", + }, + }, + customCATrustCertificates: { + constraints: { + MaxItems: 10, + }, + serializedName: "customCATrustCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "ByteArray", + }, + }, + }, + }, }, }, }; @@ -2581,6 +3106,38 @@ export const ManagedClusterSecurityProfileImageCleaner: coreClient.CompositeMapp }, }; +export const ManagedClusterSecurityProfileImageIntegrity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterSecurityProfileNodeRestriction: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileNodeRestriction", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2630,6 +3187,12 @@ export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapp name: "Boolean", }, }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, }, }, }; @@ -2791,6 +3354,13 @@ export const ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler: coreC name: "Boolean", }, }, + addonAutoscaling: { + defaultValue: "Disabled", + serializedName: "addonAutoscaling", + type: { + name: "String", + }, + }, }, }, }; @@ -2807,6 +3377,20 @@ export const ManagedClusterAzureMonitorProfile: coreClient.CompositeMapper = { className: "ManagedClusterAzureMonitorProfileMetrics", }, }, + containerInsights: { + serializedName: "containerInsights", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileContainerInsights", + }, + }, + appMonitoring: { + serializedName: "appMonitoring", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileAppMonitoring", + }, + }, }, }, }; @@ -2857,6 +3441,188 @@ export const ManagedClusterAzureMonitorProfileKubeStateMetrics: coreClient.Compo }, }; +export const ManagedClusterAzureMonitorProfileContainerInsights: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileContainerInsights", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + logAnalyticsWorkspaceResourceId: { + serializedName: "logAnalyticsWorkspaceResourceId", + type: { + name: "String", + }, + }, + syslogPort: { + serializedName: "syslogPort", + type: { + name: "Number", + }, + }, + disableCustomMetrics: { + serializedName: "disableCustomMetrics", + type: { + name: "Boolean", + }, + }, + disablePrometheusMetricsScraping: { + serializedName: "disablePrometheusMetricsScraping", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoring: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileAppMonitoring", + modelProperties: { + autoInstrumentation: { + serializedName: "autoInstrumentation", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", + }, + }, + openTelemetryMetrics: { + serializedName: "openTelemetryMetrics", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", + }, + }, + openTelemetryLogs: { + serializedName: "openTelemetryLogs", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + port: { + serializedName: "port", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + port: { + serializedName: "port", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const SafeguardsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SafeguardsProfile", + modelProperties: { + systemExcludedNamespaces: { + serializedName: "systemExcludedNamespaces", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + level: { + serializedName: "level", + required: true, + type: { + name: "String", + }, + }, + excludedNamespaces: { + serializedName: "excludedNamespaces", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + export const ServiceMeshProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3076,6 +3842,60 @@ export const ManagedClusterCostAnalysis: coreClient.CompositeMapper = { }, }; +export const ManagedClusterAIToolchainOperatorProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAIToolchainOperatorProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterNodeProvisioningProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterNodeProvisioningProfile", + modelProperties: { + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ManagedClusterBootstrapProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterBootstrapProfile", + modelProperties: { + artifactSource: { + defaultValue: "Direct", + serializedName: "artifactSource", + type: { + name: "String", + }, + }, + containerRegistryId: { + serializedName: "containerRegistryId", + type: { + name: "String", + }, + }, + }, + }, +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3246,6 +4066,18 @@ export const ManagedClusterPoolUpgradeProfile: coreClient.CompositeMapper = { }, }, }, + componentsByReleases: { + serializedName: "componentsByReleases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentsByRelease", + }, + }, + }, + }, }, }, }; @@ -3272,6 +4104,60 @@ export const ManagedClusterPoolUpgradeProfileUpgradesItem: coreClient.CompositeM }, }; +export const ComponentsByRelease: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentsByRelease", + modelProperties: { + kubernetesVersion: { + serializedName: "kubernetesVersion", + type: { + name: "String", + }, + }, + components: { + serializedName: "components", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Component", + }, + }, + }, + }, + }, + }, +}; + +export const Component: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Component", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + hasBreakingChanges: { + serializedName: "hasBreakingChanges", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + export const CredentialResults: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3760,6 +4646,18 @@ export const AgentPoolUpgradeProfile: coreClient.CompositeMapper = { }, }, }, + componentsByReleases: { + serializedName: "properties.componentsByReleases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentsByRelease", + }, + }, + }, + }, latestNodeImageVersion: { serializedName: "properties.latestNodeImageVersion", type: { @@ -3792,6 +4690,219 @@ export const AgentPoolUpgradeProfilePropertiesUpgradesItem: coreClient.Composite }, }; +export const AgentPoolDeleteMachinesParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolDeleteMachinesParameter", + modelProperties: { + machineNames: { + serializedName: "machineNames", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const MachineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Machine", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MachineProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineProperties", + modelProperties: { + network: { + serializedName: "network", + type: { + name: "Composite", + className: "MachineNetworkProperties", + }, + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MachineNetworkProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineNetworkProperties", + modelProperties: { + ipAddresses: { + serializedName: "ipAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineIpAddress", + }, + }, + }, + }, + }, + }, +}; + +export const MachineIpAddress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineIpAddress", + modelProperties: { + ip: { + serializedName: "ip", + readOnly: true, + type: { + name: "String", + }, + }, + family: { + serializedName: "family", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const AgentPoolAvailableVersions: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4195,6 +5306,111 @@ export const EndpointDetail: coreClient.CompositeMapper = { }, }; +export const OperationStatusResultList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatusResultList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationStatusResult", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationStatusResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatusResult", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String", + }, + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "percentComplete", + type: { + name: "Number", + }, + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime", + }, + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime", + }, + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationStatusResult", + }, + }, + }, + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + export const SnapshotListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4223,6 +5439,375 @@ export const SnapshotListResult: coreClient.CompositeMapper = { }, }; +export const ManagedClusterSnapshotListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSnapshotListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedClusterSnapshot", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedClusterPropertiesForSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot", + modelProperties: { + kubernetesVersion: { + serializedName: "kubernetesVersion", + type: { + name: "String", + }, + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ManagedClusterSKU", + }, + }, + enableRbac: { + serializedName: "enableRbac", + type: { + name: "Boolean", + }, + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfileForSnapshot", + }, + }, + }, + }, +}; + +export const NetworkProfileForSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileForSnapshot", + modelProperties: { + networkPlugin: { + defaultValue: "kubenet", + serializedName: "networkPlugin", + type: { + name: "String", + }, + }, + networkPluginMode: { + serializedName: "networkPluginMode", + type: { + name: "String", + }, + }, + networkPolicy: { + serializedName: "networkPolicy", + type: { + name: "String", + }, + }, + networkMode: { + serializedName: "networkMode", + type: { + name: "String", + }, + }, + loadBalancerSku: { + serializedName: "loadBalancerSku", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TrustedAccessRoleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRole", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TrustedAccessRole: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRole", + modelProperties: { + sourceResourceType: { + serializedName: "sourceResourceType", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + rules: { + serializedName: "rules", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRoleRule", + }, + }, + }, + }, + }, + }, +}; + +export const TrustedAccessRoleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleRule", + modelProperties: { + verbs: { + serializedName: "verbs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + apiGroups: { + serializedName: "apiGroups", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + resources: { + serializedName: "resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + resourceNames: { + serializedName: "resourceNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + nonResourceURLs: { + serializedName: "nonResourceURLs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleBindingListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRoleBinding", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GuardrailsAvailableVersionsProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsProperties", + modelProperties: { + isDefaultVersion: { + serializedName: "isDefaultVersion", + readOnly: true, + type: { + name: "Boolean", + }, + }, + support: { + serializedName: "support", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GuardrailsAvailableVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GuardrailsAvailableVersion", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SafeguardsAvailableVersionsProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SafeguardsAvailableVersionsProperties", + modelProperties: { + isDefaultVersion: { + serializedName: "isDefaultVersion", + readOnly: true, + type: { + name: "Boolean", + }, + }, + support: { + serializedName: "support", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SafeguardsAvailableVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SafeguardsAvailableVersionsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SafeguardsAvailableVersion", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const MeshRevisionProfileList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4364,10 +5949,10 @@ export const MeshUpgradeProfileList: coreClient.CompositeMapper = { }, }; -export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { +export const LoadBalancerListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrustedAccessRoleBindingListResult", + className: "LoadBalancerListResult", modelProperties: { value: { serializedName: "value", @@ -4376,7 +5961,7 @@ export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "TrustedAccessRoleBinding", + className: "LoadBalancer", }, }, }, @@ -4392,175 +5977,13 @@ export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { }, }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const LabelSelector: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "LabelSelector", modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const TrustedAccessRoleListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrustedAccessRoleListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrustedAccessRole", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrustedAccessRole: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrustedAccessRole", - modelProperties: { - sourceResourceType: { - serializedName: "sourceResourceType", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - rules: { - serializedName: "rules", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrustedAccessRoleRule", - }, - }, - }, - }, - }, - }, -}; - -export const TrustedAccessRoleRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrustedAccessRoleRule", - modelProperties: { - verbs: { - serializedName: "verbs", - readOnly: true, + matchLabels: { + serializedName: "matchLabels", type: { name: "Sequence", element: { @@ -4570,9 +5993,41 @@ export const TrustedAccessRoleRule: coreClient.CompositeMapper = { }, }, }, - apiGroups: { - serializedName: "apiGroups", - readOnly: true, + matchExpressions: { + serializedName: "matchExpressions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LabelSelectorRequirement", + }, + }, + }, + }, + }, + }, +}; + +export const LabelSelectorRequirement: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelSelectorRequirement", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String", + }, + }, + operator: { + serializedName: "operator", + type: { + name: "String", + }, + }, + values: { + serializedName: "values", type: { name: "Sequence", element: { @@ -4582,33 +6037,17 @@ export const TrustedAccessRoleRule: coreClient.CompositeMapper = { }, }, }, - resources: { - serializedName: "resources", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - resourceNames: { - serializedName: "resourceNames", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - nonResourceURLs: { - serializedName: "nonResourceURLs", - readOnly: true, + }, + }, +}; + +export const RebalanceLoadBalancersRequestBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RebalanceLoadBalancersRequestBody", + modelProperties: { + loadBalancerNames: { + serializedName: "loadBalancerNames", type: { name: "Sequence", element: { @@ -4676,16 +6115,6 @@ export const TrackedResource: coreClient.CompositeMapper = { }, }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4722,6 +6151,50 @@ export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { }, }; +export const GuardrailsAvailableVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsAvailableVersion", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsProperties", + }, + }, + }, + }, +}; + +export const SafeguardsAvailableVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SafeguardsAvailableVersion", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SafeguardsAvailableVersionsProperties", + }, + }, + }, + }, +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, +}; + export const MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4776,6 +6249,13 @@ export const AgentPool: coreClient.CompositeMapper = { className: "AgentPool", modelProperties: { ...SubResource.type.modelProperties, + eTag: { + serializedName: "properties.eTag", + readOnly: true, + type: { + name: "String", + }, + }, count: { serializedName: "properties.count", type: { @@ -4816,6 +6296,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, + messageOfTheDay: { + serializedName: "properties.messageOfTheDay", + type: { + name: "String", + }, + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -4828,6 +6314,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, + podIPAllocationMode: { + serializedName: "properties.podIPAllocationMode", + type: { + name: "String", + }, + }, maxPods: { serializedName: "properties.maxPods", type: { @@ -4941,6 +6433,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableCustomCATrust: { + serializedName: "properties.enableCustomCATrust", + type: { + name: "Boolean", + }, + }, nodePublicIPPrefixID: { serializedName: "properties.nodePublicIPPrefixID", type: { @@ -4993,6 +6491,17 @@ export const AgentPool: coreClient.CompositeMapper = { }, }, }, + nodeInitializationTaints: { + serializedName: "properties.nodeInitializationTaints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, proximityPlacementGroupID: { serializedName: "properties.proximityPlacementGroupID", type: { @@ -5056,6 +6565,13 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, + windowsProfile: { + serializedName: "properties.windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile", + }, + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -5063,11 +6579,68 @@ export const AgentPool: coreClient.CompositeMapper = { className: "AgentPoolNetworkProfile", }, }, - windowsProfile: { - serializedName: "properties.windowsProfile", + securityProfile: { + serializedName: "properties.securityProfile", type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolSecurityProfile", + }, + }, + gpuProfile: { + serializedName: "properties.gpuProfile", + type: { + name: "Composite", + className: "AgentPoolGPUProfile", + }, + }, + artifactStreamingProfile: { + serializedName: "properties.artifactStreamingProfile", + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + }, + }, + virtualMachinesProfile: { + serializedName: "properties.virtualMachinesProfile", + type: { + name: "Composite", + className: "VirtualMachinesProfile", + }, + }, + virtualMachineNodesStatus: { + serializedName: "properties.virtualMachineNodesStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNodes", + }, + }, + }, + }, + gatewayProfile: { + serializedName: "properties.gatewayProfile", + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", + }, + }, + }, + }, +}; + +export const Machine: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Machine", + modelProperties: { + ...SubResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineProperties", }, }, }, @@ -5090,6 +6663,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedCluster", modelProperties: { ...TrackedResource.type.modelProperties, + eTag: { + serializedName: "eTag", + readOnly: true, + type: { + name: "String", + }, + }, sku: { serializedName: "sku", type: { @@ -5111,6 +6691,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterIdentity", }, }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -5125,6 +6711,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "PowerState", }, }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData", + }, + }, maxAgentPools: { serializedName: "properties.maxAgentPools", readOnly: true, @@ -5243,6 +6836,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "String", }, }, + nodeResourceGroupProfile: { + serializedName: "properties.nodeResourceGroupProfile", + type: { + name: "Composite", + className: "ManagedClusterNodeResourceGroupProfile", + }, + }, enableRbac: { serializedName: "properties.enableRBAC", type: { @@ -5261,6 +6861,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableNamespaceResources: { + serializedName: "properties.enableNamespaceResources", + type: { + name: "Boolean", + }, + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -5384,6 +6990,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterAzureMonitorProfile", }, }, + safeguardsProfile: { + serializedName: "properties.safeguardsProfile", + type: { + name: "Composite", + className: "SafeguardsProfile", + }, + }, serviceMeshProfile: { serializedName: "properties.serviceMeshProfile", type: { @@ -5405,6 +7018,27 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterMetricsProfile", }, }, + aiToolchainOperatorProfile: { + serializedName: "properties.aiToolchainOperatorProfile", + type: { + name: "Composite", + className: "ManagedClusterAIToolchainOperatorProfile", + }, + }, + nodeProvisioningProfile: { + serializedName: "properties.nodeProvisioningProfile", + type: { + name: "Composite", + className: "ManagedClusterNodeProvisioningProfile", + }, + }, + bootstrapProfile: { + serializedName: "properties.bootstrapProfile", + type: { + name: "Composite", + className: "ManagedClusterBootstrapProfile", + }, + }, }, }, }; @@ -5492,6 +7126,37 @@ export const Snapshot: coreClient.CompositeMapper = { }, }; +export const ManagedClusterSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSnapshot", + modelProperties: { + ...TrackedResource.type.modelProperties, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData", + }, + }, + snapshotType: { + defaultValue: "NodePool", + serializedName: "properties.snapshotType", + type: { + name: "String", + }, + }, + managedClusterPropertiesReadOnly: { + serializedName: "properties.managedClusterPropertiesReadOnly", + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot", + }, + }, + }, + }, +}; + export const MeshRevisionProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5526,6 +7191,62 @@ export const MeshUpgradeProfile: coreClient.CompositeMapper = { }, }; +export const LoadBalancer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancer", + modelProperties: { + ...ProxyResource.type.modelProperties, + namePropertiesName: { + serializedName: "properties.name", + type: { + name: "String", + }, + }, + primaryAgentPoolName: { + serializedName: "properties.primaryAgentPoolName", + type: { + name: "String", + }, + }, + allowServicePlacement: { + serializedName: "properties.allowServicePlacement", + type: { + name: "Boolean", + }, + }, + serviceLabelSelector: { + serializedName: "properties.serviceLabelSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + serviceNamespaceSelector: { + serializedName: "properties.serviceNamespaceSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + nodeSelector: { + serializedName: "properties.nodeSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ManagedClustersDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5573,22 +7294,6 @@ export const ManagedClustersResetAADProfileHeaders: coreClient.CompositeMapper = }, }; -export const ManagedClustersRotateClusterCertificatesHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedClustersRotateClusterCertificatesHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - export const ManagedClustersAbortLatestOperationHeaders: coreClient.CompositeMapper = { type: { @@ -5611,6 +7316,22 @@ export const ManagedClustersAbortLatestOperationHeaders: coreClient.CompositeMap }, }; +export const ManagedClustersRotateClusterCertificatesHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClustersRotateClusterCertificatesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + export const ManagedClustersRotateServiceAccountSigningKeysHeaders: coreClient.CompositeMapper = { type: { @@ -5688,6 +7409,22 @@ export const ManagedClustersGetCommandResultHeaders: coreClient.CompositeMapper }, }; +export const ManagedClustersRebalanceLoadBalancersHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClustersRebalanceLoadBalancersHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + export const AgentPoolsAbortLatestOperationHeaders: coreClient.CompositeMapper = { type: { @@ -5725,6 +7462,21 @@ export const AgentPoolsDeleteHeaders: coreClient.CompositeMapper = { }, }; +export const AgentPoolsDeleteMachinesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolsDeleteMachinesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + export const AgentPoolsUpgradeNodeImageVersionHeaders: coreClient.CompositeMapper = { type: { @@ -5756,3 +7508,18 @@ export const TrustedAccessRoleBindingsDeleteHeaders: coreClient.CompositeMapper }, }, }; + +export const LoadBalancersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index a1847d4ce46..876ec4434d6 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -17,12 +17,16 @@ import { ManagedClusterServicePrincipalProfile as ManagedClusterServicePrincipalProfileMapper, ManagedClusterAADProfile as ManagedClusterAADProfileMapper, RunCommandRequest as RunCommandRequestMapper, + RebalanceLoadBalancersRequestBody as RebalanceLoadBalancersRequestBodyMapper, MaintenanceConfiguration as MaintenanceConfigurationMapper, AgentPool as AgentPoolMapper, + AgentPoolDeleteMachinesParameter as AgentPoolDeleteMachinesParameterMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, Snapshot as SnapshotMapper, + ManagedClusterSnapshot as ManagedClusterSnapshotMapper, TrustedAccessRoleBinding as TrustedAccessRoleBindingMapper, + LoadBalancer as LoadBalancerMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -52,7 +56,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-02-01", + defaultValue: "2024-04-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -177,11 +181,41 @@ export const parameters: OperationParameter = { mapper: ManagedClusterMapper, }; +export const ifMatch: OperationParameter = { + parameterPath: ["options", "ifMatch"], + mapper: { + serializedName: "If-Match", + type: { + name: "String", + }, + }, +}; + +export const ifNoneMatch: OperationParameter = { + parameterPath: ["options", "ifNoneMatch"], + mapper: { + serializedName: "If-None-Match", + type: { + name: "String", + }, + }, +}; + export const parameters1: OperationParameter = { parameterPath: "parameters", mapper: TagsObjectMapper, }; +export const ignorePodDisruptionBudget: OperationQueryParameter = { + parameterPath: ["options", "ignorePodDisruptionBudget"], + mapper: { + serializedName: "ignore-pod-disruption-budget", + type: { + name: "Boolean", + }, + }, +}; + export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: ManagedClusterServicePrincipalProfileMapper, @@ -208,6 +242,21 @@ export const commandId: OperationURLParameter = { }, }; +export const version: OperationURLParameter = { + parameterPath: "version", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 1, + }, + serializedName: "version", + required: true, + type: { + name: "String", + }, + }, +}; + export const mode: OperationURLParameter = { parameterPath: "mode", mapper: { @@ -226,6 +275,11 @@ export const mode: OperationURLParameter = { }, }; +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: RebalanceLoadBalancersRequestBodyMapper, +}; + export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { @@ -249,7 +303,7 @@ export const configName: OperationURLParameter = { }, }; -export const parameters4: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: MaintenanceConfigurationMapper, }; @@ -270,11 +324,30 @@ export const agentPoolName: OperationURLParameter = { }, }; -export const parameters5: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: AgentPoolMapper, }; +export const machines: OperationParameter = { + parameterPath: "machines", + mapper: AgentPoolDeleteMachinesParameterMapper, +}; + +export const machineName: OperationURLParameter = { + parameterPath: "machineName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$"), + }, + serializedName: "machineName", + required: true, + type: { + name: "String", + }, + }, +}; + export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { @@ -286,21 +359,40 @@ export const privateEndpointConnectionName: OperationURLParameter = { }, }; -export const parameters6: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper, }; -export const parameters7: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: PrivateLinkResourceMapper, }; -export const parameters8: OperationParameter = { +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + constraints: { + MinLength: 1, + }, + serializedName: "operationId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: SnapshotMapper, }; +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedClusterSnapshotMapper, +}; + export const trustedAccessRoleBindingName: OperationURLParameter = { parameterPath: "trustedAccessRoleBindingName", mapper: { @@ -321,3 +413,49 @@ export const trustedAccessRoleBinding: OperationParameter = { parameterPath: "trustedAccessRoleBinding", mapper: TrustedAccessRoleBindingMapper, }; + +export const loadBalancerName: OperationURLParameter = { + parameterPath: "loadBalancerName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]{0,11}$"), + MaxLength: 12, + MinLength: 1, + }, + serializedName: "loadBalancerName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const name: OperationParameter = { + parameterPath: ["options", "name"], + mapper: LoadBalancerMapper, +}; + +export const primaryAgentPoolName: OperationParameter = { + parameterPath: ["options", "primaryAgentPoolName"], + mapper: LoadBalancerMapper, +}; + +export const allowServicePlacement: OperationParameter = { + parameterPath: ["options", "allowServicePlacement"], + mapper: LoadBalancerMapper, +}; + +export const serviceLabelSelector: OperationParameter = { + parameterPath: ["options", "serviceLabelSelector"], + mapper: LoadBalancerMapper, +}; + +export const serviceNamespaceSelector: OperationParameter = { + parameterPath: ["options", "serviceNamespaceSelector"], + mapper: LoadBalancerMapper, +}; + +export const nodeSelector: OperationParameter = { + parameterPath: ["options", "nodeSelector"], + mapper: LoadBalancerMapper, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index d74719a3fc8..7647e169b97 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -34,6 +34,9 @@ import { AgentPoolsDeleteResponse, AgentPoolsGetUpgradeProfileOptionalParams, AgentPoolsGetUpgradeProfileResponse, + AgentPoolDeleteMachinesParameter, + AgentPoolsDeleteMachinesOptionalParams, + AgentPoolsDeleteMachinesResponse, AgentPoolsGetAvailableAgentPoolVersionsOptionalParams, AgentPoolsGetAvailableAgentPoolVersionsResponse, AgentPoolsUpgradeNodeImageVersionOptionalParams, @@ -132,7 +135,7 @@ export class AgentPoolsImpl implements AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -207,7 +210,7 @@ export class AgentPoolsImpl implements AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -482,6 +485,111 @@ export class AgentPoolsImpl implements AgentPools { ); } + /** + * Deletes specific machines in an agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param options The options parameters. + */ + async beginDeleteMachines( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machines: AgentPoolDeleteMachinesParameter, + options?: AgentPoolsDeleteMachinesOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolsDeleteMachinesResponse + > + > { + 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, + agentPoolName, + machines, + options, + }, + spec: deleteMachinesOperationSpec, + }); + const poller = await createHttpPoller< + AgentPoolsDeleteMachinesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes specific machines in an agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param options The options parameters. + */ + async beginDeleteMachinesAndWait( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machines: AgentPoolDeleteMachinesParameter, + options?: AgentPoolsDeleteMachinesOptionalParams, + ): Promise { + const poller = await this.beginDeleteMachines( + resourceGroupName, + resourceName, + agentPoolName, + machines, + options, + ); + return poller.pollUntilDone(); + } + /** * See [supported Kubernetes * versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about @@ -708,7 +816,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -717,7 +825,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceName, Parameters.agentPoolName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch, + Parameters.ifNoneMatch, + ], mediaType: "json", serializer, }; @@ -741,7 +854,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget, + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -749,7 +865,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceName, Parameters.agentPoolName, ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.ifMatch], serializer, }; const getUpgradeProfileOperationSpec: coreClient.OperationSpec = { @@ -774,6 +890,39 @@ const getUpgradeProfileOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const deleteMachinesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.AgentPoolsDeleteMachinesHeaders, + }, + 201: { + headersMapper: Mappers.AgentPoolsDeleteMachinesHeaders, + }, + 202: { + headersMapper: Mappers.AgentPoolsDeleteMachinesHeaders, + }, + 204: { + headersMapper: Mappers.AgentPoolsDeleteMachinesHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.machines, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; const getAvailableAgentPoolVersionsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", httpMethod: "GET", diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index efffc02a7d4..9576b01c283 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -10,9 +10,13 @@ export * from "./operations"; export * from "./managedClusters"; export * from "./maintenanceConfigurations"; export * from "./agentPools"; +export * from "./machines"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; +export * from "./operationStatusResultOperations"; export * from "./snapshots"; -export * from "./trustedAccessRoleBindings"; +export * from "./managedClusterSnapshots"; export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./loadBalancers"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts b/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts new file mode 100644 index 00000000000..40e42bbd64a --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts @@ -0,0 +1,435 @@ +/* + * 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 { LoadBalancers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + LoadBalancer, + LoadBalancersListByManagedClusterNextOptionalParams, + LoadBalancersListByManagedClusterOptionalParams, + LoadBalancersListByManagedClusterResponse, + LoadBalancersGetOptionalParams, + LoadBalancersGetResponse, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersCreateOrUpdateResponse, + LoadBalancersDeleteOptionalParams, + LoadBalancersDeleteResponse, + LoadBalancersListByManagedClusterNextResponse, +} from "../models"; + +/// +/** Class containing LoadBalancers operations. */ +export class LoadBalancersImpl implements LoadBalancers { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class LoadBalancers class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByManagedClusterPagingAll( + resourceGroupName, + resourceName, + 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.listByManagedClusterPagingPage( + resourceGroupName, + resourceName, + options, + settings, + ); + }, + }; + } + + private async *listByManagedClusterPagingPage( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LoadBalancersListByManagedClusterResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByManagedCluster( + resourceGroupName, + resourceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByManagedClusterNext( + resourceGroupName, + resourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByManagedClusterPagingAll( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByManagedClusterPagingPage( + resourceGroupName, + resourceName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByManagedClusterOperationSpec, + ); + } + + /** + * Gets the specified load balancer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, loadBalancerName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, loadBalancerName, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancersDeleteResponse + > + > { + 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, loadBalancerName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + LoadBalancersDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + loadBalancerName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListByManagedClusterNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the ListByManagedCluster method. + * @param options The options parameters. + */ + private _listByManagedClusterNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: LoadBalancersListByManagedClusterNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByManagedClusterNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByManagedClusterOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancerListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancer, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancer, + }, + 201: { + bodyMapper: Mappers.LoadBalancer, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: { + parameterPath: { + name: ["options", "name"], + primaryAgentPoolName: ["options", "primaryAgentPoolName"], + allowServicePlacement: ["options", "allowServicePlacement"], + serviceLabelSelector: ["options", "serviceLabelSelector"], + serviceNamespaceSelector: ["options", "serviceNamespaceSelector"], + nodeSelector: ["options", "nodeSelector"], + }, + mapper: { ...Mappers.LoadBalancer, required: true }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 201: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 202: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 204: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByManagedClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancerListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/machines.ts b/sdk/containerservice/arm-containerservice/src/operations/machines.ts new file mode 100644 index 00000000000..935ef7aa659 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/machines.ts @@ -0,0 +1,262 @@ +/* + * 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 { Machines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + Machine, + MachinesListNextOptionalParams, + MachinesListOptionalParams, + MachinesListResponse, + MachinesGetOptionalParams, + MachinesGetResponse, + MachinesListNextResponse, +} from "../models"; + +/// +/** Class containing Machines operations. */ +export class MachinesImpl implements Machines { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class Machines class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of machines in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: MachinesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + resourceName, + agentPoolName, + 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( + resourceGroupName, + resourceName, + agentPoolName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: MachinesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: MachinesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + resourceName, + agentPoolName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + agentPoolName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: MachinesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + agentPoolName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of machines in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: MachinesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, options }, + listOperationSpec, + ); + } + + /** + * Get a specific machine in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName host name of the machine + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machineName: string, + options?: MachinesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, machineName, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + nextLink: string, + options?: MachinesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Machine, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName, + Parameters.machineName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink, + Parameters.agentPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts index ce0c73cbf52..d090f544c07 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts @@ -280,7 +280,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts new file mode 100644 index 00000000000..aba7407b0ed --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts @@ -0,0 +1,468 @@ +/* + * 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 { ManagedClusterSnapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListNextOptionalParams, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListResponse, + ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsListByResourceGroupResponse, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams, + ManagedClusterSnapshotsListNextResponse, + ManagedClusterSnapshotsListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing ManagedClusterSnapshots operations. */ +export class ManagedClusterSnapshotsImpl implements ManagedClusterSnapshots { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class ManagedClusterSnapshots class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + public list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: ManagedClusterSnapshotsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClusterSnapshotsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: ManagedClusterSnapshotsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): 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?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClusterSnapshotsListByResourceGroupResponse; + 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?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + private _list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + updateTagsOperationSpec, + ); + } + + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ManagedClusterSnapshotsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * 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?: ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + 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.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + 201: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.parameters1, + 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.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index 165ece62430..078de29e330 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -31,6 +31,14 @@ import { ManagedClustersListOutboundNetworkDependenciesEndpointsNextOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsResponse, + GuardrailsAvailableVersion, + ManagedClustersListGuardrailsVersionsNextOptionalParams, + ManagedClustersListGuardrailsVersionsOptionalParams, + ManagedClustersListGuardrailsVersionsResponse, + SafeguardsAvailableVersion, + ManagedClustersListSafeguardsVersionsNextOptionalParams, + ManagedClustersListSafeguardsVersionsOptionalParams, + ManagedClustersListSafeguardsVersionsResponse, MeshRevisionProfile, ManagedClustersListMeshRevisionProfilesNextOptionalParams, ManagedClustersListMeshRevisionProfilesOptionalParams, @@ -66,10 +74,10 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, - ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateClusterCertificatesResponse, ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersAbortLatestOperationResponse, + ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateClusterCertificatesResponse, ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersRotateServiceAccountSigningKeysResponse, ManagedClustersStopOptionalParams, @@ -81,13 +89,22 @@ import { ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, ManagedClustersGetCommandResultResponse, + ManagedClustersGetGuardrailsVersionsOptionalParams, + ManagedClustersGetGuardrailsVersionsResponse, + ManagedClustersGetSafeguardsVersionsOptionalParams, + ManagedClustersGetSafeguardsVersionsResponse, ManagedClustersGetMeshRevisionProfileOptionalParams, ManagedClustersGetMeshRevisionProfileResponse, ManagedClustersGetMeshUpgradeProfileOptionalParams, ManagedClustersGetMeshUpgradeProfileResponse, + RebalanceLoadBalancersRequestBody, + ManagedClustersRebalanceLoadBalancersOptionalParams, + ManagedClustersRebalanceLoadBalancersResponse, ManagedClustersListNextResponse, ManagedClustersListByResourceGroupNextResponse, ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse, + ManagedClustersListGuardrailsVersionsNextResponse, + ManagedClustersListSafeguardsVersionsNextResponse, ManagedClustersListMeshRevisionProfilesNextResponse, ManagedClustersListMeshUpgradeProfilesNextResponse, } from "../models"; @@ -313,6 +330,144 @@ export class ManagedClustersImpl implements ManagedClusters { } } + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listGuardrailsVersionsPagingAll(location, 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.listGuardrailsVersionsPagingPage( + location, + options, + settings, + ); + }, + }; + } + + private async *listGuardrailsVersionsPagingPage( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClustersListGuardrailsVersionsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listGuardrailsVersions(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listGuardrailsVersionsNext( + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listGuardrailsVersionsPagingAll( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listGuardrailsVersionsPagingPage( + location, + options, + )) { + yield* page; + } + } + + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSafeguardsVersionsPagingAll(location, 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.listSafeguardsVersionsPagingPage( + location, + options, + settings, + ); + }, + }; + } + + private async *listSafeguardsVersionsPagingPage( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClustersListSafeguardsVersionsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSafeguardsVersions(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listSafeguardsVersionsNext( + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listSafeguardsVersionsPagingAll( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSafeguardsVersionsPagingPage( + location, + options, + )) { + yield* page; + } + } + /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -1084,6 +1239,100 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } + /** + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + async beginAbortLatestOperation( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersAbortLatestOperationResponse + > + > { + 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: abortLatestOperationOperationSpec, + }); + const poller = await createHttpPoller< + ManagedClustersAbortLatestOperationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + async beginAbortLatestOperationAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise { + const poller = await this.beginAbortLatestOperation( + resourceGroupName, + resourceName, + options, + ); + return poller.pollUntilDone(); + } + /** * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more * details about rotating managed cluster certificates. @@ -1176,100 +1425,6 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } - /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - async beginAbortLatestOperation( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ManagedClustersAbortLatestOperationResponse - > - > { - 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: abortLatestOperationOperationSpec, - }); - const poller = await createHttpPoller< - ManagedClustersAbortLatestOperationResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - async beginAbortLatestOperationAndWait( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise { - const poller = await this.beginAbortLatestOperation( - resourceGroupName, - resourceName, - options, - ); - return poller.pollUntilDone(); - } - /** * Rotates the service account signing keys of a managed cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1686,6 +1841,70 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * Contains Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getGuardrailsVersions( + location: string, + version: string, + options?: ManagedClustersGetGuardrailsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, version, options }, + getGuardrailsVersionsOperationSpec, + ); + } + + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listGuardrailsVersionsOperationSpec, + ); + } + + /** + * Contains Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getSafeguardsVersions( + location: string, + version: string, + options?: ManagedClustersGetSafeguardsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, version, options }, + getSafeguardsVersionsOperationSpec, + ); + } + + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listSafeguardsVersionsOperationSpec, + ); + } + /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -1756,6 +1975,102 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + async beginRebalanceLoadBalancers( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersRebalanceLoadBalancersResponse + > + > { + 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, parameters, options }, + spec: rebalanceLoadBalancersOperationSpec, + }); + const poller = await createHttpPoller< + ManagedClustersRebalanceLoadBalancersResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + async beginRebalanceLoadBalancersAndWait( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise { + const poller = await this.beginRebalanceLoadBalancers( + resourceGroupName, + resourceName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -1808,6 +2123,40 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * ListGuardrailsVersionsNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListGuardrailsVersions method. + * @param options The options parameters. + */ + private _listGuardrailsVersionsNext( + location: string, + nextLink: string, + options?: ManagedClustersListGuardrailsVersionsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listGuardrailsVersionsNextOperationSpec, + ); + } + + /** + * ListSafeguardsVersionsNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListSafeguardsVersions method. + * @param options The options parameters. + */ + private _listSafeguardsVersionsNext( + location: string, + nextLink: string, + options?: ManagedClustersListSafeguardsVersionsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listSafeguardsVersionsNextOperationSpec, + ); + } + /** * ListMeshRevisionProfilesNext * @param location The name of the Azure region. @@ -2085,7 +2434,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.resourceName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch, + Parameters.ifNoneMatch, + ], mediaType: "json", serializer, }; @@ -2117,7 +2471,11 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.resourceName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch, + ], mediaType: "json", serializer, }; @@ -2141,14 +2499,17 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget, + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.ifMatch], serializer, }; const resetServicePrincipalProfileOperationSpec: coreClient.OperationSpec = { @@ -2199,36 +2560,6 @@ const resetAADProfileOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; -const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, - }, - 201: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, - }, - 202: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, - }, - 204: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; const abortLatestOperationOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", httpMethod: "POST", @@ -2259,6 +2590,36 @@ const abortLatestOperationOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + }, + 201: { + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + }, + 202: { + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + }, + 204: { + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; const rotateServiceAccountSigningKeysOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", httpMethod: "POST", @@ -2432,6 +2793,88 @@ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.Operatio headerParameters: [Parameters.accept], serializer, }; +const getGuardrailsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.version, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listGuardrailsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSafeguardsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.version, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSafeguardsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listMeshRevisionProfilesOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", httpMethod: "GET", @@ -2516,6 +2959,38 @@ const getMeshUpgradeProfileOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const rebalanceLoadBalancersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 201: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 202: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 204: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -2577,6 +3052,46 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper headerParameters: [Parameters.accept], serializer, }; +const listGuardrailsVersionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSafeguardsVersionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listMeshRevisionProfilesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts b/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts new file mode 100644 index 00000000000..21cac012cb7 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts @@ -0,0 +1,284 @@ +/* + * 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 { OperationStatusResultOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + OperationStatusResult, + OperationStatusResultListNextOptionalParams, + OperationStatusResultListOptionalParams, + OperationStatusResultListResponse, + OperationStatusResultGetOptionalParams, + OperationStatusResultGetResponse, + OperationStatusResultGetByAgentPoolOptionalParams, + OperationStatusResultGetByAgentPoolResponse, + OperationStatusResultListNextResponse, +} from "../models"; + +/// +/** Class containing OperationStatusResultOperations operations. */ +export class OperationStatusResultOperationsImpl + implements OperationStatusResultOperations +{ + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class OperationStatusResultOperations class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, 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( + resourceGroupName, + resourceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OperationStatusResultListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, resourceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec, + ); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + operationId: string, + options?: OperationStatusResultGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, operationId, options }, + getOperationSpec, + ); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + getByAgentPool( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + operationId: string, + options?: OperationStatusResultGetByAgentPoolOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, operationId, options }, + getByAgentPoolOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: OperationStatusResultListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResultList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.operationId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getByAgentPoolOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName, + Parameters.operationId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResultList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts index e022b354a4a..c3df5537608 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts @@ -261,7 +261,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts index f7bb489fbe8..f8533aa465f 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts @@ -64,7 +64,7 @@ const postOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts index 23a4396858b..276067652b9 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts @@ -372,7 +372,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts index aba7242cfed..47959ddf591 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts @@ -21,6 +21,9 @@ import { AgentPoolsDeleteResponse, AgentPoolsGetUpgradeProfileOptionalParams, AgentPoolsGetUpgradeProfileResponse, + AgentPoolDeleteMachinesParameter, + AgentPoolsDeleteMachinesOptionalParams, + AgentPoolsDeleteMachinesResponse, AgentPoolsGetAvailableAgentPoolVersionsOptionalParams, AgentPoolsGetAvailableAgentPoolVersionsResponse, AgentPoolsUpgradeNodeImageVersionOptionalParams, @@ -43,7 +46,7 @@ export interface AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -63,7 +66,7 @@ export interface AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -167,6 +170,41 @@ export interface AgentPools { agentPoolName: string, options?: AgentPoolsGetUpgradeProfileOptionalParams, ): Promise; + /** + * Deletes specific machines in an agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param options The options parameters. + */ + beginDeleteMachines( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machines: AgentPoolDeleteMachinesParameter, + options?: AgentPoolsDeleteMachinesOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AgentPoolsDeleteMachinesResponse + > + >; + /** + * Deletes specific machines in an agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param options The options parameters. + */ + beginDeleteMachinesAndWait( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machines: AgentPoolDeleteMachinesParameter, + options?: AgentPoolsDeleteMachinesOptionalParams, + ): Promise; /** * See [supported Kubernetes * versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index efffc02a7d4..9576b01c283 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -10,9 +10,13 @@ export * from "./operations"; export * from "./managedClusters"; export * from "./maintenanceConfigurations"; export * from "./agentPools"; +export * from "./machines"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; +export * from "./operationStatusResultOperations"; export * from "./snapshots"; -export * from "./trustedAccessRoleBindings"; +export * from "./managedClusterSnapshots"; export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./loadBalancers"; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts new file mode 100644 index 00000000000..bdca66c5451 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts @@ -0,0 +1,93 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LoadBalancer, + LoadBalancersListByManagedClusterOptionalParams, + LoadBalancersGetOptionalParams, + LoadBalancersGetResponse, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersCreateOrUpdateResponse, + LoadBalancersDeleteOptionalParams, + LoadBalancersDeleteResponse, +} from "../models"; + +/// +/** Interface representing a LoadBalancers. */ +export interface LoadBalancers { + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified load balancer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ): Promise; + /** + * Creates or updates a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancersDeleteResponse + > + >; + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/machines.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/machines.ts new file mode 100644 index 00000000000..61c400b0a81 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/machines.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Machine, + MachinesListOptionalParams, + MachinesGetOptionalParams, + MachinesGetResponse, +} from "../models"; + +/// +/** Interface representing a Machines. */ +export interface Machines { + /** + * Gets a list of machines in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: MachinesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a specific machine in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName host name of the machine + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + machineName: string, + options?: MachinesGetOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts new file mode 100644 index 00000000000..b6a035c3cb0 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a ManagedClusterSnapshots. */ +export interface ManagedClusterSnapshots { + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams, + ): Promise; + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams, + ): Promise; + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index a64630f2907..0526ebd4f60 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -14,6 +14,10 @@ import { ManagedClustersListByResourceGroupOptionalParams, OutboundEnvironmentEndpoint, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, + GuardrailsAvailableVersion, + ManagedClustersListGuardrailsVersionsOptionalParams, + SafeguardsAvailableVersion, + ManagedClustersListSafeguardsVersionsOptionalParams, MeshRevisionProfile, ManagedClustersListMeshRevisionProfilesOptionalParams, MeshUpgradeProfile, @@ -45,10 +49,10 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, - ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateClusterCertificatesResponse, ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersAbortLatestOperationResponse, + ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateClusterCertificatesResponse, ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersRotateServiceAccountSigningKeysResponse, ManagedClustersStopOptionalParams, @@ -60,10 +64,17 @@ import { ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, ManagedClustersGetCommandResultResponse, + ManagedClustersGetGuardrailsVersionsOptionalParams, + ManagedClustersGetGuardrailsVersionsResponse, + ManagedClustersGetSafeguardsVersionsOptionalParams, + ManagedClustersGetSafeguardsVersionsResponse, ManagedClustersGetMeshRevisionProfileOptionalParams, ManagedClustersGetMeshRevisionProfileResponse, ManagedClustersGetMeshUpgradeProfileOptionalParams, ManagedClustersGetMeshUpgradeProfileResponse, + RebalanceLoadBalancersRequestBody, + ManagedClustersRebalanceLoadBalancersOptionalParams, + ManagedClustersRebalanceLoadBalancersResponse, } from "../models"; /// @@ -97,6 +108,24 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, ): PagedAsyncIterableIterator; + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): PagedAsyncIterableIterator; /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -352,6 +381,37 @@ export interface ManagedClusters { parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams, ): Promise; + /** + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + beginAbortLatestOperation( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersAbortLatestOperationResponse + > + >; + /** + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + beginAbortLatestOperationAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise; /** * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more * details about rotating managed cluster certificates. @@ -381,37 +441,6 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams, ): Promise; - /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - beginAbortLatestOperation( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ManagedClustersAbortLatestOperationResponse - > - >; - /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - beginAbortLatestOperationAndWait( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise; /** * Rotates the service account signing keys of a managed cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -551,6 +580,28 @@ export interface ManagedClusters { commandId: string, options?: ManagedClustersGetCommandResultOptionalParams, ): Promise; + /** + * Contains Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getGuardrailsVersions( + location: string, + version: string, + options?: ManagedClustersGetGuardrailsVersionsOptionalParams, + ): Promise; + /** + * Contains Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getSafeguardsVersions( + location: string, + version: string, + options?: ManagedClustersGetSafeguardsVersionsOptionalParams, + ): Promise; /** * Contains extra metadata on the revision, including supported revisions, cluster compatibility and * available upgrades @@ -576,4 +627,37 @@ export interface ManagedClusters { mode: string, options?: ManagedClustersGetMeshUpgradeProfileOptionalParams, ): Promise; + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + beginRebalanceLoadBalancers( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersRebalanceLoadBalancersResponse + > + >; + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + beginRebalanceLoadBalancersAndWait( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise; } diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts new file mode 100644 index 00000000000..2daabb8e1a7 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts @@ -0,0 +1,61 @@ +/* + * 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 { + OperationStatusResult, + OperationStatusResultListOptionalParams, + OperationStatusResultGetOptionalParams, + OperationStatusResultGetResponse, + OperationStatusResultGetByAgentPoolOptionalParams, + OperationStatusResultGetByAgentPoolResponse, +} from "../models"; + +/// +/** Interface representing a OperationStatusResultOperations. */ +export interface OperationStatusResultOperations { + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the status of a specific operation in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + operationId: string, + options?: OperationStatusResultGetOptionalParams, + ): Promise; + /** + * Get the status of a specific operation in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + getByAgentPool( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + operationId: string, + options?: OperationStatusResultGetByAgentPoolOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/test/containerservice_examples.ts b/sdk/containerservice/arm-containerservice/test/containerservice_examples.ts index f40e64b2131..9ed2905cda4 100644 --- a/sdk/containerservice/arm-containerservice/test/containerservice_examples.ts +++ b/sdk/containerservice/arm-containerservice/test/containerservice_examples.ts @@ -20,14 +20,15 @@ import { ContainerServiceClient } from "../src/containerServiceClient"; import { DefaultAzureCredential } from "@azure/identity"; const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" }; const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables + envSetupForPlayback: replaceableVariables, + removeCentralSanitizers: [ + "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section + "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section + ], }; export const testPollingOptions = {