From 81ec62ddf4b7843eb439afcd6a7c9e8aeb82427e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 25 Jul 2022 02:58:56 +0000 Subject: [PATCH] CodeGen from PR 19916 in Azure/azure-rest-api-specs Merge 6b4b0ae2f38a5dbec0bd5e0b93fa25a03c2f916f into 3d9784bb27be865ccb668941849e58200b977231 --- common/config/rush/pnpm-lock.yaml | 4 +- .../arm-containerservice/CHANGELOG.md | 141 ++- .../arm-containerservice/README.md | 2 +- .../arm-containerservice/_meta.json | 6 +- .../arm-containerservice/package.json | 19 +- .../review/arm-containerservice.api.md | 924 +++++++++++++-- .../src/containerServiceClient.ts | 67 +- .../arm-containerservice/src/models/index.ts | 1014 +++++++++++++---- .../src/models/mappers.ts | 1010 +++++++++++++++- .../src/models/parameters.ts | 111 +- .../src/operations/agentPools.ts | 5 +- .../src/operations/fleetMembers.ts | 486 ++++++++ .../src/operations/fleets.ts | 643 +++++++++++ .../src/operations/index.ts | 5 + .../src/operations/managedClusterSnapshots.ts | 447 ++++++++ .../src/operations/managedClusters.ts | 111 +- .../operations/trustedAccessRoleBindings.ts | 328 ++++++ .../src/operations/trustedAccessRoles.ts | 158 +++ .../src/operationsInterfaces/fleetMembers.ts | 113 ++ .../src/operationsInterfaces/fleets.ts | 129 +++ .../src/operationsInterfaces/index.ts | 5 + .../managedClusterSnapshots.ts | 91 ++ .../operationsInterfaces/managedClusters.ts | 23 + .../trustedAccessRoleBindings.ts | 75 ++ .../trustedAccessRoles.ts | 27 + .../arm-containerservice/test/sampleTest.ts | 43 + .../arm-containerservice/tsconfig.json | 10 +- 27 files changed, 5558 insertions(+), 439 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 380217b7fd23..b666690f3e80 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10575,7 +10575,7 @@ packages: dev: false file:projects/arm-containerservice-1.tgz: - resolution: {integrity: sha512-QCY5oq8bjEDF2D43/7pN2p0865/lg8asI6JlDTaEVRB00wFXICQAfyFcrbBD9cp2YbymlFiw/X1HCjBclkpGkA==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-EeBPa/XCAYq4hE4quEpr04qlGMfyw+uykQDm0sMHv4UIvCTeuqQ1irsDL+JAbIYStaY1HETSIfUlirto26EGMQ==, tarball: file:projects/arm-containerservice-1.tgz} name: '@rush-temp/arm-containerservice-1' version: 0.0.0 dependencies: @@ -10594,7 +10594,7 @@ packages: rollup: 2.77.0 rollup-plugin-sourcemaps: 0.6.3_rollup@2.77.0 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.16.2 transitivePeerDependencies: - '@types/node' diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index 1510f6a5acda..a6e7503d45a7 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,26 +1,149 @@ # Release History -## 17.0.0 (2022-07-22) +## 17.0.0-beta.2 (2022-07-25) **Features** - - Added Interface AgentPool + - Added operation group FleetMembers + - Added operation group Fleets + - Added operation group ManagedClusterSnapshots + - Added operation group TrustedAccessRoleBindings + - Added operation group TrustedAccessRoles + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeys + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait - Added Interface AzureKeyVaultKms - - Added Interface MaintenanceConfiguration - - Added Interface ManagedCluster - - Added Interface ManagedClusterAccessProfile - - Added Interface ManagedClusterAddonProfileIdentity - - Added Interface ManagedClusterAgentPoolProfile + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface FleetCredentialResult + - Added Interface FleetCredentialResults + - Added Interface FleetHubProfile + - Added Interface FleetListResult + - 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 ManagedClusterIngressProfile + - Added Interface ManagedClusterIngressProfileWebAppRouting + - Added Interface ManagedClusterOidcIssuerProfile + - Added Interface ManagedClusterPropertiesForSnapshot - Added Interface ManagedClusterSecurityProfileDefender - Added Interface ManagedClusterSecurityProfileDefenderSecurityMonitoring - - Added Interface Snapshot - - Added Interface TrackedResource + - Added Interface ManagedClusterSecurityProfileImageCleaner + - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClusterSecurityProfileWorkloadIdentity + - 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 NetworkProfileForSnapshot + - Added Interface TrustedAccessRole + - 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 AzureEntityResource + - Added Type Alias Fleet + - Added Type Alias FleetMember + - 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 KeyVaultNetworkAccessTypes + - Added Type Alias ManagedClusterSnapshot + - 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 NetworkPluginMode + - Added Type Alias TrustedAccessRoleBinding + - 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 + - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ContainerServiceNetworkProfile has a new optional parameter networkPluginMode + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter hostGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay + - 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 ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget - Interface ManagedClusterSecurityProfile has a new optional parameter azureKeyVaultKms - Interface ManagedClusterSecurityProfile has a new optional parameter defender + - 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 + - Type Alias AgentPool has a new parameter messageOfTheDay + - Type Alias AgentPool has a new parameter enableCustomCATrust + - Type Alias AgentPool has a new parameter capacityReservationGroupID + - Type Alias AgentPool has a new parameter hostGroupID + - Type Alias ManagedCluster has a new parameter creationData + - Type Alias ManagedCluster has a new parameter oidcIssuerProfile + - Type Alias ManagedCluster has a new parameter enableNamespaceResources + - Type Alias ManagedCluster has a new parameter ingressProfile + - Type Alias ManagedCluster has a new parameter workloadAutoScalerProfile + - Added Enum KnownFleetMemberProvisioningState + - Added Enum KnownFleetProvisioningState - Added Enum KnownKeyVaultNetworkAccessTypes + - Added Enum KnownNetworkPluginMode + - Added Enum KnownTrustedAccessRoleBindingProvisioningState - Enum KnownNetworkPlugin has a new value None + - Enum KnownOssku has a new value Windows2019 + - Enum KnownOssku has a new value Windows2022 + - Enum KnownSnapshotType has a new value ManagedCluster **Breaking Changes** 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 bdb55b5bb107..eabe9d0711c3 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "405811c51aa09803caedfe17fd305e110db1ca5e", + "commit": "bc2394381e2f6e15b9be6dc33e45b7a536f8811c", "readme": "specification/containerservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220720.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --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-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220720.1" + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index db1a3bf107f3..3c287c33c437 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.0.0", + "version": "17.0.0-beta.2", "engines": { "node": ">=12.0.0" }, @@ -36,15 +36,13 @@ "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", "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", "cross-env": "^7.0.2", "@azure/dev-tool": "^1.0.0" }, @@ -98,7 +96,8 @@ "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped" + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -109,13 +108,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 e34015a75d16..3f063fc671f4 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -11,53 +11,56 @@ import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; // @public -export interface AgentPool extends SubResource { - availabilityZones?: string[]; +export type AgentPool = SubResource & { count?: number; - creationData?: CreationData; - readonly currentOrchestratorVersion?: string; - enableAutoScaling?: boolean; - enableEncryptionAtHost?: boolean; - enableFips?: boolean; - enableNodePublicIP?: boolean; - enableUltraSSD?: boolean; - gpuInstanceProfile?: GPUInstanceProfile; - hostGroupID?: string; - kubeletConfig?: KubeletConfig; + vmSize?: string; + osDiskSizeGB?: number; + osDiskType?: OSDiskType; kubeletDiskType?: KubeletDiskType; - linuxOSConfig?: LinuxOSConfig; - maxCount?: number; + workloadRuntime?: WorkloadRuntime; + messageOfTheDay?: string; + vnetSubnetID?: string; + podSubnetID?: string; maxPods?: number; + osType?: OSType; + osSKU?: Ossku; + maxCount?: number; minCount?: number; + enableAutoScaling?: boolean; + scaleDownMode?: ScaleDownMode; + typePropertiesType?: AgentPoolType; mode?: AgentPoolMode; - readonly nodeImageVersion?: string; - nodeLabels?: { - [propertyName: string]: string; - }; - nodePublicIPPrefixID?: string; - nodeTaints?: string[]; orchestratorVersion?: string; - osDiskSizeGB?: number; - osDiskType?: OSDiskType; - osSKU?: Ossku; - osType?: OSType; - podSubnetID?: string; - powerState?: PowerState; + readonly currentOrchestratorVersion?: string; + readonly nodeImageVersion?: string; + upgradeSettings?: AgentPoolUpgradeSettings; readonly provisioningState?: string; - proximityPlacementGroupID?: string; - scaleDownMode?: ScaleDownMode; - scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; + powerState?: PowerState; + availabilityZones?: string[]; + enableNodePublicIP?: boolean; + enableCustomCATrust?: boolean; + nodePublicIPPrefixID?: string; scaleSetPriority?: ScaleSetPriority; + scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; spotMaxPrice?: number; tags?: { [propertyName: string]: string; }; - typePropertiesType?: AgentPoolType; - upgradeSettings?: AgentPoolUpgradeSettings; - vmSize?: string; - vnetSubnetID?: string; - workloadRuntime?: WorkloadRuntime; -} + nodeLabels?: { + [propertyName: string]: string; + }; + nodeTaints?: string[]; + proximityPlacementGroupID?: string; + kubeletConfig?: KubeletConfig; + linuxOSConfig?: LinuxOSConfig; + enableEncryptionAtHost?: boolean; + enableUltraSSD?: boolean; + enableFips?: boolean; + gpuInstanceProfile?: GPUInstanceProfile; + creationData?: CreationData; + capacityReservationGroupID?: string; + hostGroupID?: string; +}; // @public export interface AgentPoolAvailableVersions { @@ -108,6 +111,7 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; // @public export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -183,6 +187,11 @@ export interface AgentPoolUpgradeSettings { maxSurge?: string; } +// @public +export type AzureEntityResource = Resource & { + readonly etag?: string; +}; + // @public export interface AzureKeyVaultKms { enabled?: boolean; @@ -220,10 +229,16 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + fleetMembers: FleetMembers; + // (undocumented) + fleets: Fleets; + // (undocumented) maintenanceConfigurations: MaintenanceConfigurations; // (undocumented) managedClusters: ManagedClusters; // (undocumented) + managedClusterSnapshots: ManagedClusterSnapshots; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -235,6 +250,10 @@ export class ContainerServiceClient extends coreClient.ServiceClient { snapshots: Snapshots; // (undocumented) subscriptionId: string; + // (undocumented) + trustedAccessRoleBindings: TrustedAccessRoleBindings; + // (undocumented) + trustedAccessRoles: TrustedAccessRoles; } // @public @@ -277,6 +296,7 @@ export interface ContainerServiceNetworkProfile { natGatewayProfile?: ManagedClusterNATGatewayProfile; networkMode?: NetworkMode; networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; networkPolicy?: NetworkPolicy; outboundType?: OutboundType; podCidr?: string; @@ -343,6 +363,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,6 +395,193 @@ export interface ExtendedLocation { // @public export type ExtendedLocationTypes = string; +// @public +export type Fleet = 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 type FleetMember = 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; @@ -387,201 +614,385 @@ export enum KnownCode { // @public export enum KnownConnectionStatus { + // (undocumented) Approved = "Approved", + // (undocumented) Disconnected = "Disconnected", + // (undocumented) Pending = "Pending", + // (undocumented) Rejected = "Rejected" } // @public export enum KnownContainerServiceStorageProfileTypes { + // (undocumented) ManagedDisks = "ManagedDisks", + // (undocumented) StorageAccount = "StorageAccount" } // @public export enum KnownContainerServiceVMSizeTypes { + // (undocumented) StandardA1 = "Standard_A1", + // (undocumented) StandardA10 = "Standard_A10", + // (undocumented) StandardA11 = "Standard_A11", + // (undocumented) StandardA1V2 = "Standard_A1_v2", + // (undocumented) StandardA2 = "Standard_A2", + // (undocumented) StandardA2MV2 = "Standard_A2m_v2", + // (undocumented) StandardA2V2 = "Standard_A2_v2", + // (undocumented) StandardA3 = "Standard_A3", + // (undocumented) StandardA4 = "Standard_A4", + // (undocumented) StandardA4MV2 = "Standard_A4m_v2", + // (undocumented) StandardA4V2 = "Standard_A4_v2", + // (undocumented) StandardA5 = "Standard_A5", + // (undocumented) StandardA6 = "Standard_A6", + // (undocumented) StandardA7 = "Standard_A7", + // (undocumented) StandardA8 = "Standard_A8", + // (undocumented) StandardA8MV2 = "Standard_A8m_v2", + // (undocumented) StandardA8V2 = "Standard_A8_v2", + // (undocumented) StandardA9 = "Standard_A9", + // (undocumented) StandardB2Ms = "Standard_B2ms", + // (undocumented) StandardB2S = "Standard_B2s", + // (undocumented) StandardB4Ms = "Standard_B4ms", + // (undocumented) StandardB8Ms = "Standard_B8ms", + // (undocumented) StandardD1 = "Standard_D1", + // (undocumented) StandardD11 = "Standard_D11", + // (undocumented) StandardD11V2 = "Standard_D11_v2", + // (undocumented) StandardD11V2Promo = "Standard_D11_v2_Promo", + // (undocumented) StandardD12 = "Standard_D12", + // (undocumented) StandardD12V2 = "Standard_D12_v2", + // (undocumented) StandardD12V2Promo = "Standard_D12_v2_Promo", + // (undocumented) StandardD13 = "Standard_D13", + // (undocumented) StandardD13V2 = "Standard_D13_v2", + // (undocumented) StandardD13V2Promo = "Standard_D13_v2_Promo", + // (undocumented) StandardD14 = "Standard_D14", + // (undocumented) StandardD14V2 = "Standard_D14_v2", + // (undocumented) StandardD14V2Promo = "Standard_D14_v2_Promo", + // (undocumented) StandardD15V2 = "Standard_D15_v2", + // (undocumented) StandardD16SV3 = "Standard_D16s_v3", + // (undocumented) StandardD16V3 = "Standard_D16_v3", + // (undocumented) StandardD1V2 = "Standard_D1_v2", + // (undocumented) StandardD2 = "Standard_D2", + // (undocumented) StandardD2SV3 = "Standard_D2s_v3", + // (undocumented) StandardD2V2 = "Standard_D2_v2", + // (undocumented) StandardD2V2Promo = "Standard_D2_v2_Promo", + // (undocumented) StandardD2V3 = "Standard_D2_v3", + // (undocumented) StandardD3 = "Standard_D3", + // (undocumented) StandardD32SV3 = "Standard_D32s_v3", + // (undocumented) StandardD32V3 = "Standard_D32_v3", + // (undocumented) StandardD3V2 = "Standard_D3_v2", + // (undocumented) StandardD3V2Promo = "Standard_D3_v2_Promo", + // (undocumented) StandardD4 = "Standard_D4", + // (undocumented) StandardD4SV3 = "Standard_D4s_v3", + // (undocumented) StandardD4V2 = "Standard_D4_v2", + // (undocumented) StandardD4V2Promo = "Standard_D4_v2_Promo", + // (undocumented) StandardD4V3 = "Standard_D4_v3", + // (undocumented) StandardD5V2 = "Standard_D5_v2", + // (undocumented) StandardD5V2Promo = "Standard_D5_v2_Promo", + // (undocumented) StandardD64SV3 = "Standard_D64s_v3", + // (undocumented) StandardD64V3 = "Standard_D64_v3", + // (undocumented) StandardD8SV3 = "Standard_D8s_v3", + // (undocumented) StandardD8V3 = "Standard_D8_v3", + // (undocumented) StandardDS1 = "Standard_DS1", + // (undocumented) StandardDS11 = "Standard_DS11", + // (undocumented) StandardDS11V2 = "Standard_DS11_v2", + // (undocumented) StandardDS11V2Promo = "Standard_DS11_v2_Promo", + // (undocumented) StandardDS12 = "Standard_DS12", + // (undocumented) StandardDS12V2 = "Standard_DS12_v2", + // (undocumented) StandardDS12V2Promo = "Standard_DS12_v2_Promo", + // (undocumented) StandardDS13 = "Standard_DS13", + // (undocumented) StandardDS132V2 = "Standard_DS13-2_v2", + // (undocumented) StandardDS134V2 = "Standard_DS13-4_v2", + // (undocumented) StandardDS13V2 = "Standard_DS13_v2", + // (undocumented) StandardDS13V2Promo = "Standard_DS13_v2_Promo", + // (undocumented) StandardDS14 = "Standard_DS14", + // (undocumented) StandardDS144V2 = "Standard_DS14-4_v2", + // (undocumented) StandardDS148V2 = "Standard_DS14-8_v2", + // (undocumented) StandardDS14V2 = "Standard_DS14_v2", + // (undocumented) StandardDS14V2Promo = "Standard_DS14_v2_Promo", + // (undocumented) StandardDS15V2 = "Standard_DS15_v2", + // (undocumented) StandardDS1V2 = "Standard_DS1_v2", + // (undocumented) StandardDS2 = "Standard_DS2", + // (undocumented) StandardDS2V2 = "Standard_DS2_v2", + // (undocumented) StandardDS2V2Promo = "Standard_DS2_v2_Promo", + // (undocumented) StandardDS3 = "Standard_DS3", + // (undocumented) StandardDS3V2 = "Standard_DS3_v2", + // (undocumented) StandardDS3V2Promo = "Standard_DS3_v2_Promo", + // (undocumented) StandardDS4 = "Standard_DS4", + // (undocumented) StandardDS4V2 = "Standard_DS4_v2", + // (undocumented) StandardDS4V2Promo = "Standard_DS4_v2_Promo", + // (undocumented) StandardDS5V2 = "Standard_DS5_v2", + // (undocumented) StandardDS5V2Promo = "Standard_DS5_v2_Promo", + // (undocumented) StandardE16SV3 = "Standard_E16s_v3", + // (undocumented) StandardE16V3 = "Standard_E16_v3", + // (undocumented) StandardE2SV3 = "Standard_E2s_v3", + // (undocumented) StandardE2V3 = "Standard_E2_v3", + // (undocumented) StandardE3216SV3 = "Standard_E32-16s_v3", + // (undocumented) StandardE328SV3 = "Standard_E32-8s_v3", + // (undocumented) StandardE32SV3 = "Standard_E32s_v3", + // (undocumented) StandardE32V3 = "Standard_E32_v3", + // (undocumented) StandardE4SV3 = "Standard_E4s_v3", + // (undocumented) StandardE4V3 = "Standard_E4_v3", + // (undocumented) StandardE6416SV3 = "Standard_E64-16s_v3", + // (undocumented) StandardE6432SV3 = "Standard_E64-32s_v3", + // (undocumented) StandardE64SV3 = "Standard_E64s_v3", + // (undocumented) StandardE64V3 = "Standard_E64_v3", + // (undocumented) StandardE8SV3 = "Standard_E8s_v3", + // (undocumented) StandardE8V3 = "Standard_E8_v3", + // (undocumented) StandardF1 = "Standard_F1", + // (undocumented) StandardF16 = "Standard_F16", + // (undocumented) StandardF16S = "Standard_F16s", + // (undocumented) StandardF16SV2 = "Standard_F16s_v2", + // (undocumented) StandardF1S = "Standard_F1s", + // (undocumented) StandardF2 = "Standard_F2", + // (undocumented) StandardF2S = "Standard_F2s", + // (undocumented) StandardF2SV2 = "Standard_F2s_v2", + // (undocumented) StandardF32SV2 = "Standard_F32s_v2", + // (undocumented) StandardF4 = "Standard_F4", + // (undocumented) StandardF4S = "Standard_F4s", + // (undocumented) StandardF4SV2 = "Standard_F4s_v2", + // (undocumented) StandardF64SV2 = "Standard_F64s_v2", + // (undocumented) StandardF72SV2 = "Standard_F72s_v2", + // (undocumented) StandardF8 = "Standard_F8", + // (undocumented) StandardF8S = "Standard_F8s", + // (undocumented) StandardF8SV2 = "Standard_F8s_v2", + // (undocumented) StandardG1 = "Standard_G1", + // (undocumented) StandardG2 = "Standard_G2", + // (undocumented) StandardG3 = "Standard_G3", + // (undocumented) StandardG4 = "Standard_G4", + // (undocumented) StandardG5 = "Standard_G5", + // (undocumented) StandardGS1 = "Standard_GS1", + // (undocumented) StandardGS2 = "Standard_GS2", + // (undocumented) StandardGS3 = "Standard_GS3", + // (undocumented) StandardGS4 = "Standard_GS4", + // (undocumented) StandardGS44 = "Standard_GS4-4", + // (undocumented) StandardGS48 = "Standard_GS4-8", + // (undocumented) StandardGS5 = "Standard_GS5", + // (undocumented) StandardGS516 = "Standard_GS5-16", + // (undocumented) StandardGS58 = "Standard_GS5-8", + // (undocumented) StandardH16 = "Standard_H16", + // (undocumented) StandardH16M = "Standard_H16m", + // (undocumented) StandardH16Mr = "Standard_H16mr", + // (undocumented) StandardH16R = "Standard_H16r", + // (undocumented) StandardH8 = "Standard_H8", + // (undocumented) StandardH8M = "Standard_H8m", + // (undocumented) StandardL16S = "Standard_L16s", + // (undocumented) StandardL32S = "Standard_L32s", + // (undocumented) StandardL4S = "Standard_L4s", + // (undocumented) StandardL8S = "Standard_L8s", + // (undocumented) StandardM12832Ms = "Standard_M128-32ms", + // (undocumented) StandardM12864Ms = "Standard_M128-64ms", + // (undocumented) StandardM128Ms = "Standard_M128ms", + // (undocumented) StandardM128S = "Standard_M128s", + // (undocumented) StandardM6416Ms = "Standard_M64-16ms", + // (undocumented) StandardM6432Ms = "Standard_M64-32ms", + // (undocumented) StandardM64Ms = "Standard_M64ms", + // (undocumented) StandardM64S = "Standard_M64s", + // (undocumented) StandardNC12 = "Standard_NC12", + // (undocumented) StandardNC12SV2 = "Standard_NC12s_v2", + // (undocumented) StandardNC12SV3 = "Standard_NC12s_v3", + // (undocumented) StandardNC24 = "Standard_NC24", + // (undocumented) StandardNC24R = "Standard_NC24r", + // (undocumented) StandardNC24RsV2 = "Standard_NC24rs_v2", + // (undocumented) StandardNC24RsV3 = "Standard_NC24rs_v3", + // (undocumented) StandardNC24SV2 = "Standard_NC24s_v2", + // (undocumented) StandardNC24SV3 = "Standard_NC24s_v3", + // (undocumented) StandardNC6 = "Standard_NC6", + // (undocumented) StandardNC6SV2 = "Standard_NC6s_v2", + // (undocumented) StandardNC6SV3 = "Standard_NC6s_v3", + // (undocumented) StandardND12S = "Standard_ND12s", + // (undocumented) StandardND24Rs = "Standard_ND24rs", + // (undocumented) StandardND24S = "Standard_ND24s", + // (undocumented) StandardND6S = "Standard_ND6s", + // (undocumented) StandardNV12 = "Standard_NV12", + // (undocumented) StandardNV24 = "Standard_NV24", + // (undocumented) StandardNV6 = "Standard_NV6" } // @public export enum KnownCreatedByType { + // (undocumented) Application = "Application", + // (undocumented) Key = "Key", + // (undocumented) ManagedIdentity = "ManagedIdentity", + // (undocumented) User = "User" } @@ -595,9 +1006,42 @@ export enum KnownExpander { // @public export enum KnownExtendedLocationTypes { + // (undocumented) EdgeZone = "EdgeZone" } +// @public +export enum KnownFleetMemberProvisioningState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + Joining = "Joining", + // (undocumented) + Leaving = "Leaving", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownFleetProvisioningState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + // @public export enum KnownFormat { Azure = "azure", @@ -606,22 +1050,31 @@ export enum KnownFormat { // @public export enum KnownGPUInstanceProfile { + // (undocumented) MIG1G = "MIG1g", + // (undocumented) MIG2G = "MIG2g", + // (undocumented) MIG3G = "MIG3g", + // (undocumented) MIG4G = "MIG4g", + // (undocumented) MIG7G = "MIG7g" } // @public export enum KnownIpFamily { + // (undocumented) IPv4 = "IPv4", + // (undocumented) IPv6 = "IPv6" } // @public export enum KnownKeyVaultNetworkAccessTypes { + // (undocumented) Private = "Private", + // (undocumented) Public = "Public" } @@ -645,14 +1098,19 @@ export enum KnownLoadBalancerSku { // @public export enum KnownManagedClusterPodIdentityProvisioningState { + // (undocumented) Assigned = "Assigned", + // (undocumented) Deleting = "Deleting", + // (undocumented) Failed = "Failed", + // (undocumented) Updating = "Updating" } // @public export enum KnownManagedClusterSKUName { + // (undocumented) Basic = "Basic" } @@ -675,6 +1133,11 @@ export enum KnownNetworkPlugin { None = "none" } +// @public +export enum KnownNetworkPluginMode { + Overlay = "Overlay" +} + // @public export enum KnownNetworkPolicy { Azure = "azure", @@ -689,8 +1152,14 @@ export enum KnownOSDiskType { // @public export enum KnownOssku { + // (undocumented) CBLMariner = "CBLMariner", - Ubuntu = "Ubuntu" + // (undocumented) + Ubuntu = "Ubuntu", + // (undocumented) + Windows2019 = "Windows2019", + // (undocumented) + Windows2022 = "Windows2022" } // @public @@ -709,15 +1178,21 @@ export enum KnownOutboundType { // @public export enum KnownPrivateEndpointConnectionProvisioningState { + // (undocumented) Creating = "Creating", + // (undocumented) Deleting = "Deleting", + // (undocumented) Failed = "Failed", + // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownPublicNetworkAccess { + // (undocumented) Disabled = "Disabled", + // (undocumented) Enabled = "Enabled" } @@ -741,9 +1216,22 @@ export enum KnownScaleSetPriority { // @public export enum KnownSnapshotType { + ManagedCluster = "ManagedCluster", NodePool = "NodePool" } +// @public +export enum KnownTrustedAccessRoleBindingProvisioningState { + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -755,12 +1243,19 @@ export enum KnownUpgradeChannel { // @public export enum KnownWeekDay { + // (undocumented) Friday = "Friday", + // (undocumented) Monday = "Monday", + // (undocumented) Saturday = "Saturday", + // (undocumented) Sunday = "Sunday", + // (undocumented) Thursday = "Thursday", + // (undocumented) Tuesday = "Tuesday", + // (undocumented) Wednesday = "Wednesday" } @@ -803,11 +1298,11 @@ export interface LinuxOSConfig { export type LoadBalancerSku = string; // @public -export interface MaintenanceConfiguration extends SubResource { - notAllowedTime?: TimeSpan[]; +export type MaintenanceConfiguration = SubResource & { readonly systemData?: SystemData; timeInWeek?: TimeInWeek[]; -} + notAllowedTime?: TimeSpan[]; +}; // @public export interface MaintenanceConfigurationListResult { @@ -856,47 +1351,52 @@ export interface MaintenanceConfigurationsListByManagedClusterOptionalParams ext export type MaintenanceConfigurationsListByManagedClusterResponse = MaintenanceConfigurationListResult; // @public -export interface ManagedCluster extends TrackedResource { - aadProfile?: ManagedClusterAADProfile; +export type ManagedCluster = TrackedResource & { + sku?: ManagedClusterSKU; + extendedLocation?: ExtendedLocation; + identity?: ManagedClusterIdentity; + readonly provisioningState?: string; + readonly powerState?: PowerState; + creationData?: CreationData; + readonly maxAgentPools?: number; + kubernetesVersion?: string; + readonly currentKubernetesVersion?: string; + dnsPrefix?: string; + fqdnSubdomain?: string; + readonly fqdn?: string; + readonly privateFqdn?: string; + readonly azurePortalFqdn?: string; + agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; + linuxProfile?: ContainerServiceLinuxProfile; + windowsProfile?: ManagedClusterWindowsProfile; + servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile; }; - agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; - apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; - autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; + podIdentityProfile?: ManagedClusterPodIdentityProfile; + oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; + nodeResourceGroup?: string; + enableRbac?: boolean; + enablePodSecurityPolicy?: boolean; + enableNamespaceResources?: boolean; + networkProfile?: ContainerServiceNetworkProfile; + aadProfile?: ManagedClusterAADProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; - readonly azurePortalFqdn?: string; - readonly currentKubernetesVersion?: string; - disableLocalAccounts?: boolean; + autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; + apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; diskEncryptionSetID?: string; - dnsPrefix?: string; - enablePodSecurityPolicy?: boolean; - enableRbac?: boolean; - extendedLocation?: ExtendedLocation; - readonly fqdn?: string; - fqdnSubdomain?: string; - httpProxyConfig?: ManagedClusterHttpProxyConfig; - identity?: ManagedClusterIdentity; identityProfile?: { [propertyName: string]: UserAssignedIdentity; }; - kubernetesVersion?: string; - linuxProfile?: ContainerServiceLinuxProfile; - readonly maxAgentPools?: number; - networkProfile?: ContainerServiceNetworkProfile; - nodeResourceGroup?: string; - podIdentityProfile?: ManagedClusterPodIdentityProfile; - readonly powerState?: PowerState; - readonly privateFqdn?: string; privateLinkResources?: PrivateLinkResource[]; - readonly provisioningState?: string; - publicNetworkAccess?: PublicNetworkAccess; + disableLocalAccounts?: boolean; + httpProxyConfig?: ManagedClusterHttpProxyConfig; securityProfile?: ManagedClusterSecurityProfile; - servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; - sku?: ManagedClusterSKU; storageProfile?: ManagedClusterStorageProfile; - windowsProfile?: ManagedClusterWindowsProfile; -} + ingressProfile?: ManagedClusterIngressProfile; + publicNetworkAccess?: PublicNetworkAccess; + workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; +}; // @public export interface ManagedClusterAADProfile { @@ -910,9 +1410,9 @@ export interface ManagedClusterAADProfile { } // @public -export interface ManagedClusterAccessProfile extends TrackedResource { +export type ManagedClusterAccessProfile = TrackedResource & { kubeConfig?: Uint8Array; -} +}; // @public export interface ManagedClusterAddonProfile { @@ -924,21 +1424,22 @@ export interface ManagedClusterAddonProfile { } // @public -export interface ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { -} +export type ManagedClusterAddonProfileIdentity = UserAssignedIdentity & {}; // @public -export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { +export type ManagedClusterAgentPoolProfile = ManagedClusterAgentPoolProfileProperties & { name: string; -} +}; // @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; @@ -950,6 +1451,7 @@ export interface ManagedClusterAgentPoolProfileProperties { linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -987,7 +1489,9 @@ export interface ManagedClusterAPIServerAccessProfile { disableRunCommand?: boolean; enablePrivateCluster?: boolean; enablePrivateClusterPublicFqdn?: boolean; + enableVnetIntegration?: boolean; privateDNSZone?: string; + subnetId?: string; } // @public @@ -997,6 +1501,7 @@ export interface ManagedClusterAutoUpgradeProfile { // @public export interface ManagedClusterHttpProxyConfig { + readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1013,6 +1518,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; @@ -1058,6 +1574,12 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } +// @public +export interface ManagedClusterOidcIssuerProfile { + enabled?: boolean; + readonly issuerURL?: string; +} + // @public export interface ManagedClusterPodIdentity { bindingSelector?: string; @@ -1141,6 +1663,14 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } +// @public +export interface ManagedClusterPropertiesForSnapshot { + enableRbac?: boolean; + kubernetesVersion?: string; + readonly networkProfile?: NetworkProfileForSnapshot; + sku?: ManagedClusterSKU; +} + // @public export interface ManagedClusters { beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise, ManagedClustersCreateOrUpdateResponse>>; @@ -1153,6 +1683,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>>; @@ -1185,6 +1717,7 @@ export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1193,6 +1726,9 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.Operatio export interface ManagedClusterSecurityProfile { azureKeyVaultKms?: AzureKeyVaultKms; defender?: ManagedClusterSecurityProfileDefender; + imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; + workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } // @public @@ -1206,6 +1742,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; @@ -1327,6 +1879,82 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; +// @public +export type ManagedClusterSnapshot = TrackedResource & { + creationData?: CreationData; + snapshotType?: SnapshotType; + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; +}; + +// @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; @@ -1345,6 +1973,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; @@ -1368,14 +2002,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 @@ -1415,6 +2056,16 @@ export interface ManagedClusterWindowsProfile { licenseType?: LicenseType; } +// @public +export interface ManagedClusterWorkloadAutoScalerProfile { + keda?: ManagedClusterWorkloadAutoScalerProfileKeda; +} + +// @public +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + enabled: boolean; +} + // @public (undocumented) export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly clientId?: string; @@ -1427,9 +2078,21 @@ 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[]; @@ -1651,16 +2314,16 @@ export type ScaleSetEvictionPolicy = string; export type ScaleSetPriority = string; // @public -export interface Snapshot extends TrackedResource { +export type Snapshot = TrackedResource & { creationData?: CreationData; - readonly enableFips?: boolean; + snapshotType?: SnapshotType; readonly kubernetesVersion?: string; readonly nodeImageVersion?: string; - readonly osSku?: Ossku; readonly osType?: OSType; - snapshotType?: SnapshotType; + readonly osSku?: Ossku; readonly vmSize?: string; -} + readonly enableFips?: boolean; +}; // @public export interface SnapshotListResult { @@ -1803,13 +2466,110 @@ export interface TimeSpan { } // @public -export interface TrackedResource extends Resource { - location: string; +export type TrackedResource = Resource & { tags?: { [propertyName: string]: string; }; + location: string; +}; + +// @public +export interface TrustedAccessRole { + readonly name?: string; + readonly rules?: TrustedAccessRoleRule[]; + readonly sourceResourceType?: string; +} + +// @public +export type TrustedAccessRoleBinding = Resource & { + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + sourceResourceId: string; + roles: 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 UpgradeChannel = string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index eb17afd7dfe4..70a32cd157d6 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -22,7 +22,12 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, - SnapshotsImpl + SnapshotsImpl, + ManagedClusterSnapshotsImpl, + TrustedAccessRolesImpl, + TrustedAccessRoleBindingsImpl, + FleetsImpl, + FleetMembersImpl } from "./operations"; import { Operations, @@ -32,7 +37,12 @@ import { PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, - Snapshots + Snapshots, + ManagedClusterSnapshots, + TrustedAccessRoles, + TrustedAccessRoleBindings, + Fleets, + FleetMembers } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -68,7 +78,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/17.0.0`; + const packageDetails = `azsdk-js-arm-containerservice/17.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -88,41 +98,34 @@ 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-06-01"; + this.apiVersion = options.apiVersion || "2022-07-02-preview"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); @@ -133,6 +136,11 @@ export class ContainerServiceClient extends coreClient.ServiceClient { this ); this.snapshots = new SnapshotsImpl(this); + 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); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -151,7 +159,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { if (param.length > 1) { const newParams = param[1].split("&").map((item) => { if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; + return item.replace(/(?<==).*$/, apiVersion); } else { return item; } @@ -172,4 +180,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 3383f7969485..050ef93269e2 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 an OS SKU. This value must not be specified 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,6 +265,8 @@ 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; } @@ -363,12 +375,6 @@ 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; -} - /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -508,10 +514,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'. */ @@ -674,6 +693,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 +726,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 +741,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 +775,26 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +/** Workload Identity settings for the security profile. */ +export interface ManagedClusterSecurityProfileWorkloadIdentity { + /** Whether to enable Workload Identity */ + enabled?: boolean; +} + +/** ImageCleaner 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 +803,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 +827,38 @@ 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; +} + +/** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + /** Whether to enable KEDA. */ + enabled: boolean; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -1154,6 +1244,235 @@ export interface SnapshotListResult { readonly nextLink?: string; } +/** The response from the List Managed Cluster Snapshots operation. */ +export interface ManagedClusterSnapshotListResult { + /** The list of managed cluster snapshots. */ + value?: ManagedClusterSnapshot[]; + /** + * The URL to get the next set of managed cluster snapshot results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** managed cluster properties for snapshot, these properties are read only. */ +export interface ManagedClusterPropertiesForSnapshot { + /** The current kubernetes version. */ + kubernetesVersion?: string; + /** The current managed cluster sku. */ + sku?: ManagedClusterSKU; + /** Whether the cluster has enabled Kubernetes Role-Based Access Control or not. */ + enableRbac?: boolean; + /** + * The current network profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkProfile?: NetworkProfileForSnapshot; +} + +/** network profile for managed cluster snapshot, these properties are read only. */ +export interface NetworkProfileForSnapshot { + /** networkPlugin for managed cluster snapshot. */ + networkPlugin?: NetworkPlugin; + /** NetworkPluginMode for managed cluster snapshot. */ + networkPluginMode?: NetworkPluginMode; + /** networkPolicy for managed cluster snapshot. */ + networkPolicy?: NetworkPolicy; + /** networkMode for managed cluster snapshot. */ + networkMode?: NetworkMode; + /** loadBalancerSku for managed cluster snapshot. */ + loadBalancerSku?: LoadBalancerSku; +} + +/** List of trusted access roles */ +export interface TrustedAccessRoleListResult { + /** + * Role list + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TrustedAccessRole[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Trusted access role definition. */ +export interface TrustedAccessRole { + /** + * Resource type of Azure resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceResourceType?: string; + /** + * Name of role, name is unique under a source resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rules?: TrustedAccessRoleRule[]; +} + +/** Rule for trusted access role */ +export interface TrustedAccessRoleRule { + /** + * List of allowed verbs + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly verbs?: string[]; + /** + * List of allowed apiGroups + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiGroups?: string[]; + /** + * List of allowed resources + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: string[]; + /** + * List of allowed names + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceNames?: string[]; + /** + * List of allowed nonResourceURLs + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nonResourceURLs?: string[]; +} + +/** List of trusted access role bindings */ +export interface TrustedAccessRoleBindingListResult { + /** Role binding list */ + value?: TrustedAccessRoleBinding[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The FleetHubProfile configures the fleet hub. */ +export interface FleetHubProfile { + /** DNS prefix used to create the FQDN for the Fleet hub. */ + dnsPrefix?: string; + /** + * The FQDN of the Fleet hub. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fqdn?: string; + /** + * The Kubernetes version of the Fleet hub. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kubernetesVersion?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** 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. */ @@ -1195,26 +1514,46 @@ export interface ContainerServiceVMDiagnostics { } /** Profile for the container service agent pool. */ -export interface ManagedClusterAgentPoolProfile - extends ManagedClusterAgentPoolProfileProperties { +export type ManagedClusterAgentPoolProfile = ManagedClusterAgentPoolProfileProperties & { /** Windows agent pool names must be 6 characters or less. */ name: string; -} +}; /** Information of user assigned identity used by this add-on. */ -export interface ManagedClusterAddonProfileIdentity - extends UserAssignedIdentity {} +export type ManagedClusterAddonProfileIdentity = UserAssignedIdentity & {}; /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { +export type TrackedResource = Resource & { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -} +}; + +/** Defines binding between a resource and role */ +export type TrustedAccessRoleBinding = 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 type AzureEntityResource = 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 { +export type MaintenanceConfiguration = SubResource & { /** * The system metadata relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1224,10 +1563,10 @@ export interface MaintenanceConfiguration extends SubResource { timeInWeek?: TimeInWeek[]; /** Time slots on which upgrade is not allowed. */ notAllowedTime?: TimeSpan[]; -} +}; /** Agent Pool. */ -export interface AgentPool extends SubResource { +export type AgentPool = SubResource & { /** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */ count?: number; /** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */ @@ -1240,6 +1579,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 +1589,7 @@ export interface AgentPool extends SubResource { maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies an OS SKU. This value must not be specified 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 +1603,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 +1628,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,12 +1660,14 @@ 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; -} +}; /** Managed cluster. */ -export interface ManagedCluster extends TrackedResource { +export type ManagedCluster = TrackedResource & { /** The managed cluster SKU. */ sku?: ManagedClusterSKU; /** The extended location of the Virtual Machine. */ @@ -1339,15 +1684,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 +1729,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,18 +1763,22 @@ 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; +}; /** Managed cluster Access Profile. */ -export interface ManagedClusterAccessProfile extends TrackedResource { +export type ManagedClusterAccessProfile = TrackedResource & { /** Base64-encoded Kubernetes configuration file. */ kubeConfig?: Uint8Array; -} +}; /** A node pool snapshot resource. */ -export interface Snapshot extends TrackedResource { +export type Snapshot = TrackedResource & { /** CreationData to be used to specify the source agent pool resource ID to create this snapshot. */ creationData?: CreationData; /** The type of a snapshot. The default is NodePool. */ @@ -1444,7 +1799,7 @@ export interface Snapshot extends TrackedResource { */ readonly osType?: OSType; /** - * Specifies an OS SKU. This value must not be specified 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; @@ -1458,7 +1813,47 @@ export interface Snapshot extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly enableFips?: boolean; -} +}; + +/** A managed cluster snapshot resource. */ +export type ManagedClusterSnapshot = 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 type Fleet = 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 type FleetMember = 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 { @@ -1468,7 +1863,6 @@ export interface AgentPoolsUpgradeNodeImageVersionHeaders { /** Known values of {@link ManagedClusterSKUName} that the service accepts. */ export enum KnownManagedClusterSKUName { - /** Basic */ Basic = "Basic" } @@ -1501,7 +1895,6 @@ export type ManagedClusterSKUTier = string; /** Known values of {@link ExtendedLocationTypes} that the service accepts. */ export enum KnownExtendedLocationTypes { - /** EdgeZone */ EdgeZone = "EdgeZone" } @@ -1606,10 +1999,10 @@ export type OSType = string; /** Known values of {@link Ossku} that the service accepts. */ export enum KnownOssku { - /** Ubuntu */ Ubuntu = "Ubuntu", - /** CBLMariner */ - CBLMariner = "CBLMariner" + CBLMariner = "CBLMariner", + Windows2019 = "Windows2019", + Windows2022 = "Windows2022" } /** @@ -1618,7 +2011,9 @@ export enum KnownOssku { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Ubuntu** \ - * **CBLMariner** + * **CBLMariner** \ + * **Windows2019** \ + * **Windows2022** */ export type Ossku = string; @@ -1714,15 +2109,10 @@ export type ScaleSetEvictionPolicy = string; /** Known values of {@link GPUInstanceProfile} that the service accepts. */ export enum KnownGPUInstanceProfile { - /** MIG1G */ MIG1G = "MIG1g", - /** MIG2G */ MIG2G = "MIG2g", - /** MIG3G */ MIG3G = "MIG3g", - /** MIG4G */ MIG4G = "MIG4g", - /** MIG7G */ MIG7G = "MIG7g" } @@ -1759,13 +2149,9 @@ export type LicenseType = string; /** Known values of {@link ManagedClusterPodIdentityProvisioningState} that the service accepts. */ export enum KnownManagedClusterPodIdentityProvisioningState { - /** Assigned */ Assigned = "Assigned", - /** Updating */ Updating = "Updating", - /** Deleting */ Deleting = "Deleting", - /** Failed */ Failed = "Failed" } @@ -1787,7 +2173,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" } @@ -1798,10 +2184,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. */ @@ -1882,9 +2283,7 @@ export type LoadBalancerSku = string; /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { - /** IPv4 */ IPv4 = "IPv4", - /** IPv6 */ IPv6 = "IPv6" } @@ -1951,9 +2350,7 @@ export type Expander = string; /** Known values of {@link KeyVaultNetworkAccessTypes} that the service accepts. */ export enum KnownKeyVaultNetworkAccessTypes { - /** Public */ Public = "Public", - /** Private */ Private = "Private" } @@ -1969,9 +2366,7 @@ export type KeyVaultNetworkAccessTypes = string; /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ Enabled = "Enabled", - /** Disabled */ Disabled = "Disabled" } @@ -1987,13 +2382,9 @@ export type PublicNetworkAccess = string; /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { - /** User */ User = "User", - /** Application */ Application = "Application", - /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", - /** Key */ Key = "Key" } @@ -2029,19 +2420,12 @@ export type Format = string; /** Known values of {@link WeekDay} that the service accepts. */ export enum KnownWeekDay { - /** Sunday */ Sunday = "Sunday", - /** Monday */ Monday = "Monday", - /** Tuesday */ Tuesday = "Tuesday", - /** Wednesday */ Wednesday = "Wednesday", - /** Thursday */ Thursday = "Thursday", - /** Friday */ Friday = "Friday", - /** Saturday */ Saturday = "Saturday" } @@ -2062,13 +2446,9 @@ export type WeekDay = string; /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ export enum KnownPrivateEndpointConnectionProvisioningState { - /** Succeeded */ Succeeded = "Succeeded", - /** Creating */ Creating = "Creating", - /** Deleting */ Deleting = "Deleting", - /** Failed */ Failed = "Failed" } @@ -2086,13 +2466,9 @@ export type PrivateEndpointConnectionProvisioningState = string; /** Known values of {@link ConnectionStatus} that the service accepts. */ export enum KnownConnectionStatus { - /** Pending */ Pending = "Pending", - /** Approved */ Approved = "Approved", - /** Rejected */ Rejected = "Rejected", - /** Disconnected */ Disconnected = "Disconnected" } @@ -2111,7 +2487,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" } /** @@ -2119,359 +2497,254 @@ 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", + Failed = "Failed", + Updating = "Updating", + 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", + Failed = "Failed", + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + 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", + Failed = "Failed", + Canceled = "Canceled", + Joining = "Joining", + Leaving = "Leaving", + 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 */ StandardA1 = "Standard_A1", - /** StandardA10 */ StandardA10 = "Standard_A10", - /** StandardA11 */ StandardA11 = "Standard_A11", - /** StandardA1V2 */ StandardA1V2 = "Standard_A1_v2", - /** StandardA2 */ StandardA2 = "Standard_A2", - /** StandardA2V2 */ StandardA2V2 = "Standard_A2_v2", - /** StandardA2MV2 */ StandardA2MV2 = "Standard_A2m_v2", - /** StandardA3 */ StandardA3 = "Standard_A3", - /** StandardA4 */ StandardA4 = "Standard_A4", - /** StandardA4V2 */ StandardA4V2 = "Standard_A4_v2", - /** StandardA4MV2 */ StandardA4MV2 = "Standard_A4m_v2", - /** StandardA5 */ StandardA5 = "Standard_A5", - /** StandardA6 */ StandardA6 = "Standard_A6", - /** StandardA7 */ StandardA7 = "Standard_A7", - /** StandardA8 */ StandardA8 = "Standard_A8", - /** StandardA8V2 */ StandardA8V2 = "Standard_A8_v2", - /** StandardA8MV2 */ StandardA8MV2 = "Standard_A8m_v2", - /** StandardA9 */ StandardA9 = "Standard_A9", - /** StandardB2Ms */ StandardB2Ms = "Standard_B2ms", - /** StandardB2S */ StandardB2S = "Standard_B2s", - /** StandardB4Ms */ StandardB4Ms = "Standard_B4ms", - /** StandardB8Ms */ StandardB8Ms = "Standard_B8ms", - /** StandardD1 */ StandardD1 = "Standard_D1", - /** StandardD11 */ StandardD11 = "Standard_D11", - /** StandardD11V2 */ StandardD11V2 = "Standard_D11_v2", - /** StandardD11V2Promo */ StandardD11V2Promo = "Standard_D11_v2_Promo", - /** StandardD12 */ StandardD12 = "Standard_D12", - /** StandardD12V2 */ StandardD12V2 = "Standard_D12_v2", - /** StandardD12V2Promo */ StandardD12V2Promo = "Standard_D12_v2_Promo", - /** StandardD13 */ StandardD13 = "Standard_D13", - /** StandardD13V2 */ StandardD13V2 = "Standard_D13_v2", - /** StandardD13V2Promo */ StandardD13V2Promo = "Standard_D13_v2_Promo", - /** StandardD14 */ StandardD14 = "Standard_D14", - /** StandardD14V2 */ StandardD14V2 = "Standard_D14_v2", - /** StandardD14V2Promo */ StandardD14V2Promo = "Standard_D14_v2_Promo", - /** StandardD15V2 */ StandardD15V2 = "Standard_D15_v2", - /** StandardD16V3 */ StandardD16V3 = "Standard_D16_v3", - /** StandardD16SV3 */ StandardD16SV3 = "Standard_D16s_v3", - /** StandardD1V2 */ StandardD1V2 = "Standard_D1_v2", - /** StandardD2 */ StandardD2 = "Standard_D2", - /** StandardD2V2 */ StandardD2V2 = "Standard_D2_v2", - /** StandardD2V2Promo */ StandardD2V2Promo = "Standard_D2_v2_Promo", - /** StandardD2V3 */ StandardD2V3 = "Standard_D2_v3", - /** StandardD2SV3 */ StandardD2SV3 = "Standard_D2s_v3", - /** StandardD3 */ StandardD3 = "Standard_D3", - /** StandardD32V3 */ StandardD32V3 = "Standard_D32_v3", - /** StandardD32SV3 */ StandardD32SV3 = "Standard_D32s_v3", - /** StandardD3V2 */ StandardD3V2 = "Standard_D3_v2", - /** StandardD3V2Promo */ StandardD3V2Promo = "Standard_D3_v2_Promo", - /** StandardD4 */ StandardD4 = "Standard_D4", - /** StandardD4V2 */ StandardD4V2 = "Standard_D4_v2", - /** StandardD4V2Promo */ StandardD4V2Promo = "Standard_D4_v2_Promo", - /** StandardD4V3 */ StandardD4V3 = "Standard_D4_v3", - /** StandardD4SV3 */ StandardD4SV3 = "Standard_D4s_v3", - /** StandardD5V2 */ StandardD5V2 = "Standard_D5_v2", - /** StandardD5V2Promo */ StandardD5V2Promo = "Standard_D5_v2_Promo", - /** StandardD64V3 */ StandardD64V3 = "Standard_D64_v3", - /** StandardD64SV3 */ StandardD64SV3 = "Standard_D64s_v3", - /** StandardD8V3 */ StandardD8V3 = "Standard_D8_v3", - /** StandardD8SV3 */ StandardD8SV3 = "Standard_D8s_v3", - /** StandardDS1 */ StandardDS1 = "Standard_DS1", - /** StandardDS11 */ StandardDS11 = "Standard_DS11", - /** StandardDS11V2 */ StandardDS11V2 = "Standard_DS11_v2", - /** StandardDS11V2Promo */ StandardDS11V2Promo = "Standard_DS11_v2_Promo", - /** StandardDS12 */ StandardDS12 = "Standard_DS12", - /** StandardDS12V2 */ StandardDS12V2 = "Standard_DS12_v2", - /** StandardDS12V2Promo */ StandardDS12V2Promo = "Standard_DS12_v2_Promo", - /** StandardDS13 */ StandardDS13 = "Standard_DS13", - /** StandardDS132V2 */ StandardDS132V2 = "Standard_DS13-2_v2", - /** StandardDS134V2 */ StandardDS134V2 = "Standard_DS13-4_v2", - /** StandardDS13V2 */ StandardDS13V2 = "Standard_DS13_v2", - /** StandardDS13V2Promo */ StandardDS13V2Promo = "Standard_DS13_v2_Promo", - /** StandardDS14 */ StandardDS14 = "Standard_DS14", - /** StandardDS144V2 */ StandardDS144V2 = "Standard_DS14-4_v2", - /** StandardDS148V2 */ StandardDS148V2 = "Standard_DS14-8_v2", - /** StandardDS14V2 */ StandardDS14V2 = "Standard_DS14_v2", - /** StandardDS14V2Promo */ StandardDS14V2Promo = "Standard_DS14_v2_Promo", - /** StandardDS15V2 */ StandardDS15V2 = "Standard_DS15_v2", - /** StandardDS1V2 */ StandardDS1V2 = "Standard_DS1_v2", - /** StandardDS2 */ StandardDS2 = "Standard_DS2", - /** StandardDS2V2 */ StandardDS2V2 = "Standard_DS2_v2", - /** StandardDS2V2Promo */ StandardDS2V2Promo = "Standard_DS2_v2_Promo", - /** StandardDS3 */ StandardDS3 = "Standard_DS3", - /** StandardDS3V2 */ StandardDS3V2 = "Standard_DS3_v2", - /** StandardDS3V2Promo */ StandardDS3V2Promo = "Standard_DS3_v2_Promo", - /** StandardDS4 */ StandardDS4 = "Standard_DS4", - /** StandardDS4V2 */ StandardDS4V2 = "Standard_DS4_v2", - /** StandardDS4V2Promo */ StandardDS4V2Promo = "Standard_DS4_v2_Promo", - /** StandardDS5V2 */ StandardDS5V2 = "Standard_DS5_v2", - /** StandardDS5V2Promo */ StandardDS5V2Promo = "Standard_DS5_v2_Promo", - /** StandardE16V3 */ StandardE16V3 = "Standard_E16_v3", - /** StandardE16SV3 */ StandardE16SV3 = "Standard_E16s_v3", - /** StandardE2V3 */ StandardE2V3 = "Standard_E2_v3", - /** StandardE2SV3 */ StandardE2SV3 = "Standard_E2s_v3", - /** StandardE3216SV3 */ StandardE3216SV3 = "Standard_E32-16s_v3", - /** StandardE328SV3 */ StandardE328SV3 = "Standard_E32-8s_v3", - /** StandardE32V3 */ StandardE32V3 = "Standard_E32_v3", - /** StandardE32SV3 */ StandardE32SV3 = "Standard_E32s_v3", - /** StandardE4V3 */ StandardE4V3 = "Standard_E4_v3", - /** StandardE4SV3 */ StandardE4SV3 = "Standard_E4s_v3", - /** StandardE6416SV3 */ StandardE6416SV3 = "Standard_E64-16s_v3", - /** StandardE6432SV3 */ StandardE6432SV3 = "Standard_E64-32s_v3", - /** StandardE64V3 */ StandardE64V3 = "Standard_E64_v3", - /** StandardE64SV3 */ StandardE64SV3 = "Standard_E64s_v3", - /** StandardE8V3 */ StandardE8V3 = "Standard_E8_v3", - /** StandardE8SV3 */ StandardE8SV3 = "Standard_E8s_v3", - /** StandardF1 */ StandardF1 = "Standard_F1", - /** StandardF16 */ StandardF16 = "Standard_F16", - /** StandardF16S */ StandardF16S = "Standard_F16s", - /** StandardF16SV2 */ StandardF16SV2 = "Standard_F16s_v2", - /** StandardF1S */ StandardF1S = "Standard_F1s", - /** StandardF2 */ StandardF2 = "Standard_F2", - /** StandardF2S */ StandardF2S = "Standard_F2s", - /** StandardF2SV2 */ StandardF2SV2 = "Standard_F2s_v2", - /** StandardF32SV2 */ StandardF32SV2 = "Standard_F32s_v2", - /** StandardF4 */ StandardF4 = "Standard_F4", - /** StandardF4S */ StandardF4S = "Standard_F4s", - /** StandardF4SV2 */ StandardF4SV2 = "Standard_F4s_v2", - /** StandardF64SV2 */ StandardF64SV2 = "Standard_F64s_v2", - /** StandardF72SV2 */ StandardF72SV2 = "Standard_F72s_v2", - /** StandardF8 */ StandardF8 = "Standard_F8", - /** StandardF8S */ StandardF8S = "Standard_F8s", - /** StandardF8SV2 */ StandardF8SV2 = "Standard_F8s_v2", - /** StandardG1 */ StandardG1 = "Standard_G1", - /** StandardG2 */ StandardG2 = "Standard_G2", - /** StandardG3 */ StandardG3 = "Standard_G3", - /** StandardG4 */ StandardG4 = "Standard_G4", - /** StandardG5 */ StandardG5 = "Standard_G5", - /** StandardGS1 */ StandardGS1 = "Standard_GS1", - /** StandardGS2 */ StandardGS2 = "Standard_GS2", - /** StandardGS3 */ StandardGS3 = "Standard_GS3", - /** StandardGS4 */ StandardGS4 = "Standard_GS4", - /** StandardGS44 */ StandardGS44 = "Standard_GS4-4", - /** StandardGS48 */ StandardGS48 = "Standard_GS4-8", - /** StandardGS5 */ StandardGS5 = "Standard_GS5", - /** StandardGS516 */ StandardGS516 = "Standard_GS5-16", - /** StandardGS58 */ StandardGS58 = "Standard_GS5-8", - /** StandardH16 */ StandardH16 = "Standard_H16", - /** StandardH16M */ StandardH16M = "Standard_H16m", - /** StandardH16Mr */ StandardH16Mr = "Standard_H16mr", - /** StandardH16R */ StandardH16R = "Standard_H16r", - /** StandardH8 */ StandardH8 = "Standard_H8", - /** StandardH8M */ StandardH8M = "Standard_H8m", - /** StandardL16S */ StandardL16S = "Standard_L16s", - /** StandardL32S */ StandardL32S = "Standard_L32s", - /** StandardL4S */ StandardL4S = "Standard_L4s", - /** StandardL8S */ StandardL8S = "Standard_L8s", - /** StandardM12832Ms */ StandardM12832Ms = "Standard_M128-32ms", - /** StandardM12864Ms */ StandardM12864Ms = "Standard_M128-64ms", - /** StandardM128Ms */ StandardM128Ms = "Standard_M128ms", - /** StandardM128S */ StandardM128S = "Standard_M128s", - /** StandardM6416Ms */ StandardM6416Ms = "Standard_M64-16ms", - /** StandardM6432Ms */ StandardM6432Ms = "Standard_M64-32ms", - /** StandardM64Ms */ StandardM64Ms = "Standard_M64ms", - /** StandardM64S */ StandardM64S = "Standard_M64s", - /** StandardNC12 */ StandardNC12 = "Standard_NC12", - /** StandardNC12SV2 */ StandardNC12SV2 = "Standard_NC12s_v2", - /** StandardNC12SV3 */ StandardNC12SV3 = "Standard_NC12s_v3", - /** StandardNC24 */ StandardNC24 = "Standard_NC24", - /** StandardNC24R */ StandardNC24R = "Standard_NC24r", - /** StandardNC24RsV2 */ StandardNC24RsV2 = "Standard_NC24rs_v2", - /** StandardNC24RsV3 */ StandardNC24RsV3 = "Standard_NC24rs_v3", - /** StandardNC24SV2 */ StandardNC24SV2 = "Standard_NC24s_v2", - /** StandardNC24SV3 */ StandardNC24SV3 = "Standard_NC24s_v3", - /** StandardNC6 */ StandardNC6 = "Standard_NC6", - /** StandardNC6SV2 */ StandardNC6SV2 = "Standard_NC6s_v2", - /** StandardNC6SV3 */ StandardNC6SV3 = "Standard_NC6s_v3", - /** StandardND12S */ StandardND12S = "Standard_ND12s", - /** StandardND24Rs */ StandardND24Rs = "Standard_ND24rs", - /** StandardND24S */ StandardND24S = "Standard_ND24s", - /** StandardND6S */ StandardND6S = "Standard_ND6s", - /** StandardNV12 */ StandardNV12 = "Standard_NV12", - /** StandardNV24 */ StandardNV24 = "Standard_NV24", - /** StandardNV6 */ StandardNV6 = "Standard_NV6" } @@ -2659,9 +2932,7 @@ export type ContainerServiceVMSizeTypes = string; /** Known values of {@link ContainerServiceStorageProfileTypes} that the service accepts. */ export enum KnownContainerServiceStorageProfileTypes { - /** StorageAccount */ StorageAccount = "StorageAccount", - /** ManagedDisks */ ManagedDisks = "ManagedDisks" } @@ -2790,6 +3061,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. */ @@ -2823,6 +3096,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 { @@ -2949,6 +3231,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. */ @@ -3082,6 +3366,232 @@ 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 { diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 103159a89c1e..4a0679c59b70 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,6 +652,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "hostGroupID", type: { @@ -944,21 +977,6 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }; -export const CreationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreationData", - modelProperties: { - sourceResourceId: { - serializedName: "sourceResourceId", - type: { - name: "String" - } - } - } - } -}; - export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1367,6 +1385,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 +1419,12 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { name: "String" } }, + networkPluginMode: { + serializedName: "networkPluginMode", + type: { + name: "String" + } + }, networkPolicy: { serializedName: "networkPolicy", type: { @@ -1941,6 +1987,18 @@ export const ManagedClusterAPIServerAccessProfile: coreClient.CompositeMapper = type: { name: "Boolean" } + }, + enableVnetIntegration: { + serializedName: "enableVnetIntegration", + type: { + name: "Boolean" + } + }, + subnetId: { + serializedName: "subnetId", + type: { + name: "String" + } } } } @@ -2025,6 +2083,18 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { } } }, + effectiveNoProxy: { + serializedName: "effectiveNoProxy", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, trustedCa: { serializedName: "trustedCa", type: { @@ -2053,6 +2123,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 +2220,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 +2296,13 @@ export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { name: "Composite", className: "ManagedClusterStorageProfileSnapshotController" } + }, + blobCSIDriver: { + serializedName: "blobCSIDriver", + type: { + name: "Composite", + className: "ManagedClusterStorageProfileBlobCSIDriver" + } } } } @@ -2169,6 +2318,12 @@ export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapp type: { name: "Boolean" } + }, + version: { + serializedName: "version", + type: { + name: "String" + } } } } @@ -2204,6 +2359,90 @@ export const ManagedClusterStorageProfileSnapshotController: coreClient.Composit } }; +export const ManagedClusterStorageProfileBlobCSIDriver: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterStorageProfileBlobCSIDriver", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedClusterIngressProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterIngressProfile", + modelProperties: { + webAppRouting: { + serializedName: "webAppRouting", + type: { + name: "Composite", + className: "ManagedClusterIngressProfileWebAppRouting" + } + } + } + } +}; + +export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterIngressProfileWebAppRouting", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + dnsZoneResourceId: { + serializedName: "dnsZoneResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile", + modelProperties: { + keda: { + serializedName: "keda", + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda" + } + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfileKeda: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3110,42 +3349,549 @@ export const SnapshotListResult: coreClient.CompositeMapper = { } }; -export const ContainerServiceMasterProfile: coreClient.CompositeMapper = { +export const ManagedClusterSnapshotListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerServiceMasterProfile", + className: "ManagedClusterSnapshotListResult", modelProperties: { - count: { - defaultValue: "1", - serializedName: "count", + value: { + serializedName: "value", type: { - name: "Enum", - allowedValues: [1, 3, 5] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedClusterSnapshot" + } + } } }, - dnsPrefix: { - serializedName: "dnsPrefix", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - vmSize: { - serializedName: "vmSize", - required: true, + } + } + } +}; + +export const ManagedClusterPropertiesForSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot", + modelProperties: { + kubernetesVersion: { + serializedName: "kubernetesVersion", type: { name: "String" } }, - osDiskSizeGB: { - constraints: { - InclusiveMaximum: 2048, - InclusiveMinimum: 0 - }, - serializedName: "osDiskSizeGB", + sku: { + serializedName: "sku", type: { - name: "Number" - } + 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 FleetListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Fleet" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FleetMembersListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetMembersListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FleetMember" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FleetCredentialResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetCredentialResults", + modelProperties: { + kubeconfigs: { + serializedName: "kubeconfigs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FleetCredentialResult" + } + } + } + } + } + } +}; + +export const FleetCredentialResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FleetCredentialResult", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "ByteArray" + } + } + } + } +}; + +export const ContainerServiceMasterProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerServiceMasterProfile", + modelProperties: { + count: { + defaultValue: "1", + serializedName: "count", + type: { + name: "Enum", + allowedValues: [1, 3, 5] + } + }, + dnsPrefix: { + serializedName: "dnsPrefix", + required: true, + type: { + name: "String" + } + }, + vmSize: { + serializedName: "vmSize", + required: true, + type: { + name: "String" + } + }, + osDiskSizeGB: { + constraints: { + InclusiveMaximum: 2048, + InclusiveMinimum: 0 + }, + serializedName: "osDiskSizeGB", + type: { + name: "Number" + } }, vnetSubnetID: { serializedName: "vnetSubnetID", @@ -3270,6 +4016,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 +4156,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String" } }, + messageOfTheDay: { + serializedName: "properties.messageOfTheDay", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -3482,6 +4287,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Boolean" } }, + enableCustomCATrust: { + serializedName: "properties.enableCustomCATrust", + type: { + name: "Boolean" + } + }, nodePublicIPPrefixID: { serializedName: "properties.nodePublicIPPrefixID", type: { @@ -3585,6 +4396,12 @@ export const AgentPool: coreClient.CompositeMapper = { className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "properties.capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "properties.hostGroupID", type: { @@ -3636,6 +4453,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 +4562,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterPodIdentityProfile" } }, + oidcIssuerProfile: { + serializedName: "properties.oidcIssuerProfile", + type: { + name: "Composite", + className: "ManagedClusterOidcIssuerProfile" + } + }, nodeResourceGroup: { serializedName: "properties.nodeResourceGroup", type: { @@ -3756,6 +4587,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean" } }, + enableNamespaceResources: { + serializedName: "properties.enableNamespaceResources", + type: { + name: "Boolean" + } + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -3845,11 +4682,25 @@ 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" + } } } } @@ -3938,6 +4789,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 3f8bc993672f..95d5cdb6fa82 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-06-01", + defaultValue: "2022-07-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,95 @@ 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 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 a369ccc10c2a..cef7bd8c5f6f 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -567,7 +567,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..fcd190385b25 --- /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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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..99a904618257 --- /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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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.apiVersion], + 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..d5c53c65fd5b 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -50,6 +50,7 @@ import { ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -915,6 +916,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 +1637,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1637,6 +1723,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/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..5d7cb831a154 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -39,6 +39,7 @@ import { ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -320,6 +321,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"