From ebc8c4493b0f0ebda211c7e24c53b49471af51d1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 14 Sep 2022 09:23:23 +0000 Subject: [PATCH] CodeGen from PR 20713 in Azure/azure-rest-api-specs Merge d151ec62cf6de511094dc2b7f35a96d8edfbed05 into 7f08477115a1c32910bc0eda047fe0471285a392 --- common/config/rush/pnpm-lock.yaml | 17 +- .../arm-containerservice/CHANGELOG.md | 171 ++ .../arm-containerservice/README.md | 2 +- .../arm-containerservice/_meta.json | 6 +- .../arm-containerservice/package.json | 14 +- .../review/arm-containerservice.api.md | 659 +++++++- .../src/containerServiceClient.ts | 99 +- .../arm-containerservice/src/models/index.ts | 1002 +++++++++++- .../src/models/mappers.ts | 1429 +++++++++++++++-- .../src/models/parameters.ts | 123 +- .../src/operations/agentPools.ts | 49 +- .../src/operations/fleetMembers.ts | 486 ++++++ .../src/operations/fleets.ts | 643 ++++++++ .../src/operations/index.ts | 5 + .../src/operations/managedClusterSnapshots.ts | 447 ++++++ .../src/operations/managedClusters.ts | 153 +- .../operations/trustedAccessRoleBindings.ts | 328 ++++ .../src/operations/trustedAccessRoles.ts | 158 ++ .../src/operationsInterfaces/agentPools.ts | 17 + .../src/operationsInterfaces/fleetMembers.ts | 113 ++ .../src/operationsInterfaces/fleets.ts | 129 ++ .../src/operationsInterfaces/index.ts | 5 + .../managedClusterSnapshots.ts | 91 ++ .../operationsInterfaces/managedClusters.ts | 39 + .../trustedAccessRoleBindings.ts | 75 + .../trustedAccessRoles.ts | 27 + .../arm-containerservice/test/sampleTest.ts | 43 + .../arm-containerservice/tsconfig.json | 10 +- 28 files changed, 6102 insertions(+), 238 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/src/operations/fleetMembers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/fleets.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleetMembers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleets.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts create mode 100644 sdk/containerservice/arm-containerservice/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index eab8c36cbaad..6c99304e3608 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3949,7 +3949,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220912 + typescript: 4.9.0-dev.20220914 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8881,8 +8881,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220912: - resolution: {integrity: sha512-B1WnNBtZgqkG48/Z1v4VQWxZSjJl+iJdgafU/8mLFOZyinS5Jejz04TucADMOTufHaIc4USMcYALrAg03Twg1A==} + /typescript/4.9.0-dev.20220914: + resolution: {integrity: sha512-U1GcTQISGDyNlwr/OUTQVKFGMjL5eYrzT4nTptRn6lcaiRwO0+zmdHD3FMf6ZdiV5wZMMU706GH08EgiBufIqw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11140,7 +11140,7 @@ packages: dev: false file:projects/arm-containerservice-1.tgz: - resolution: {integrity: sha512-4rGEnPtnnvd6qO0J7GeggMeF9J4egZJXHQETtgzbj6rOZHNs0dTicn7Mj8QEAYM572CmGeh4D53ESDWzspHXFw==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-bcLRZG3rMY4v/pB1SJf+zmJnYONUusj0KIoHG97zYcu3icnX4f6saT1lnZJMOwioPSef0NRck4mtwK+RhgdzHg==, tarball: file:projects/arm-containerservice-1.tgz} name: '@rush-temp/arm-containerservice-1' version: 0.0.0 dependencies: @@ -11159,7 +11159,7 @@ packages: rollup: 2.79.0 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.0 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.17.0 transitivePeerDependencies: - '@types/node' @@ -17957,7 +17957,7 @@ packages: dev: false file:projects/perf-storage-blob.tgz: - resolution: {integrity: sha512-ACRt0wrz261MTNDcEEtDfYkqhDTiiRw20AhsdJ2nkKTQwtECihm6lxFOuC3n+/2WSWp9qgEpi8bSIHrN1n/r2w==, tarball: file:projects/perf-storage-blob.tgz} + resolution: {integrity: sha512-YpnKzYo6JuUUrhzh2YmZJba2rxDSueRobUdxEUOAcpCzQX4lSqzQp5/4tC/6e6ZQjL+UNxoC9nLTBeGMic9ybw==, tarball: file:projects/perf-storage-blob.tgz} name: '@rush-temp/perf-storage-blob' version: 0.0.0 dependencies: @@ -17982,7 +17982,7 @@ packages: dev: false file:projects/perf-storage-file-datalake.tgz: - resolution: {integrity: sha512-dewHjtVi92xQNZXFTBBg2mElIhlItaacuMnkQC0ow0RMJWfyBwd6nVuONNPG0SKH1653tZGysRT3a54qdiejqg==, tarball: file:projects/perf-storage-file-datalake.tgz} + resolution: {integrity: sha512-Ox0X3U3YxqUTmWjuhPnBzrxvEGtjVbFLu9iYrHtt3k/pYhEd3Xw1Oos/cFo0KVysPW7hqzK8mFDjHRsoAhb/uA==, tarball: file:projects/perf-storage-file-datalake.tgz} name: '@rush-temp/perf-storage-file-datalake' version: 0.0.0 dependencies: @@ -18000,12 +18000,11 @@ packages: transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - - encoding - supports-color dev: false file:projects/perf-storage-file-share.tgz: - resolution: {integrity: sha512-9KuLR0nT5kWloC46ScHq4HD/VJXATHFewmRU1tK6WWqeyqhlSrWLgRcZ93H1Mn7v2bK6Njb7BMl2cmvZrpb1BQ==, tarball: file:projects/perf-storage-file-share.tgz} + resolution: {integrity: sha512-yDs9WjNGJcxpAl1fEm06qafAKla/DIUw+gOt2Wp1HDM79rJUXubFJv99W0Kr+K/+3ljFE86F/qEUEOe9RSm22w==, tarball: file:projects/perf-storage-file-share.tgz} name: '@rush-temp/perf-storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index c0d4180efee2..710eefc5f259 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,5 +1,176 @@ # Release History +## 18.0.0-beta.1 (2022-09-14) + +**Features** + + - Added operation group FleetMembers + - Added operation group Fleets + - Added operation group ManagedClusterSnapshots + - Added operation group TrustedAccessRoleBindings + - Added operation group TrustedAccessRoles + - Added operation AgentPools.abortLatestOperation + - Added operation ManagedClusters.abortLatestOperation + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeys + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait + - Added Interface AgentPoolsAbortLatestOperationOptionalParams + - Added Interface AgentPoolWindowsProfile + - Added Interface AzureEntityResource + - Added Interface ContainerServiceNetworkProfileKubeProxyConfig + - Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface Fleet + - Added Interface FleetCredentialResult + - Added Interface FleetCredentialResults + - Added Interface FleetHubProfile + - Added Interface FleetListResult + - Added Interface FleetMember + - Added Interface FleetMembersCreateOrUpdateOptionalParams + - Added Interface FleetMembersDeleteOptionalParams + - Added Interface FleetMembersGetOptionalParams + - Added Interface FleetMembersListByFleetNextOptionalParams + - Added Interface FleetMembersListByFleetOptionalParams + - Added Interface FleetMembersListResult + - Added Interface FleetPatch + - Added Interface FleetsCreateOrUpdateOptionalParams + - Added Interface FleetsDeleteOptionalParams + - Added Interface FleetsGetOptionalParams + - Added Interface FleetsListByResourceGroupNextOptionalParams + - Added Interface FleetsListByResourceGroupOptionalParams + - Added Interface FleetsListCredentialsOptionalParams + - Added Interface FleetsListNextOptionalParams + - Added Interface FleetsListOptionalParams + - Added Interface FleetsUpdateOptionalParams + - Added Interface GuardrailsProfile + - Added Interface ManagedClusterAzureMonitorProfile + - Added Interface ManagedClusterAzureMonitorProfileKubeStateMetrics + - Added Interface ManagedClusterAzureMonitorProfileMetrics + - Added Interface ManagedClusterIngressProfile + - Added Interface ManagedClusterIngressProfileWebAppRouting + - Added Interface ManagedClusterOidcIssuerProfile + - Added Interface ManagedClusterPropertiesForSnapshot + - Added Interface ManagedClustersAbortLatestOperationOptionalParams + - Added Interface ManagedClusterSecurityProfileImageCleaner + - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClusterSecurityProfileWorkloadIdentity + - 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 ManagedClustersRotateServiceAccountSigningKeysOptionalParams + - Added Interface ManagedClusterStorageProfileBlobCSIDriver + - Added Interface ManagedClusterWorkloadAutoScalerProfile + - Added Interface ManagedClusterWorkloadAutoScalerProfileKeda + - Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + - Added Interface NetworkProfileForSnapshot + - Added Interface TrustedAccessRole + - Added Interface TrustedAccessRoleBinding + - Added Interface TrustedAccessRoleBindingListResult + - Added Interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + - Added Interface TrustedAccessRoleBindingsDeleteOptionalParams + - Added Interface TrustedAccessRoleBindingsGetOptionalParams + - Added Interface TrustedAccessRoleBindingsListNextOptionalParams + - Added Interface TrustedAccessRoleBindingsListOptionalParams + - Added Interface TrustedAccessRoleListResult + - Added Interface TrustedAccessRoleRule + - Added Interface TrustedAccessRolesListNextOptionalParams + - Added Interface TrustedAccessRolesListOptionalParams + - Added Type Alias BackendPoolType + - Added Type Alias ControlledValues + - Added Type Alias FleetMemberProvisioningState + - Added Type Alias FleetMembersCreateOrUpdateResponse + - Added Type Alias FleetMembersGetResponse + - Added Type Alias FleetMembersListByFleetNextResponse + - Added Type Alias FleetMembersListByFleetResponse + - Added Type Alias FleetProvisioningState + - Added Type Alias FleetsCreateOrUpdateResponse + - Added Type Alias FleetsGetResponse + - Added Type Alias FleetsListByResourceGroupNextResponse + - Added Type Alias FleetsListByResourceGroupResponse + - Added Type Alias FleetsListCredentialsResponse + - Added Type Alias FleetsListNextResponse + - Added Type Alias FleetsListResponse + - Added Type Alias FleetsUpdateResponse + - Added Type Alias IpvsScheduler + - Added Type Alias Level + - 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 Mode + - Added Type Alias NetworkPluginMode + - Added Type Alias TrustedAccessRoleBindingProvisioningState + - Added Type Alias TrustedAccessRoleBindingsCreateOrUpdateResponse + - Added Type Alias TrustedAccessRoleBindingsGetResponse + - Added Type Alias TrustedAccessRoleBindingsListNextResponse + - Added Type Alias TrustedAccessRoleBindingsListResponse + - Added Type Alias TrustedAccessRolesListNextResponse + - Added Type Alias TrustedAccessRolesListResponse + - Added Type Alias UpdateMode + - Interface AgentPool has a new optional parameter capacityReservationGroupID + - Interface AgentPool has a new optional parameter enableCustomCATrust + - Interface AgentPool has a new optional parameter messageOfTheDay + - Interface AgentPool has a new optional parameter windowsProfile + - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig + - Interface ContainerServiceNetworkProfile has a new optional parameter networkPluginMode + - Interface ManagedCluster has a new optional parameter azureMonitorProfile + - Interface ManagedCluster has a new optional parameter creationData + - Interface ManagedCluster has a new optional parameter enableNamespaceResources + - Interface ManagedCluster has a new optional parameter guardrailsProfile + - Interface ManagedCluster has a new optional parameter ingressProfile + - Interface ManagedCluster has a new optional parameter oidcIssuerProfile + - Interface ManagedCluster has a new optional parameter workloadAutoScalerProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter windowsProfile + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter enableVnetIntegration + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId + - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy + - Interface ManagedClusterLoadBalancerProfile has a new optional parameter backendPoolType + - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ManagedClusterSecurityProfile has a new optional parameter imageCleaner + - Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction + - Interface ManagedClusterSecurityProfile has a new optional parameter workloadIdentity + - Interface ManagedClusterStorageProfile has a new optional parameter blobCSIDriver + - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version + - Class ContainerServiceClient has a new parameter fleetMembers + - Class ContainerServiceClient has a new parameter fleets + - Class ContainerServiceClient has a new parameter managedClusterSnapshots + - Class ContainerServiceClient has a new parameter trustedAccessRoleBindings + - Class ContainerServiceClient has a new parameter trustedAccessRoles + - Added Enum KnownBackendPoolType + - Added Enum KnownControlledValues + - Added Enum KnownFleetMemberProvisioningState + - Added Enum KnownFleetProvisioningState + - Added Enum KnownIpvsScheduler + - Added Enum KnownLevel + - Added Enum KnownMode + - Added Enum KnownNetworkPluginMode + - Added Enum KnownTrustedAccessRoleBindingProvisioningState + - Added Enum KnownUpdateMode + - Enum KnownOssku has a new value Mariner + - Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter + - Enum KnownSnapshotType has a new value ManagedCluster + +**Breaking Changes** + + - Interface ContainerServiceClientOptionalParams no longer has parameter apiVersion + - Class ContainerServiceClient no longer has parameter apiVersion + + ## 17.1.0 (2022-08-25) **Features** diff --git a/sdk/containerservice/arm-containerservice/README.md b/sdk/containerservice/arm-containerservice/README.md index e82804d19418..634b51c21adf 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 2588deb9a6f9..4852eee2f562 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "df66d048c82fd136d5a15dea61c3c35bf6da9d43", + "commit": "391884bf7609f129fe96264f63cf16fa2c7da69f", "readme": "specification/containerservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --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\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220727.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 6381f5451605..fb3154ae4d88 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": "17.1.0", + "version": "18.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } + "autoPublish": true } \ 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 7d94ea6eaadf..a674df4295ef 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -13,10 +13,12 @@ import { PollOperationState } from '@azure/core-lro'; // @public export interface AgentPool extends SubResource { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; @@ -28,6 +30,7 @@ export interface AgentPool extends SubResource { linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -56,6 +59,7 @@ export interface AgentPool extends SubResource { upgradeSettings?: AgentPoolUpgradeSettings; vmSize?: string; vnetSubnetID?: string; + windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } @@ -85,6 +89,7 @@ export type AgentPoolMode = string; // @public export interface AgentPools { + abortLatestOperation(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsAbortLatestOperationOptionalParams): Promise; beginCreateOrUpdate(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise, AgentPoolsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise, void>>; @@ -97,6 +102,10 @@ export interface AgentPools { list(resourceGroupName: string, resourceName: string, options?: AgentPoolsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface AgentPoolsAbortLatestOperationOptionalParams extends coreClient.OperationOptions { +} + // @public export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -108,6 +117,7 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; // @public export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -183,6 +193,16 @@ export interface AgentPoolUpgradeSettings { maxSurge?: string; } +// @public +export interface AgentPoolWindowsProfile { + disableOutboundNat?: boolean; +} + +// @public +export interface AzureEntityResource extends Resource { + readonly etag?: string; +} + // @public export interface AzureKeyVaultKms { enabled?: boolean; @@ -191,6 +211,9 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +// @public +export type BackendPoolType = string; + // @public export interface CloudError { error?: CloudErrorBody; @@ -218,12 +241,16 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) agentPools: AgentPools; // (undocumented) - apiVersion: string; + fleetMembers: FleetMembers; + // (undocumented) + fleets: Fleets; // (undocumented) maintenanceConfigurations: MaintenanceConfigurations; // (undocumented) managedClusters: ManagedClusters; // (undocumented) + managedClusterSnapshots: ManagedClusterSnapshots; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -235,12 +262,15 @@ export class ContainerServiceClient extends coreClient.ServiceClient { snapshots: Snapshots; // (undocumented) subscriptionId: string; + // (undocumented) + trustedAccessRoleBindings: TrustedAccessRoleBindings; + // (undocumented) + trustedAccessRoles: TrustedAccessRoles; } // @public export interface ContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; - apiVersion?: string; endpoint?: string; } @@ -272,11 +302,13 @@ export interface ContainerServiceNetworkProfile { dnsServiceIP?: string; dockerBridgeCidr?: string; ipFamilies?: IpFamily[]; + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; loadBalancerProfile?: ManagedClusterLoadBalancerProfile; loadBalancerSku?: LoadBalancerSku; natGatewayProfile?: ManagedClusterNATGatewayProfile; networkMode?: NetworkMode; networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; networkPolicy?: NetworkPolicy; outboundType?: OutboundType; podCidr?: string; @@ -285,6 +317,21 @@ export interface ContainerServiceNetworkProfile { serviceCidrs?: string[]; } +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfig { + enabled?: boolean; + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + mode?: Mode; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + scheduler?: IpvsScheduler; + tcpFinTimeoutSeconds?: number; + tcpTimeoutSeconds?: number; + udpTimeoutSeconds?: number; +} + // @public export interface ContainerServiceSshConfiguration { publicKeys: ContainerServiceSshPublicKey[]; @@ -307,6 +354,9 @@ export interface ContainerServiceVMDiagnostics { // @public export type ContainerServiceVMSizeTypes = string; +// @public +export type ControlledValues = string; + // @public export type Count = 1 | 3 | 5; @@ -343,6 +393,26 @@ export interface EndpointDetail { protocol?: string; } +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export type Expander = string; @@ -355,15 +425,213 @@ export interface ExtendedLocation { // @public export type ExtendedLocationTypes = string; +// @public +export interface Fleet extends TrackedResource { + readonly etag?: string; + hubProfile?: FleetHubProfile; + readonly provisioningState?: FleetProvisioningState; +} + +// @public +export interface FleetCredentialResult { + readonly name?: string; + readonly value?: Uint8Array; +} + +// @public +export interface FleetCredentialResults { + readonly kubeconfigs?: FleetCredentialResult[]; +} + +// @public +export interface FleetHubProfile { + dnsPrefix?: string; + readonly fqdn?: string; + readonly kubernetesVersion?: string; +} + +// @public +export interface FleetListResult { + readonly nextLink?: string; + value?: Fleet[]; +} + +// @public +export interface FleetMember extends AzureEntityResource { + clusterResourceId?: string; + readonly provisioningState?: FleetMemberProvisioningState; +} + +// @public +export type FleetMemberProvisioningState = string; + +// @public +export interface FleetMembers { + beginCreateOrUpdate(resourceGroupName: string, fleetName: string, fleetMemberName: string, parameters: FleetMember, options?: FleetMembersCreateOrUpdateOptionalParams): Promise, FleetMembersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, fleetName: string, fleetMemberName: string, parameters: FleetMember, options?: FleetMembersCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersDeleteOptionalParams): Promise; + get(resourceGroupName: string, fleetName: string, fleetMemberName: string, options?: FleetMembersGetOptionalParams): Promise; + listByFleet(resourceGroupName: string, fleetName: string, options?: FleetMembersListByFleetOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FleetMembersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FleetMembersCreateOrUpdateResponse = FleetMember; + +// @public +export interface FleetMembersDeleteOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FleetMembersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetMembersGetResponse = FleetMember; + +// @public +export interface FleetMembersListByFleetNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetMembersListByFleetNextResponse = FleetMembersListResult; + +// @public +export interface FleetMembersListByFleetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetMembersListByFleetResponse = FleetMembersListResult; + +// @public +export interface FleetMembersListResult { + readonly nextLink?: string; + value?: FleetMember[]; +} + +// @public +export interface FleetPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type FleetProvisioningState = string; + +// @public +export interface Fleets { + beginCreateOrUpdate(resourceGroupName: string, fleetName: string, parameters: Fleet, options?: FleetsCreateOrUpdateOptionalParams): Promise, FleetsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, fleetName: string, parameters: Fleet, options?: FleetsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, fleetName: string, options?: FleetsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, fleetName: string, options?: FleetsDeleteOptionalParams): Promise; + get(resourceGroupName: string, fleetName: string, options?: FleetsGetOptionalParams): Promise; + list(options?: FleetsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: FleetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listCredentials(resourceGroupName: string, fleetName: string, options?: FleetsListCredentialsOptionalParams): Promise; + update(resourceGroupName: string, fleetName: string, options?: FleetsUpdateOptionalParams): Promise; +} + +// @public +export interface FleetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FleetsCreateOrUpdateResponse = Fleet; + +// @public +export interface FleetsDeleteOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FleetsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsGetResponse = Fleet; + +// @public +export interface FleetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsListByResourceGroupNextResponse = FleetListResult; + +// @public +export interface FleetsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsListByResourceGroupResponse = FleetListResult; + +// @public +export interface FleetsListCredentialsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsListCredentialsResponse = FleetCredentialResults; + +// @public +export interface FleetsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsListNextResponse = FleetListResult; + +// @public +export interface FleetsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FleetsListResponse = FleetListResult; + +// @public +export interface FleetsUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + parameters?: FleetPatch; +} + +// @public +export type FleetsUpdateResponse = Fleet; + // @public export type Format = string; // @public export type GPUInstanceProfile = string; +// @public +export interface GuardrailsProfile { + excludedNamespaces?: string[]; + level: Level; + readonly systemExcludedNamespaces?: string[]; + version: string; +} + // @public export type IpFamily = string; +// @public +export type IpvsScheduler = string; + // @public export type KeyVaultNetworkAccessTypes = string; @@ -379,6 +647,12 @@ export enum KnownAgentPoolType { VirtualMachineScaleSets = "VirtualMachineScaleSets" } +// @public +export enum KnownBackendPoolType { + NodeIP = "NodeIP", + NodeIPConfiguration = "NodeIPConfiguration" +} + // @public export enum KnownCode { Running = "Running", @@ -577,6 +851,12 @@ export enum KnownContainerServiceVMSizeTypes { StandardNV6 = "Standard_NV6" } +// @public +export enum KnownControlledValues { + RequestsAndLimits = "RequestsAndLimits", + RequestsOnly = "RequestsOnly" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -598,6 +878,26 @@ export enum KnownExtendedLocationTypes { EdgeZone = "EdgeZone" } +// @public +export enum KnownFleetMemberProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Joining = "Joining", + Leaving = "Leaving", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownFleetProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownFormat { Azure = "azure", @@ -619,6 +919,12 @@ export enum KnownIpFamily { IPv6 = "IPv6" } +// @public +export enum KnownIpvsScheduler { + LeastConnection = "LeastConnection", + RoundRobin = "RoundRobin" +} + // @public export enum KnownKeyVaultNetworkAccessTypes { Private = "Private", @@ -631,6 +937,13 @@ export enum KnownKubeletDiskType { Temporary = "Temporary" } +// @public +export enum KnownLevel { + Enforcement = "Enforcement", + Off = "Off", + Warning = "Warning" +} + // @public export enum KnownLicenseType { None = "None", @@ -662,6 +975,12 @@ export enum KnownManagedClusterSKUTier { Paid = "Paid" } +// @public +export enum KnownMode { + Iptables = "IPTABLES", + Ipvs = "IPVS" +} + // @public export enum KnownNetworkMode { Bridge = "bridge", @@ -675,6 +994,11 @@ export enum KnownNetworkPlugin { None = "none" } +// @public +export enum KnownNetworkPluginMode { + Overlay = "Overlay" +} + // @public export enum KnownNetworkPolicy { Azure = "azure", @@ -690,6 +1014,7 @@ export enum KnownOSDiskType { // @public export enum KnownOssku { CBLMariner = "CBLMariner", + Mariner = "Mariner", Ubuntu = "Ubuntu", Windows2019 = "Windows2019", Windows2022 = "Windows2022" @@ -720,7 +1045,8 @@ export enum KnownPrivateEndpointConnectionProvisioningState { // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" } // @public @@ -743,9 +1069,26 @@ export enum KnownScaleSetPriority { // @public export enum KnownSnapshotType { + ManagedCluster = "ManagedCluster", NodePool = "NodePool" } +// @public +export enum KnownTrustedAccessRoleBindingProvisioningState { + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownUpdateMode { + Auto = "Auto", + Initial = "Initial", + Off = "Off", + Recreate = "Recreate" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -790,6 +1133,9 @@ export interface KubeletConfig { // @public export type KubeletDiskType = string; +// @public +export type Level = string; + // @public export type LicenseType = string; @@ -867,26 +1213,32 @@ export interface ManagedCluster extends TrackedResource { apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; + azureMonitorProfile?: ManagedClusterAzureMonitorProfile; readonly azurePortalFqdn?: string; + creationData?: CreationData; readonly currentKubernetesVersion?: string; disableLocalAccounts?: boolean; diskEncryptionSetID?: string; dnsPrefix?: string; + enableNamespaceResources?: boolean; enablePodSecurityPolicy?: boolean; enableRbac?: boolean; extendedLocation?: ExtendedLocation; readonly fqdn?: string; fqdnSubdomain?: string; + guardrailsProfile?: GuardrailsProfile; httpProxyConfig?: ManagedClusterHttpProxyConfig; identity?: ManagedClusterIdentity; identityProfile?: { [propertyName: string]: UserAssignedIdentity; }; + ingressProfile?: ManagedClusterIngressProfile; kubernetesVersion?: string; linuxProfile?: ContainerServiceLinuxProfile; readonly maxAgentPools?: number; networkProfile?: ContainerServiceNetworkProfile; nodeResourceGroup?: string; + oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; podIdentityProfile?: ManagedClusterPodIdentityProfile; readonly powerState?: PowerState; readonly privateFqdn?: string; @@ -898,6 +1250,7 @@ export interface ManagedCluster extends TrackedResource { sku?: ManagedClusterSKU; storageProfile?: ManagedClusterStorageProfile; windowsProfile?: ManagedClusterWindowsProfile; + workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; } // @public @@ -937,10 +1290,12 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; @@ -952,6 +1307,7 @@ export interface ManagedClusterAgentPoolProfileProperties { linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -980,6 +1336,7 @@ export interface ManagedClusterAgentPoolProfileProperties { upgradeSettings?: AgentPoolUpgradeSettings; vmSize?: string; vnetSubnetID?: string; + windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } @@ -989,7 +1346,9 @@ export interface ManagedClusterAPIServerAccessProfile { disableRunCommand?: boolean; enablePrivateCluster?: boolean; enablePrivateClusterPublicFqdn?: boolean; + enableVnetIntegration?: boolean; privateDNSZone?: string; + subnetId?: string; } // @public @@ -997,8 +1356,26 @@ export interface ManagedClusterAutoUpgradeProfile { upgradeChannel?: UpgradeChannel; } +// @public +export interface ManagedClusterAzureMonitorProfile { + metrics?: ManagedClusterAzureMonitorProfileMetrics; +} + +// @public +export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { + metricAnnotationsAllowList?: string; + metricLabelsAllowlist?: string; +} + +// @public +export interface ManagedClusterAzureMonitorProfileMetrics { + enabled: boolean; + kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; +} + // @public export interface ManagedClusterHttpProxyConfig { + readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1015,6 +1392,17 @@ export interface ManagedClusterIdentity { }; } +// @public +export interface ManagedClusterIngressProfile { + webAppRouting?: ManagedClusterIngressProfileWebAppRouting; +} + +// @public +export interface ManagedClusterIngressProfileWebAppRouting { + dnsZoneResourceId?: string; + enabled?: boolean; +} + // @public export interface ManagedClusterListResult { readonly nextLink?: string; @@ -1024,6 +1412,7 @@ export interface ManagedClusterListResult { // @public export interface ManagedClusterLoadBalancerProfile { allocatedOutboundPorts?: number; + backendPoolType?: BackendPoolType; effectiveOutboundIPs?: ResourceReference[]; enableMultipleStandardLoadBalancers?: boolean; idleTimeoutInMinutes?: number; @@ -1060,6 +1449,12 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } +// @public +export interface ManagedClusterOidcIssuerProfile { + enabled?: boolean; + readonly issuerURL?: string; +} + // @public export interface ManagedClusterPodIdentity { bindingSelector?: string; @@ -1143,8 +1538,17 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } +// @public +export interface ManagedClusterPropertiesForSnapshot { + enableRbac?: boolean; + kubernetesVersion?: string; + readonly networkProfile?: NetworkProfileForSnapshot; + sku?: ManagedClusterSKU; +} + // @public export interface ManagedClusters { + abortLatestOperation(resourceGroupName: string, resourceName: string, options?: ManagedClustersAbortLatestOperationOptionalParams): Promise; beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise, ManagedClustersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise, void>>; @@ -1155,6 +1559,8 @@ export interface ManagedClusters { beginResetServicePrincipalProfileAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedClusterServicePrincipalProfile, options?: ManagedClustersResetServicePrincipalProfileOptionalParams): Promise; beginRotateClusterCertificates(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise, void>>; beginRotateClusterCertificatesAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise; + beginRotateServiceAccountSigningKeys(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise, void>>; + beginRotateServiceAccountSigningKeysAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise; beginRunCommand(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise, ManagedClustersRunCommandResponse>>; beginRunCommandAndWait(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise; beginStart(resourceGroupName: string, resourceName: string, options?: ManagedClustersStartOptionalParams): Promise, void>>; @@ -1176,6 +1582,10 @@ export interface ManagedClusters { listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ManagedClustersAbortLatestOperationOptionalParams extends coreClient.OperationOptions { +} + // @public export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1187,6 +1597,7 @@ export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1195,6 +1606,9 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.Operatio export interface ManagedClusterSecurityProfile { azureKeyVaultKms?: AzureKeyVaultKms; defender?: ManagedClusterSecurityProfileDefender; + imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; + workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } // @public @@ -1208,6 +1622,22 @@ export interface ManagedClusterSecurityProfileDefenderSecurityMonitoring { enabled?: boolean; } +// @public +export interface ManagedClusterSecurityProfileImageCleaner { + enabled?: boolean; + intervalHours?: number; +} + +// @public +export interface ManagedClusterSecurityProfileNodeRestriction { + enabled?: boolean; +} + +// @public +export interface ManagedClusterSecurityProfileWorkloadIdentity { + enabled?: boolean; +} + // @public export interface ManagedClusterServicePrincipalProfile { clientId: string; @@ -1329,6 +1759,82 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; +// @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 ManagedClustersResetAADProfileOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1347,6 +1853,12 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams extends updateIntervalInMs?: number; } +// @public +export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface ManagedClustersRunCommandOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1370,14 +1882,21 @@ export interface ManagedClustersStopOptionalParams extends coreClient.OperationO // @public export interface ManagedClusterStorageProfile { + blobCSIDriver?: ManagedClusterStorageProfileBlobCSIDriver; diskCSIDriver?: ManagedClusterStorageProfileDiskCSIDriver; fileCSIDriver?: ManagedClusterStorageProfileFileCSIDriver; snapshotController?: ManagedClusterStorageProfileSnapshotController; } +// @public +export interface ManagedClusterStorageProfileBlobCSIDriver { + enabled?: boolean; +} + // @public export interface ManagedClusterStorageProfileDiskCSIDriver { enabled?: boolean; + version?: string; } // @public @@ -1417,21 +1936,55 @@ export interface ManagedClusterWindowsProfile { licenseType?: LicenseType; } +// @public +export interface ManagedClusterWorkloadAutoScalerProfile { + keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + // (undocumented) + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; +} + +// @public +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + enabled: boolean; +} + +// @public (undocumented) +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + controlledValues: ControlledValues; + enabled: boolean; + updateMode: UpdateMode; +} + // @public (undocumented) export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly clientId?: string; readonly principalId?: string; } +// @public +export type Mode = string; + // @public export type NetworkMode = string; // @public export type NetworkPlugin = string; +// @public +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 interface OperationListResult { readonly value?: OperationValue[]; @@ -1812,6 +2365,106 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface TrustedAccessRole { + readonly name?: string; + readonly rules?: TrustedAccessRoleRule[]; + readonly sourceResourceType?: string; +} + +// @public +export interface TrustedAccessRoleBinding extends Resource { + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + roles: string[]; + sourceResourceId: string; +} + +// @public +export interface TrustedAccessRoleBindingListResult { + readonly nextLink?: string; + value?: TrustedAccessRoleBinding[]; +} + +// @public +export type TrustedAccessRoleBindingProvisioningState = string; + +// @public +export interface TrustedAccessRoleBindings { + createOrUpdate(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, trustedAccessRoleBinding: TrustedAccessRoleBinding, options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: TrustedAccessRoleBindingsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsCreateOrUpdateResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface TrustedAccessRoleBindingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsGetResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleBindingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleListResult { + readonly nextLink?: string; + readonly value?: TrustedAccessRole[]; +} + +// @public +export interface TrustedAccessRoleRule { + readonly apiGroups?: string[]; + readonly nonResourceURLs?: string[]; + readonly resourceNames?: string[]; + readonly resources?: string[]; + readonly verbs?: string[]; +} + +// @public +export interface TrustedAccessRoles { + list(location: string, options?: TrustedAccessRolesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRolesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + +// @public +export interface TrustedAccessRolesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + +// @public +export type UpdateMode = string; + // @public export type UpgradeChannel = string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 298c9e25a85f..9d33dbce0b80 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -8,11 +8,6 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, @@ -22,7 +17,12 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, - SnapshotsImpl + SnapshotsImpl, + ManagedClusterSnapshotsImpl, + TrustedAccessRolesImpl, + TrustedAccessRoleBindingsImpl, + FleetsImpl, + FleetMembersImpl } from "./operations"; import { Operations, @@ -32,13 +32,17 @@ import { PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, - Snapshots + Snapshots, + ManagedClusterSnapshots, + TrustedAccessRoles, + TrustedAccessRoleBindings, + Fleets, + FleetMembers } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; export class ContainerServiceClient extends coreClient.ServiceClient { $host: string; - apiVersion: string; subscriptionId: string; /** @@ -68,7 +72,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/17.1.0`; + const packageDetails = `azsdk-js-arm-containerservice/18.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -88,41 +92,33 @@ export class ContainerServiceClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-07-01"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); @@ -133,35 +129,11 @@ export class ContainerServiceClient extends coreClient.ServiceClient { this ); this.snapshots = new SnapshotsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - } - }; - this.pipeline.addPolicy(apiVersionPolicy); + this.managedClusterSnapshots = new ManagedClusterSnapshotsImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.fleets = new FleetsImpl(this); + this.fleetMembers = new FleetMembersImpl(this); } operations: Operations; @@ -172,4 +144,9 @@ export class ContainerServiceClient extends coreClient.ServiceClient { privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; snapshots: Snapshots; + managedClusterSnapshots: ManagedClusterSnapshots; + trustedAccessRoles: TrustedAccessRoles; + trustedAccessRoleBindings: TrustedAccessRoleBindings; + fleets: Fleets; + fleetMembers: FleetMembers; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 085f1f6ac9bd..b7be739fcc07 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -164,6 +164,12 @@ 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 { /** 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. */ @@ -178,6 +184,8 @@ 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} */ @@ -186,7 +194,7 @@ export interface ManagedClusterAgentPoolProfileProperties { 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; @@ -200,10 +208,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; @@ -225,6 +233,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 deploys a daemonset and host services to sync custom certificate authorities from a user-provided config map 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'. */ @@ -255,8 +265,12 @@ export interface ManagedClusterAgentPoolProfileProperties { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + 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; + /** The Windows agent pool's specific profile. */ + windowsProfile?: AgentPoolWindowsProfile; } /** Settings for upgrading an agentpool */ @@ -363,10 +377,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; } /** Profile for Linux VMs in the container service cluster. */ @@ -508,10 +522,23 @@ export interface ManagedClusterPodIdentityException { podLabels: { [propertyName: string]: string }; } +/** The OIDC issuer profile of the Managed Cluster. */ +export interface ManagedClusterOidcIssuerProfile { + /** + * The OIDC issuer url of the Managed Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issuerURL?: string; + /** Whether the OIDC issuer is enabled. */ + enabled?: boolean; +} + /** Profile of network configuration. */ export interface ContainerServiceNetworkProfile { /** Network plugin used for building the Kubernetes network. */ networkPlugin?: NetworkPlugin; + /** Network plugin mode used for building the Kubernetes network. */ + networkPluginMode?: NetworkPluginMode; /** Network policy used for building the Kubernetes network. */ networkPolicy?: NetworkPolicy; /** This cannot be specified if networkPlugin is anything other than 'azure'. */ @@ -538,6 +565,8 @@ export interface ContainerServiceNetworkProfile { 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[]; + /** 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; } /** Profile of the managed cluster load balancer. */ @@ -556,6 +585,8 @@ export interface ManagedClusterLoadBalancerProfile { idleTimeoutInMinutes?: number; /** Enable multiple standard load balancers per AKS cluster or not. */ enableMultipleStandardLoadBalancers?: boolean; + /** The type of the managed inbound Load Balancer BackendPool. */ + backendPoolType?: BackendPoolType; } /** Desired managed outbound IPs for the cluster load balancer. */ @@ -600,6 +631,28 @@ export interface ManagedClusterManagedOutboundIPProfile { count?: number; } +/** 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; +} + /** For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). */ export interface ManagedClusterAADProfile { /** Whether to enable managed AAD. */ @@ -674,6 +727,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 */ @@ -703,6 +760,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; } @@ -713,6 +775,12 @@ export interface ManagedClusterSecurityProfile { defender?: ManagedClusterSecurityProfileDefender; /** Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. */ azureKeyVaultKms?: AzureKeyVaultKms; + /** [Workload Identity](https://azure.github.io/azure-workload-identity/docs/) settings for the security profile. */ + workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; + /** ImageCleaner settings for the security profile. */ + imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + /** [Node Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) settings for the security profile. */ + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; } /** Microsoft Defender settings for the security profile. */ @@ -741,6 +809,26 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +/** Workload Identity settings for the security profile. */ +export interface ManagedClusterSecurityProfileWorkloadIdentity { + /** Whether to enable Workload Identity */ + enabled?: boolean; +} + +/** ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. */ +export interface ManagedClusterSecurityProfileImageCleaner { + /** Whether to enable ImageCleaner on AKS cluster. */ + enabled?: boolean; + /** ImageCleaner scanning interval. */ + intervalHours?: number; +} + +/** 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. */ @@ -749,12 +837,16 @@ export interface ManagedClusterStorageProfile { fileCSIDriver?: ManagedClusterStorageProfileFileCSIDriver; /** Snapshot Controller settings for the storage profile. */ snapshotController?: ManagedClusterStorageProfileSnapshotController; + /** AzureBlob CSI Driver settings for the storage profile. */ + blobCSIDriver?: ManagedClusterStorageProfileBlobCSIDriver; } /** AzureDisk CSI Driver settings for the storage profile. */ 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. */ @@ -769,6 +861,85 @@ export interface ManagedClusterStorageProfileSnapshotController { enabled?: boolean; } +/** AzureBlob CSI Driver settings for the storage profile. */ +export interface ManagedClusterStorageProfileBlobCSIDriver { + /** Whether to enable AzureBlob CSI Driver. The default value is false. */ + enabled?: boolean; +} + +/** Ingress profile for the container service cluster. */ +export interface ManagedClusterIngressProfile { + /** Web App Routing settings for the ingress profile. */ + webAppRouting?: ManagedClusterIngressProfileWebAppRouting; +} + +/** Web App Routing settings for the ingress profile. */ +export interface ManagedClusterIngressProfileWebAppRouting { + /** Whether to enable Web App Routing. */ + enabled?: boolean; + /** Resource ID of the DNS Zone to be associated with the web app. Used only when Web App Routing is enabled. */ + dnsZoneResourceId?: string; +} + +/** Workload Auto-scaler profile for the container service cluster. */ +export interface ManagedClusterWorkloadAutoScalerProfile { + /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ + keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; +} + +/** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + /** Whether to enable KEDA. */ + enabled: boolean; +} + +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + /** Whether to enable VPA. Default value is false. */ + enabled: boolean; + /** Controls which resource value autoscaler will change. Default value is RequestsAndLimits. */ + controlledValues: ControlledValues; + /** Each update mode level is a superset of the lower levels. Off; +} + +/** Properties of a Fleet that can be patched. */ +export interface FleetPatch { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The response from the List Fleets operation. */ +export interface FleetListResult { + /** The list of Fleets. */ + value?: Fleet[]; + /** + * The URL to get the next page of Fleets. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The response from the List FleetMembers operation. */ +export interface FleetMembersListResult { + /** The list of members in a given Fleet. */ + value?: FleetMember[]; + /** + * The URL to get the next page of Fleet members. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The list credential result response. */ +export interface FleetCredentialResults { + /** + * Base64-encoded Kubernetes configuration file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kubeconfigs?: FleetCredentialResult[]; +} + +/** The credential result response. */ +export interface FleetCredentialResult { + /** + * The name of the credential. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Base64-encoded Kubernetes configuration file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Uint8Array; +} + /** Profile for the container service master. */ export interface ContainerServiceMasterProfile { /** Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. */ @@ -1213,6 +1613,28 @@ export interface TrackedResource extends Resource { location: string; } +/** Defines binding between a resource and role */ +export interface TrustedAccessRoleBinding extends Resource { + /** + * The current provisioning state of trusted access role binding. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + /** The ARM resource ID of source resource that trusted access is configured for. */ + sourceResourceId: string; + /** A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. */ + roles: string[]; +} + +/** The resource model definition for an Azure Resource Manager resource with an etag. */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; +} + /** See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned maintenance. */ export interface MaintenanceConfiguration extends SubResource { /** @@ -1240,6 +1662,8 @@ 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} */ @@ -1248,7 +1672,7 @@ export interface AgentPool extends SubResource { 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; @@ -1262,10 +1686,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; @@ -1287,6 +1711,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 deploys a daemonset and host services to sync custom certificate authorities from a user-provided config map 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'. */ @@ -1317,8 +1743,12 @@ export interface AgentPool extends SubResource { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + 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; + /** The Windows agent pool's specific profile. */ + windowsProfile?: AgentPoolWindowsProfile; } /** Managed cluster. */ @@ -1339,15 +1769,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; @@ -1382,12 +1814,16 @@ export interface ManagedCluster extends TrackedResource { addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile }; /** See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration. */ podIdentityProfile?: ManagedClusterPodIdentityProfile; + /** The OIDC issuer profile of the Managed Cluster. */ + oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; /** The name of the resource group containing agent pool nodes. */ nodeResourceGroup?: string; /** Whether to enable Kubernetes Role-Based Access Control. */ enableRbac?: boolean; /** (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. */ enablePodSecurityPolicy?: boolean; + /** The default value is false. It can be enabled/disabled on creation and updation 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. */ @@ -1412,8 +1848,16 @@ export interface ManagedCluster extends TrackedResource { securityProfile?: ManagedClusterSecurityProfile; /** Storage profile for the managed cluster. */ storageProfile?: ManagedClusterStorageProfile; + /** Ingress profile for the managed cluster. */ + ingressProfile?: ManagedClusterIngressProfile; /** Allow or deny public network access for AKS */ publicNetworkAccess?: PublicNetworkAccess; + /** Workload Auto-scaler profile for the container service cluster. */ + workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; + /** Prometheus addon profile for the container service cluster */ + azureMonitorProfile?: ManagedClusterAzureMonitorProfile; + /** The guardrails profile holds all the guardrails information for a given cluster */ + guardrailsProfile?: GuardrailsProfile; } /** Managed cluster Access Profile. */ @@ -1444,7 +1888,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; @@ -1460,6 +1904,46 @@ 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; +} + +/** The Fleet resource which contains multiple Kubernetes clusters as its members. */ +export interface Fleet extends TrackedResource { + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** The FleetHubProfile configures the Fleet's hub. */ + hubProfile?: FleetHubProfile; + /** + * The provisioning state of the last accepted operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: FleetProvisioningState; +} + +/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */ +export interface FleetMember extends AzureEntityResource { + /** The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. */ + clusterResourceId?: string; + /** + * The provisioning state of the last accepted operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: FleetMemberProvisioningState; +} + /** Defines headers for AgentPools_upgradeNodeImageVersion operation. */ export interface AgentPoolsUpgradeNodeImageVersionHeaders { /** URL to query for status of the operation. */ @@ -1610,6 +2094,8 @@ export enum KnownOssku { Ubuntu = "Ubuntu", /** CBLMariner */ CBLMariner = "CBLMariner", + /** Mariner */ + Mariner = "Mariner", /** Windows2019 */ Windows2019 = "Windows2019", /** Windows2022 */ @@ -1623,6 +2109,7 @@ export enum KnownOssku { * ### Known values supported by the service * **Ubuntu** \ * **CBLMariner** \ + * **Mariner** \ * **Windows2019** \ * **Windows2022** */ @@ -1793,7 +2280,7 @@ export enum KnownNetworkPlugin { 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" } @@ -1804,10 +2291,25 @@ 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 { + /** 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" +} + +/** + * Defines values for NetworkPluginMode. \ + * {@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**: 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 { /** 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. */ @@ -1886,6 +2388,24 @@ export enum KnownLoadBalancerSku { */ export type LoadBalancerSku = string; +/** Known values of {@link BackendPoolType} that the service accepts. */ +export enum KnownBackendPoolType { + /** The type of the managed inbound Load Balancer BackendPool. https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. */ + NodeIPConfiguration = "NodeIPConfiguration", + /** The type of the managed inbound Load Balancer BackendPool. https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. */ + NodeIP = "NodeIP" +} + +/** + * Defines values for BackendPoolType. \ + * {@link KnownBackendPoolType} can be used interchangeably with BackendPoolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NodeIPConfiguration**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. \ + * **NodeIP**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. + */ +export type BackendPoolType = string; + /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { /** IPv4 */ @@ -1904,6 +2424,42 @@ export enum KnownIpFamily { */ export type IpFamily = 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. */ @@ -1975,10 +2531,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 */ - Disabled = "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" } /** @@ -1986,11 +2544,75 @@ 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 ControlledValues} that the service accepts. */ +export enum KnownControlledValues { + /** Autoscaler will control resource requests and limits. */ + RequestsAndLimits = "RequestsAndLimits", + /** Autoscaler will control resource requests only. */ + RequestsOnly = "RequestsOnly" +} + +/** + * Defines values for ControlledValues. \ + * {@link KnownControlledValues} can be used interchangeably with ControlledValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RequestsAndLimits**: Autoscaler will control resource requests and limits. \ + * **RequestsOnly**: Autoscaler will control resource requests only. + */ +export type ControlledValues = string; + +/** Known values of {@link UpdateMode} that the service accepts. */ +export enum KnownUpdateMode { + /** Autoscaler never changes pod resources but provides recommendations. */ + Off = "Off", + /** Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime of the pod. */ + Initial = "Initial", + /** Autoscaler assigns resources on pod creation and updates pods that need further scaling during their lifetime by deleting and recreating. */ + Recreate = "Recreate", + /** Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the future, it may take advantage of restart-free mechanisms once they are available. */ + Auto = "Auto" +} + +/** + * Defines values for UpdateMode. \ + * {@link KnownUpdateMode} can be used interchangeably with UpdateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off**: Autoscaler never changes pod resources but provides recommendations. \ + * **Initial**: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime of the pod. \ + * **Recreate**: Autoscaler assigns resources on pod creation and updates pods that need further scaling during their lifetime by deleting and recreating. \ + * **Auto**: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the future, it may take advantage of restart-free mechanisms once they are available. + */ +export type UpdateMode = 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 CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -2117,7 +2739,9 @@ export type ConnectionStatus = string; /** Known values of {@link SnapshotType} that the service accepts. */ export enum KnownSnapshotType { /** The snapshot is a snapshot of a node pool. */ - NodePool = "NodePool" + NodePool = "NodePool", + /** The snapshot is a snapshot of a managed cluster. */ + ManagedCluster = "ManagedCluster" } /** @@ -2125,10 +2749,95 @@ 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; +/** Known values of {@link TrustedAccessRoleBindingProvisioningState} that the service accepts. */ +export enum KnownTrustedAccessRoleBindingProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for TrustedAccessRoleBindingProvisioningState. \ + * {@link KnownTrustedAccessRoleBindingProvisioningState} can be used interchangeably with TrustedAccessRoleBindingProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** + */ +export type TrustedAccessRoleBindingProvisioningState = string; + +/** Known values of {@link FleetProvisioningState} that the service accepts. */ +export enum KnownFleetProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Updating */ + Updating = "Updating" +} + +/** + * Defines values for FleetProvisioningState. \ + * {@link KnownFleetProvisioningState} can be used interchangeably with FleetProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Creating** \ + * **Deleting** \ + * **Updating** + */ +export type FleetProvisioningState = string; + +/** Known values of {@link FleetMemberProvisioningState} that the service accepts. */ +export enum KnownFleetMemberProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Joining */ + Joining = "Joining", + /** Leaving */ + Leaving = "Leaving", + /** Updating */ + Updating = "Updating" +} + +/** + * Defines values for FleetMemberProvisioningState. \ + * {@link KnownFleetMemberProvisioningState} can be used interchangeably with FleetMemberProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Joining** \ + * **Leaving** \ + * **Updating** + */ +export type FleetMemberProvisioningState = string; + /** Known values of {@link ContainerServiceVMSizeTypes} that the service accepts. */ export enum KnownContainerServiceVMSizeTypes { /** StandardA1 */ @@ -2796,6 +3505,8 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + /** 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. */ @@ -2820,6 +3531,10 @@ export interface ManagedClustersResetAADProfileOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedClustersAbortLatestOperationOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface ManagedClustersRotateClusterCertificatesOptionalParams extends coreClient.OperationOptions { @@ -2829,6 +3544,15 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams + 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; +} + /** Optional parameters. */ export interface ManagedClustersStopOptionalParams extends coreClient.OperationOptions { @@ -2926,6 +3650,10 @@ export interface MaintenanceConfigurationsListByManagedClusterNextOptionalParams /** Contains response data for the listByManagedClusterNext operation. */ export type MaintenanceConfigurationsListByManagedClusterNextResponse = MaintenanceConfigurationListResult; +/** Optional parameters. */ +export interface AgentPoolsAbortLatestOperationOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface AgentPoolsListOptionalParams extends coreClient.OperationOptions {} @@ -2955,6 +3683,8 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + /** 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. */ @@ -3088,13 +3818,237 @@ 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 {} + +/** Contains response data for the list operation. */ +export type TrustedAccessRoleBindingsListResponse = TrustedAccessRoleBindingListResult; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TrustedAccessRoleBindingsGetResponse = TrustedAccessRoleBinding; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type TrustedAccessRoleBindingsCreateOrUpdateResponse = TrustedAccessRoleBinding; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; + +/** Optional parameters. */ +export interface FleetsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new resource to be created and prevent updating an existing resource. Other values will result in a 412 Pre-condition Failed response. */ + ifNoneMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type FleetsCreateOrUpdateResponse = Fleet; + +/** Optional parameters. */ +export interface FleetsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** The properties of a Fleet to update. */ + parameters?: FleetPatch; +} + +/** Contains response data for the update operation. */ +export type FleetsUpdateResponse = Fleet; + +/** Optional parameters. */ +export interface FleetsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FleetsGetResponse = Fleet; + +/** Optional parameters. */ +export interface FleetsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface FleetsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type FleetsListByResourceGroupResponse = FleetListResult; + +/** Optional parameters. */ +export interface FleetsListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FleetsListResponse = FleetListResult; + +/** Optional parameters. */ +export interface FleetsListCredentialsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCredentials operation. */ +export type FleetsListCredentialsResponse = FleetCredentialResults; + +/** Optional parameters. */ +export interface FleetsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type FleetsListByResourceGroupNextResponse = FleetListResult; + +/** Optional parameters. */ +export interface FleetsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FleetsListNextResponse = FleetListResult; + +/** Optional parameters. */ +export interface FleetMembersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new resource to be created and prevent updating an existing resource. Other values will result in a 412 Pre-condition Failed response. */ + ifNoneMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type FleetMembersCreateOrUpdateResponse = FleetMember; + +/** Optional parameters. */ +export interface FleetMembersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FleetMembersGetResponse = FleetMember; + +/** Optional parameters. */ +export interface FleetMembersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface FleetMembersListByFleetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFleet operation. */ +export type FleetMembersListByFleetResponse = FleetMembersListResult; + +/** Optional parameters. */ +export interface FleetMembersListByFleetNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFleetNext operation. */ +export type FleetMembersListByFleetNextResponse = FleetMembersListResult; + /** Optional parameters. */ export interface ContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; - /** Api Version */ - apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 103159a89c1e..9048d5ea22f0 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -352,6 +352,21 @@ 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", @@ -397,6 +412,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String" } }, + messageOfTheDay: { + serializedName: "messageOfTheDay", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -522,6 +543,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Boolean" } }, + enableCustomCATrust: { + serializedName: "enableCustomCATrust", + type: { + name: "Boolean" + } + }, nodePublicIPPrefixID: { serializedName: "nodePublicIPPrefixID", type: { @@ -625,11 +652,24 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "hostGroupID", type: { name: "String" } + }, + windowsProfile: { + serializedName: "windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile" + } } } } @@ -944,15 +984,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" } } } @@ -1367,6 +1407,28 @@ export const ManagedClusterPodIdentityException: coreClient.CompositeMapper = { } }; +export const ManagedClusterOidcIssuerProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterOidcIssuerProfile", + modelProperties: { + issuerURL: { + serializedName: "issuerURL", + readOnly: true, + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1379,6 +1441,12 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { name: "String" } }, + networkPluginMode: { + serializedName: "networkPluginMode", + type: { + name: "String" + } + }, networkPolicy: { serializedName: "networkPolicy", type: { @@ -1498,6 +1566,13 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { } } } + }, + kubeProxyConfig: { + serializedName: "kubeProxyConfig", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig" + } } } } @@ -1568,6 +1643,13 @@ export const ManagedClusterLoadBalancerProfile: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + backendPoolType: { + defaultValue: "NodeIPConfiguration", + serializedName: "backendPoolType", + type: { + name: "String" + } } } } @@ -1720,6 +1802,67 @@ export const ManagedClusterManagedOutboundIPProfile: coreClient.CompositeMapper } }; +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 ManagedClusterAADProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1941,6 +2084,18 @@ export const ManagedClusterAPIServerAccessProfile: coreClient.CompositeMapper = type: { name: "Boolean" } + }, + enableVnetIntegration: { + serializedName: "enableVnetIntegration", + type: { + name: "Boolean" + } + }, + subnetId: { + serializedName: "subnetId", + type: { + name: "String" + } } } } @@ -2025,6 +2180,18 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { } } }, + effectiveNoProxy: { + serializedName: "effectiveNoProxy", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, trustedCa: { serializedName: "trustedCa", type: { @@ -2053,6 +2220,27 @@ export const ManagedClusterSecurityProfile: coreClient.CompositeMapper = { name: "Composite", className: "AzureKeyVaultKms" } + }, + workloadIdentity: { + serializedName: "workloadIdentity", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileWorkloadIdentity" + } + }, + imageCleaner: { + serializedName: "imageCleaner", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageCleaner" + } + }, + nodeRestriction: { + serializedName: "nodeRestriction", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileNodeRestriction" + } } } } @@ -2129,6 +2317,57 @@ export const AzureKeyVaultKms: coreClient.CompositeMapper = { } }; +export const ManagedClusterSecurityProfileWorkloadIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileWorkloadIdentity", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedClusterSecurityProfileImageCleaner: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageCleaner", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + intervalHours: { + serializedName: "intervalHours", + type: { + name: "Number" + } + } + } + } +}; + +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", @@ -2154,6 +2393,13 @@ export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { name: "Composite", className: "ManagedClusterStorageProfileSnapshotController" } + }, + blobCSIDriver: { + serializedName: "blobCSIDriver", + type: { + name: "Composite", + className: "ManagedClusterStorageProfileBlobCSIDriver" + } } } } @@ -2169,6 +2415,12 @@ export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapp type: { name: "Boolean" } + }, + version: { + serializedName: "version", + type: { + name: "String" + } } } } @@ -2204,70 +2456,301 @@ export const ManagedClusterStorageProfileSnapshotController: coreClient.Composit } }; -export const Resource: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfileBlobCSIDriver: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ManagedClusterStorageProfileBlobCSIDriver", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } - }, - systemData: { - serializedName: "systemData", + } + } + } +}; + +export const ManagedClusterIngressProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterIngressProfile", + modelProperties: { + webAppRouting: { + serializedName: "webAppRouting", type: { name: "Composite", - className: "SystemData" + className: "ManagedClusterIngressProfileWebAppRouting" } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "ManagedClusterIngressProfileWebAppRouting", modelProperties: { - createdBy: { - serializedName: "createdBy", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - createdByType: { - serializedName: "createdByType", + dnsZoneResourceId: { + serializedName: "dnsZoneResourceId", type: { name: "String" } - }, - createdAt: { - serializedName: "createdAt", + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile", + modelProperties: { + keda: { + serializedName: "keda", type: { - name: "DateTime" + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + verticalPodAutoscaler: { + serializedName: "verticalPodAutoscaler", type: { - name: "String" + name: "Composite", + className: + "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" + } + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfileKeda: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + controlledValues: { + defaultValue: "RequestsAndLimits", + serializedName: "controlledValues", + required: true, + type: { + name: "String" + } + }, + updateMode: { + defaultValue: "Off", + serializedName: "updateMode", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfile", + modelProperties: { + metrics: { + serializedName: "metrics", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileMetrics" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfileMetrics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + kubeStateMetrics: { + serializedName: "kubeStateMetrics", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileKubeStateMetrics" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfileKubeStateMetrics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileKubeStateMetrics", + modelProperties: { + metricLabelsAllowlist: { + serializedName: "metricLabelsAllowlist", + type: { + name: "String" + } + }, + metricAnnotationsAllowList: { + serializedName: "metricAnnotationsAllowList", + type: { + name: "String" + } + } + } + } +}; + +export const GuardrailsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsProfile", + modelProperties: { + systemExcludedNamespaces: { + serializedName: "systemExcludedNamespaces", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + version: { + serializedName: "version", + required: true, + type: { + name: "String" + } + }, + level: { + serializedName: "level", + required: true, + type: { + name: "String" + } + }, + excludedNamespaces: { + serializedName: "excludedNamespaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" } }, lastModifiedByType: { @@ -2959,27 +3442,576 @@ export const RunCommandResult: coreClient.CompositeMapper = { serializedName: "properties.reason", readOnly: true, type: { - name: "String" + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + +export const EndpointDependency: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const EndpointDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + protocol: { + serializedName: "protocol", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const SnapshotListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Snapshot" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +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 FleetHubProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetHubProfile", + modelProperties: { + dnsPrefix: { + serializedName: "dnsPrefix", + type: { + name: "String" + } + }, + fqdn: { + serializedName: "fqdn", + readOnly: true, + type: { + name: "String" + } + }, + kubernetesVersion: { + serializedName: "kubernetesVersion", + readOnly: true, + 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 FleetPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { +export const FleetListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundEnvironmentEndpointCollection", + className: "FleetListResult", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OutboundEnvironmentEndpoint" + className: "Fleet" } } } @@ -2995,52 +4027,48 @@ export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = } }; -export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { +export const FleetMembersListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundEnvironmentEndpoint", + className: "FleetMembersListResult", modelProperties: { - category: { - serializedName: "category", - type: { - name: "String" - } - }, - endpoints: { - serializedName: "endpoints", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EndpointDependency" + className: "FleetMember" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const EndpointDependency: coreClient.CompositeMapper = { +export const FleetCredentialResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EndpointDependency", + className: "FleetCredentialResults", modelProperties: { - domainName: { - serializedName: "domainName", - type: { - name: "String" - } - }, - endpointDetails: { - serializedName: "endpointDetails", + kubeconfigs: { + serializedName: "kubeconfigs", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "EndpointDetail" + className: "FleetCredentialResult" } } } @@ -3049,61 +4077,23 @@ export const EndpointDependency: coreClient.CompositeMapper = { } }; -export const EndpointDetail: coreClient.CompositeMapper = { +export const FleetCredentialResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EndpointDetail", + className: "FleetCredentialResult", modelProperties: { - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } - }, - port: { - serializedName: "port", - type: { - name: "Number" - } - }, - protocol: { - serializedName: "protocol", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", - type: { - name: "String" - } - } - } - } -}; - -export const SnapshotListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SnapshotListResult", - modelProperties: { value: { serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Snapshot" - } - } - } - }, - nextLink: { - serializedName: "nextLink", readOnly: true, type: { - name: "String" + name: "ByteArray" } } } @@ -3270,6 +4260,59 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; +export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleBinding", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + sourceResourceId: { + serializedName: "properties.sourceResourceId", + required: true, + type: { + name: "String" + } + }, + roles: { + serializedName: "properties.roles", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AzureEntityResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3357,6 +4400,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String" } }, + messageOfTheDay: { + serializedName: "properties.messageOfTheDay", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -3482,6 +4531,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Boolean" } }, + enableCustomCATrust: { + serializedName: "properties.enableCustomCATrust", + type: { + name: "Boolean" + } + }, nodePublicIPPrefixID: { serializedName: "properties.nodePublicIPPrefixID", type: { @@ -3585,11 +4640,24 @@ export const AgentPool: coreClient.CompositeMapper = { className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "properties.capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "properties.hostGroupID", type: { name: "String" } + }, + windowsProfile: { + serializedName: "properties.windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile" + } } } } @@ -3636,6 +4704,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "PowerState" } }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData" + } + }, maxAgentPools: { serializedName: "properties.maxAgentPools", readOnly: true, @@ -3738,6 +4813,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterPodIdentityProfile" } }, + oidcIssuerProfile: { + serializedName: "properties.oidcIssuerProfile", + type: { + name: "Composite", + className: "ManagedClusterOidcIssuerProfile" + } + }, nodeResourceGroup: { serializedName: "properties.nodeResourceGroup", type: { @@ -3756,6 +4838,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean" } }, + enableNamespaceResources: { + serializedName: "properties.enableNamespaceResources", + type: { + name: "Boolean" + } + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -3845,11 +4933,39 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterStorageProfile" } }, + ingressProfile: { + serializedName: "properties.ingressProfile", + type: { + name: "Composite", + className: "ManagedClusterIngressProfile" + } + }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { name: "String" } + }, + workloadAutoScalerProfile: { + serializedName: "properties.workloadAutoScalerProfile", + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile" + } + }, + azureMonitorProfile: { + serializedName: "properties.azureMonitorProfile", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfile" + } + }, + guardrailsProfile: { + serializedName: "properties.guardrailsProfile", + type: { + name: "Composite", + className: "GuardrailsProfile" + } } } } @@ -3938,6 +5054,91 @@ 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 Fleet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Fleet", + modelProperties: { + ...TrackedResource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + hubProfile: { + serializedName: "properties.hubProfile", + type: { + name: "Composite", + className: "FleetHubProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FleetMember: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetMember", + modelProperties: { + ...AzureEntityResource.type.modelProperties, + clusterResourceId: { + serializedName: "properties.clusterResourceId", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const AgentPoolsUpgradeNodeImageVersionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index aab620d555dd..970edd2769d8 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -21,7 +21,12 @@ import { AgentPool as AgentPoolMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, - Snapshot as SnapshotMapper + Snapshot as SnapshotMapper, + ManagedClusterSnapshot as ManagedClusterSnapshotMapper, + TrustedAccessRoleBinding as TrustedAccessRoleBindingMapper, + Fleet as FleetMapper, + FleetPatch as FleetPatchMapper, + FleetMember as FleetMemberMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -51,7 +56,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-07-01", + defaultValue: "2022-08-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -184,6 +189,16 @@ export const parameters1: OperationParameter = { 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 @@ -279,3 +294,107 @@ export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: SnapshotMapper }; + +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedClusterSnapshotMapper +}; + +export const trustedAccessRoleBindingName: OperationURLParameter = { + parameterPath: "trustedAccessRoleBindingName", + mapper: { + constraints: { + MaxLength: 36, + MinLength: 1 + }, + serializedName: "trustedAccessRoleBindingName", + required: true, + type: { + name: "String" + } + } +}; + +export const trustedAccessRoleBinding: OperationParameter = { + parameterPath: "trustedAccessRoleBinding", + mapper: TrustedAccessRoleBindingMapper +}; + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: FleetMapper +}; + +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-07-02-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const fleetName: OperationURLParameter = { + parameterPath: "fleetName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"), + MaxLength: 63, + MinLength: 1 + }, + serializedName: "fleetName", + required: true, + type: { + name: "String" + } + } +}; + +export const 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 parameters11: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: FleetPatchMapper +}; + +export const parameters12: OperationParameter = { + parameterPath: "parameters", + mapper: FleetMemberMapper +}; + +export const fleetMemberName: OperationURLParameter = { + parameterPath: "fleetMemberName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"), + MaxLength: 50, + MinLength: 1 + }, + serializedName: "fleetMemberName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index 50127341d737..065cad18af77 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -18,6 +18,7 @@ import { AgentPool, AgentPoolsListNextOptionalParams, AgentPoolsListOptionalParams, + AgentPoolsAbortLatestOperationOptionalParams, AgentPoolsListResponse, AgentPoolsGetOptionalParams, AgentPoolsGetResponse, @@ -104,6 +105,28 @@ export class AgentPoolsImpl implements AgentPools { } } + /** + * Aborting last running operation on agent pool. We return a 204 no content code here to indicate that + * the operation has been accepted and an abort will be attempted but is not guaranteed to complete + * successfully. Please look up the provisioning state of the agent pool to keep track of whether it + * changes to Canceled. A canceled provisioning state indicates that the abort was successful + * @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. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: AgentPoolsAbortLatestOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, options }, + abortLatestOperationOperationSpec + ); + } + /** * Gets a list of agent pools in the specified managed cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -475,6 +498,27 @@ export class AgentPoolsImpl implements AgentPools { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const abortLatestOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", @@ -567,7 +611,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerservice/arm-containerservice/src/operations/fleetMembers.ts b/sdk/containerservice/arm-containerservice/src/operations/fleetMembers.ts new file mode 100644 index 000000000000..4e3db5bd5583 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/fleetMembers.ts @@ -0,0 +1,486 @@ +/* + * 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 { FleetMembers } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + FleetMember, + FleetMembersListByFleetNextOptionalParams, + FleetMembersListByFleetOptionalParams, + FleetMembersCreateOrUpdateOptionalParams, + FleetMembersCreateOrUpdateResponse, + FleetMembersGetOptionalParams, + FleetMembersGetResponse, + FleetMembersDeleteOptionalParams, + FleetMembersListByFleetResponse, + FleetMembersListByFleetNextResponse +} from "../models"; + +/// +/** Class containing FleetMembers operations. */ +export class FleetMembersImpl implements FleetMembers { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class FleetMembers class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Lists the members of a fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + public listByFleet( + resourceGroupName: string, + fleetName: string, + options?: FleetMembersListByFleetOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByFleetPagingAll( + resourceGroupName, + fleetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByFleetPagingPage( + resourceGroupName, + fleetName, + options + ); + } + }; + } + + private async *listByFleetPagingPage( + resourceGroupName: string, + fleetName: string, + options?: FleetMembersListByFleetOptionalParams + ): AsyncIterableIterator { + let result = await this._listByFleet(resourceGroupName, fleetName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByFleetNext( + resourceGroupName, + fleetName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByFleetPagingAll( + resourceGroupName: string, + fleetName: string, + options?: FleetMembersListByFleetOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByFleetPagingPage( + resourceGroupName, + fleetName, + options + )) { + yield* page; + } + } + + /** + * A member contains a reference to an existing Kubernetes cluster. Creating a member makes the + * referenced cluster join the Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param parameters The Fleet member to create or update. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + parameters: FleetMember, + options?: FleetMembersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FleetMembersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, fleetName, fleetMemberName, parameters, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * A member contains a reference to an existing Kubernetes cluster. Creating a member makes the + * referenced cluster join the Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param parameters The Fleet member to create or update. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + parameters: FleetMember, + options?: FleetMembersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + fleetName, + fleetMemberName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a Fleet member. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, fleetMemberName, options }, + getOperationSpec + ); + } + + /** + * Deleting a Fleet member results in the member cluster leaving fleet. The Member azure resource is + * deleted upon success. The underlying cluster is not deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, fleetName, fleetMemberName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deleting a Fleet member results in the member cluster leaving fleet. The Member azure resource is + * deleted upon success. The underlying cluster is not deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + fleetName, + fleetMemberName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the members of a fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + private _listByFleet( + resourceGroupName: string, + fleetName: string, + options?: FleetMembersListByFleetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, options }, + listByFleetOperationSpec + ); + } + + /** + * ListByFleetNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param nextLink The nextLink from the previous successful call to the ListByFleet method. + * @param options The options parameters. + */ + private _listByFleetNext( + resourceGroupName: string, + fleetName: string, + nextLink: string, + options?: FleetMembersListByFleetNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, nextLink, options }, + listByFleetNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FleetMember + }, + 201: { + bodyMapper: Mappers.FleetMember + }, + 202: { + bodyMapper: Mappers.FleetMember + }, + 204: { + bodyMapper: Mappers.FleetMember + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.fleetMemberName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetMember + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.fleetMemberName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName, + Parameters.fleetMemberName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch], + serializer +}; +const listByFleetOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetMembersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByFleetNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetMembersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.fleetName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/fleets.ts b/sdk/containerservice/arm-containerservice/src/operations/fleets.ts new file mode 100644 index 000000000000..cc47018f4110 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/fleets.ts @@ -0,0 +1,643 @@ +/* + * 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 { Fleets } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Fleet, + FleetsListByResourceGroupNextOptionalParams, + FleetsListByResourceGroupOptionalParams, + FleetsListNextOptionalParams, + FleetsListOptionalParams, + FleetsCreateOrUpdateOptionalParams, + FleetsCreateOrUpdateResponse, + FleetsUpdateOptionalParams, + FleetsUpdateResponse, + FleetsGetOptionalParams, + FleetsGetResponse, + FleetsDeleteOptionalParams, + FleetsListByResourceGroupResponse, + FleetsListResponse, + FleetsListCredentialsOptionalParams, + FleetsListCredentialsResponse, + FleetsListByResourceGroupNextResponse, + FleetsListNextResponse +} from "../models"; + +/// +/** Class containing Fleets operations. */ +export class FleetsImpl implements Fleets { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class Fleets class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Lists fleets in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: FleetsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: FleetsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: FleetsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists fleets in the specified subscription. + * @param options The options parameters. + */ + public list( + options?: FleetsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: FleetsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: FleetsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Creates or updates a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param parameters The Fleet to create or update. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + parameters: Fleet, + options?: FleetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FleetsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, fleetName, parameters, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param parameters The Fleet to create or update. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + parameters: Fleet, + options?: FleetsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + fleetName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patches a fleet resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + fleetName: string, + options?: FleetsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, options }, + updateOperationSpec + ); + } + + /** + * Gets a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + options?: FleetsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, options }, + getOperationSpec + ); + } + + /** + * Deletes a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + fleetName: string, + options?: FleetsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, fleetName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + options?: FleetsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + fleetName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists fleets in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: FleetsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Lists fleets in the specified subscription. + * @param options The options parameters. + */ + private _list( + options?: FleetsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Lists the user credentials of a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + listCredentials( + resourceGroupName: string, + fleetName: string, + options?: FleetsListCredentialsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fleetName, options }, + listCredentialsOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: FleetsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: FleetsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Fleet + }, + 201: { + bodyMapper: Mappers.Fleet + }, + 202: { + bodyMapper: Mappers.Fleet + }, + 204: { + bodyMapper: Mappers.Fleet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Fleet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Fleet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listCredentialsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.FleetCredentialResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fleetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FleetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 6d786ed8c56d..e45d9b4f3499 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,3 +14,8 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./managedClusterSnapshots"; +export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./fleets"; +export * from "./fleetMembers"; 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 000000000000..e6ac26542e18 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts @@ -0,0 +1,447 @@ +/* + * 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 { 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, + ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsListResponse, + 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: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: ManagedClusterSnapshotsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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.parameters9, + 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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 fee316d8fce4..7366d18f574e 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -49,7 +49,9 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, + ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -831,6 +833,27 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } + /** + * Aborting last running operation on managed cluster. We return a 204 no content code here to + * indicate that the operation has been accepted and an abort will be attempted but is not guaranteed + * to complete successfully. Please look up the provisioning state of the managed cluster to keep track + * of whether it changes to Canceled. A canceled provisioning state indicates that the abort was + * successful + * @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. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + abortLatestOperationOperationSpec + ); + } + /** * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more * details about rotating managed cluster certificates. @@ -915,6 +938,88 @@ export class ManagedClustersImpl implements ManagedClusters { 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. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + async beginRotateServiceAccountSigningKeys( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + rotateServiceAccountSigningKeysOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Rotates the service account signing keys of a 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. + */ + async beginRotateServiceAccountSigningKeysAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise { + const poller = await this.beginRotateServiceAccountSigningKeys( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + /** * 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 @@ -1554,7 +1659,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1614,6 +1722,26 @@ const resetAADProfileOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const abortLatestOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", @@ -1637,6 +1765,29 @@ const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const rotateServiceAccountSigningKeysOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; const stopOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..d438aa167fb0 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts @@ -0,0 +1,328 @@ +/* + * 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 { TrustedAccessRoleBindings } 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 { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListNextOptionalParams, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsListResponse, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams, + TrustedAccessRoleBindingsListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoleBindings operations. */ +export class TrustedAccessRoleBindingsImpl + implements TrustedAccessRoleBindings { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoleBindings class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List trusted access role bindings. + * @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?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, resourceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, resourceName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * List trusted access role bindings. + * @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?: TrustedAccessRoleBindingsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec + ); + } + + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + getOperationSpec + ); + } + + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + deleteOperationSpec + ); + } + + /** + * 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?: TrustedAccessRoleBindingsListNextOptionalParams + ): 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}/trustedAccessRoleBindings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + 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}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.trustedAccessRoleBinding, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts new file mode 100644 index 000000000000..f92b063034b9 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts @@ -0,0 +1,158 @@ +/* + * 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 { TrustedAccessRoles } 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 { + TrustedAccessRole, + TrustedAccessRolesListNextOptionalParams, + TrustedAccessRolesListOptionalParams, + TrustedAccessRolesListResponse, + TrustedAccessRolesListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoles operations. */ +export class TrustedAccessRolesImpl implements TrustedAccessRoles { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoles class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + public list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: TrustedAccessRolesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts index 4e16d6840a5d..9ef428b30853 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts @@ -11,6 +11,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { AgentPool, AgentPoolsListOptionalParams, + AgentPoolsAbortLatestOperationOptionalParams, AgentPoolsGetOptionalParams, AgentPoolsGetResponse, AgentPoolsCreateOrUpdateOptionalParams, @@ -37,6 +38,22 @@ export interface AgentPools { resourceName: string, options?: AgentPoolsListOptionalParams ): PagedAsyncIterableIterator; + /** + * Aborting last running operation on agent pool. We return a 204 no content code here to indicate that + * the operation has been accepted and an abort will be attempted but is not guaranteed to complete + * successfully. Please look up the provisioning state of the agent pool to keep track of whether it + * changes to Canceled. A canceled provisioning state indicates that the abort was successful + * @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. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: AgentPoolsAbortLatestOperationOptionalParams + ): Promise; /** * Gets the specified managed cluster agent pool. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleetMembers.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleetMembers.ts new file mode 100644 index 000000000000..8f6f197a37df --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleetMembers.ts @@ -0,0 +1,113 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + FleetMember, + FleetMembersListByFleetOptionalParams, + FleetMembersCreateOrUpdateOptionalParams, + FleetMembersCreateOrUpdateResponse, + FleetMembersGetOptionalParams, + FleetMembersGetResponse, + FleetMembersDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a FleetMembers. */ +export interface FleetMembers { + /** + * Lists the members of a fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + listByFleet( + resourceGroupName: string, + fleetName: string, + options?: FleetMembersListByFleetOptionalParams + ): PagedAsyncIterableIterator; + /** + * A member contains a reference to an existing Kubernetes cluster. Creating a member makes the + * referenced cluster join the Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param parameters The Fleet member to create or update. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + parameters: FleetMember, + options?: FleetMembersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FleetMembersCreateOrUpdateResponse + > + >; + /** + * A member contains a reference to an existing Kubernetes cluster. Creating a member makes the + * referenced cluster join the Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param parameters The Fleet member to create or update. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + parameters: FleetMember, + options?: FleetMembersCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets a Fleet member. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersGetOptionalParams + ): Promise; + /** + * Deleting a Fleet member results in the member cluster leaving fleet. The Member azure resource is + * deleted upon success. The underlying cluster is not deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersDeleteOptionalParams + ): Promise, void>>; + /** + * Deleting a Fleet member results in the member cluster leaving fleet. The Member azure resource is + * deleted upon success. The underlying cluster is not deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + fleetMemberName: string, + options?: FleetMembersDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleets.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleets.ts new file mode 100644 index 000000000000..1dcc3e16d08d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/fleets.ts @@ -0,0 +1,129 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Fleet, + FleetsListByResourceGroupOptionalParams, + FleetsListOptionalParams, + FleetsCreateOrUpdateOptionalParams, + FleetsCreateOrUpdateResponse, + FleetsUpdateOptionalParams, + FleetsUpdateResponse, + FleetsGetOptionalParams, + FleetsGetResponse, + FleetsDeleteOptionalParams, + FleetsListCredentialsOptionalParams, + FleetsListCredentialsResponse +} from "../models"; + +/// +/** Interface representing a Fleets. */ +export interface Fleets { + /** + * Lists fleets in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: FleetsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists fleets in the specified subscription. + * @param options The options parameters. + */ + list(options?: FleetsListOptionalParams): PagedAsyncIterableIterator; + /** + * Creates or updates a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param parameters The Fleet to create or update. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + fleetName: string, + parameters: Fleet, + options?: FleetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FleetsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param parameters The Fleet to create or update. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + fleetName: string, + parameters: Fleet, + options?: FleetsCreateOrUpdateOptionalParams + ): Promise; + /** + * Patches a fleet resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + fleetName: string, + options?: FleetsUpdateOptionalParams + ): Promise; + /** + * Gets a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fleetName: string, + options?: FleetsGetOptionalParams + ): Promise; + /** + * Deletes a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + fleetName: string, + options?: FleetsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + fleetName: string, + options?: FleetsDeleteOptionalParams + ): Promise; + /** + * Lists the user credentials of a Fleet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param options The options parameters. + */ + listCredentials( + resourceGroupName: string, + fleetName: string, + options?: FleetsListCredentialsOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index 6d786ed8c56d..e45d9b4f3499 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -14,3 +14,8 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./managedClusterSnapshots"; +export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./fleets"; +export * from "./fleetMembers"; 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 000000000000..bec60709a6e4 --- /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 ff803ac9e121..46e3c9106d03 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -38,7 +38,9 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, + ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -296,6 +298,21 @@ export interface ManagedClusters { parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams ): Promise; + /** + * Aborting last running operation on managed cluster. We return a 204 no content code here to + * indicate that the operation has been accepted and an abort will be attempted but is not guaranteed + * to complete successfully. Please look up the provisioning state of the managed cluster to keep track + * of whether it changes to Canceled. A canceled provisioning state indicates that the abort was + * successful + * @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. + */ + abortLatestOperation( + 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. @@ -320,6 +337,28 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams ): Promise; + /** + * Rotates the service account signing keys of a 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. + */ + beginRotateServiceAccountSigningKeys( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise, void>>; + /** + * Rotates the service account signing keys of a 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. + */ + beginRotateServiceAccountSigningKeysAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise; /** * 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 diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..a1849299cbd5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts @@ -0,0 +1,75 @@ +/* + * 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 { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoleBindings. */ +export interface TrustedAccessRoleBindings { + /** + * List trusted access role bindings. + * @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?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise; + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts new file mode 100644 index 000000000000..48bad47db1b5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts @@ -0,0 +1,27 @@ +/* + * 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 { + TrustedAccessRole, + TrustedAccessRolesListOptionalParams +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoles. */ +export interface TrustedAccessRoles { + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/containerservice/arm-containerservice/test/sampleTest.ts b/sdk/containerservice/arm-containerservice/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerservice/arm-containerservice/tsconfig.json b/sdk/containerservice/arm-containerservice/tsconfig.json index 5bad5556bbfd..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservice/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"