From 3898821a18ddb6bdf8cc3525c262ebff5d3ba427 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 30 Aug 2022 02:46:47 +0000 Subject: [PATCH] CodeGen from PR 20446 in Azure/azure-rest-api-specs Merge 176e4421d9985b4d92817faeee7fb6d544ba74b3 into f816485ae8b2c866cf18b11f0dad3d7fe1b09480 --- common/config/rush/pnpm-lock.yaml | 12 +- .../arm-containerservice/CHANGELOG.md | 121 ++ .../arm-containerservice/README.md | 2 +- .../arm-containerservice/_meta.json | 6 +- .../arm-containerservice/package.json | 14 +- .../review/arm-containerservice.api.md | 432 ++++++- .../src/containerServiceClient.ts | 61 +- .../arm-containerservice/src/models/index.ts | 655 +++++++++- .../src/models/mappers.ts | 1094 +++++++++++++++-- .../src/models/parameters.ts | 41 +- .../src/operations/agentPools.ts | 49 +- .../src/operations/guardrailsVersions.ts | 72 ++ .../src/operations/index.ts | 4 + .../src/operations/managedClusterSnapshots.ts | 447 +++++++ .../src/operations/managedClusters.ts | 153 ++- .../operations/trustedAccessRoleBindings.ts | 328 +++++ .../src/operations/trustedAccessRoles.ts | 158 +++ .../src/operationsInterfaces/agentPools.ts | 17 + .../guardrailsVersions.ts | 27 + .../src/operationsInterfaces/index.ts | 4 + .../managedClusterSnapshots.ts | 91 ++ .../operationsInterfaces/managedClusters.ts | 39 + .../trustedAccessRoleBindings.ts | 75 ++ .../trustedAccessRoles.ts | 27 + .../arm-containerservice/test/sampleTest.ts | 43 + .../arm-containerservice/tsconfig.json | 10 +- 26 files changed, 3804 insertions(+), 178 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/src/operations/guardrailsVersions.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/guardrailsVersions.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 e36dcfa835e8..1e92b020ca1b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4095,7 +4095,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220828 + typescript: 4.9.0-dev.20220829 dev: false /downlevel-dts/0.4.0: @@ -9098,8 +9098,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220828: - resolution: {integrity: sha512-XM4H+zuGTaVi+ZLpLZ6jNTTlE4t1keC6g2e4x3JztjzIHEN/RfV2NncqflIkWD39Fh7qqCckFboFqVcG7M+QuA==} + /typescript/4.9.0-dev.20220829: + resolution: {integrity: sha512-JPUwN18SBzfknl8eLExxWrNo8H98PrZMQdNTXRFYlQFv6qg56e3H/gaJn8Bmo2xz6L1vADwzbMHIp4PAWjskQw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11265,7 +11265,7 @@ packages: dev: false file:projects/arm-containerservice-1.tgz: - resolution: {integrity: sha512-4rGEnPtnnvd6qO0J7GeggMeF9J4egZJXHQETtgzbj6rOZHNs0dTicn7Mj8QEAYM572CmGeh4D53ESDWzspHXFw==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-bcLRZG3rMY4v/pB1SJf+zmJnYONUusj0KIoHG97zYcu3icnX4f6saT1lnZJMOwioPSef0NRck4mtwK+RhgdzHg==, tarball: file:projects/arm-containerservice-1.tgz} name: '@rush-temp/arm-containerservice-1' version: 0.0.0 dependencies: @@ -11285,7 +11285,7 @@ packages: rollup: 2.77.2 rollup-plugin-sourcemaps: 0.6.3_rollup@2.77.2 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' @@ -15669,7 +15669,7 @@ packages: dev: false file:projects/communication-job-router.tgz: - resolution: {integrity: sha512-kJTGc13v98By2R/RRGv8OLG+OUGpQlnEsh3awDVosiZK5hW2fr34X1S1RQEabHvPuXQt4s5qG1sikvbhovRrpA==, tarball: file:projects/communication-job-router.tgz} + resolution: {integrity: sha512-f2VzRwK94ENNXQYhHUwoDmbYDN0TOFYwlwLo3qthLuSROqb3XRi0Klw4LgqiIgQKO2NxU3nQzAeDaeVs6NegvQ==, tarball: file:projects/communication-job-router.tgz} name: '@rush-temp/communication-job-router' version: 0.0.0 dependencies: diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index c0d4180efee2..6059dfd2f3ce 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,5 +1,126 @@ # Release History +## 17.2.0-beta.1 (2022-08-30) + +**Features** + + - Added operation group GuardrailsVersions + - Added operation group ManagedClusterSnapshots + - Added operation group TrustedAccessRoleBindings + - Added operation group TrustedAccessRoles + - Added operation AgentPools.abortLatestOperation + - Added operation ManagedClusters.abortLatestOperation + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeys + - Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait + - Added Interface AgentPoolsAbortLatestOperationOptionalParams + - Added Interface AgentPoolWindowsProfile + - Added Interface ContainerServiceNetworkProfileKubeProxyConfig + - Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + - Added Interface GuardrailsProfile + - Added Interface GuardrailsVersionsListOptionalParams + - Added Interface ListGuardrailsVersionsResponse + - Added Interface ManagedClusterAzureMonitorProfile + - Added Interface ManagedClusterAzureMonitorProfileKubeStateMetrics + - Added Interface ManagedClusterAzureMonitorProfileMetrics + - Added Interface ManagedClusterIngressProfile + - Added Interface ManagedClusterIngressProfileWebAppRouting + - Added Interface ManagedClusterOidcIssuerProfile + - Added Interface ManagedClusterPropertiesForSnapshot + - Added Interface ManagedClustersAbortLatestOperationOptionalParams + - Added Interface ManagedClusterSecurityProfileImageCleaner + - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClusterSecurityProfileWorkloadIdentity + - Added Interface ManagedClusterSnapshot + - Added Interface ManagedClusterSnapshotListResult + - Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams + - Added Interface ManagedClusterSnapshotsDeleteOptionalParams + - Added Interface ManagedClusterSnapshotsGetOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupOptionalParams + - Added Interface ManagedClusterSnapshotsListNextOptionalParams + - Added Interface ManagedClusterSnapshotsListOptionalParams + - Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams + - Added Interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams + - Added Interface ManagedClusterStorageProfileBlobCSIDriver + - Added Interface ManagedClusterWorkloadAutoScalerProfile + - Added Interface ManagedClusterWorkloadAutoScalerProfileKeda + - Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + - Added Interface NetworkProfileForSnapshot + - Added Interface TrustedAccessRole + - Added Interface TrustedAccessRoleBinding + - Added Interface TrustedAccessRoleBindingListResult + - Added Interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + - Added Interface TrustedAccessRoleBindingsDeleteOptionalParams + - Added Interface TrustedAccessRoleBindingsGetOptionalParams + - Added Interface TrustedAccessRoleBindingsListNextOptionalParams + - Added Interface TrustedAccessRoleBindingsListOptionalParams + - Added Interface TrustedAccessRoleListResult + - Added Interface TrustedAccessRoleRule + - Added Interface TrustedAccessRolesListNextOptionalParams + - Added Interface TrustedAccessRolesListOptionalParams + - Added Type Alias ControlledValues + - Added Type Alias GuardrailsVersionsListResponse + - Added Type Alias IpvsScheduler + - Added Type Alias Level + - Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse + - Added Type Alias ManagedClusterSnapshotsGetResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupResponse + - Added Type Alias ManagedClusterSnapshotsListNextResponse + - Added Type Alias ManagedClusterSnapshotsListResponse + - Added Type Alias ManagedClusterSnapshotsUpdateTagsResponse + - Added Type Alias Mode + - Added Type Alias NetworkPluginMode + - Added Type Alias TrustedAccessRoleBindingProvisioningState + - Added Type Alias TrustedAccessRoleBindingsCreateOrUpdateResponse + - Added Type Alias TrustedAccessRoleBindingsGetResponse + - Added Type Alias TrustedAccessRoleBindingsListNextResponse + - Added Type Alias TrustedAccessRoleBindingsListResponse + - Added Type Alias TrustedAccessRolesListNextResponse + - Added Type Alias TrustedAccessRolesListResponse + - Added Type Alias UpdateMode + - Interface AgentPool has a new optional parameter capacityReservationGroupID + - Interface AgentPool has a new optional parameter enableCustomCATrust + - Interface AgentPool has a new optional parameter messageOfTheDay + - Interface AgentPool has a new optional parameter windowsProfile + - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig + - Interface ContainerServiceNetworkProfile has a new optional parameter networkPluginMode + - Interface ManagedCluster has a new optional parameter azureMonitorProfile + - Interface ManagedCluster has a new optional parameter creationData + - Interface ManagedCluster has a new optional parameter enableNamespaceResources + - Interface ManagedCluster has a new optional parameter ingressProfile + - Interface ManagedCluster has a new optional parameter oidcIssuerProfile + - Interface ManagedCluster has a new optional parameter workloadAutoScalerProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter windowsProfile + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter enableVnetIntegration + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId + - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy + - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ManagedClusterSecurityProfile has a new optional parameter imageCleaner + - Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction + - Interface ManagedClusterSecurityProfile has a new optional parameter workloadIdentity + - Interface ManagedClusterStorageProfile has a new optional parameter blobCSIDriver + - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version + - Class ContainerServiceClient has a new parameter guardrailsVersions + - Class ContainerServiceClient has a new parameter managedClusterSnapshots + - Class ContainerServiceClient has a new parameter trustedAccessRoleBindings + - Class ContainerServiceClient has a new parameter trustedAccessRoles + - Added Enum KnownControlledValues + - Added Enum KnownIpvsScheduler + - Added Enum KnownLevel + - Added Enum KnownMode + - Added Enum KnownNetworkPluginMode + - Added Enum KnownTrustedAccessRoleBindingProvisioningState + - Added Enum KnownUpdateMode + - Enum KnownOssku has a new value Mariner + - Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter + - Enum KnownSnapshotType has a new value ManagedCluster + + ## 17.1.0 (2022-08-25) **Features** diff --git a/sdk/containerservice/arm-containerservice/README.md b/sdk/containerservice/arm-containerservice/README.md index e82804d19418..634b51c21adf 100644 --- a/sdk/containerservice/arm-containerservice/README.md +++ b/sdk/containerservice/arm-containerservice/README.md @@ -6,7 +6,7 @@ The Container Service Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerservice) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index 2588deb9a6f9..e5d4f6bb4c20 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "df66d048c82fd136d5a15dea61c3c35bf6da9d43", + "commit": "79dd6b42517440e191cffd7b592f5ea2059e76b5", "readme": "specification/containerservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220727.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 6381f5451605..1b130981f91e 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "17.1.0", + "version": "17.2.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index 7d94ea6eaadf..9e06c51d92e4 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -13,10 +13,12 @@ import { PollOperationState } from '@azure/core-lro'; // @public export interface AgentPool extends SubResource { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; @@ -28,6 +30,7 @@ export interface AgentPool extends SubResource { linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -56,6 +59,7 @@ export interface AgentPool extends SubResource { upgradeSettings?: AgentPoolUpgradeSettings; vmSize?: string; vnetSubnetID?: string; + windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } @@ -85,6 +89,7 @@ export type AgentPoolMode = string; // @public export interface AgentPools { + abortLatestOperation(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsAbortLatestOperationOptionalParams): Promise; beginCreateOrUpdate(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise, AgentPoolsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise, void>>; @@ -97,6 +102,10 @@ export interface AgentPools { list(resourceGroupName: string, resourceName: string, options?: AgentPoolsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface AgentPoolsAbortLatestOperationOptionalParams extends coreClient.OperationOptions { +} + // @public export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -108,6 +117,7 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; // @public export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -183,6 +193,11 @@ export interface AgentPoolUpgradeSettings { maxSurge?: string; } +// @public +export interface AgentPoolWindowsProfile { + disableOutboundNat?: boolean; +} + // @public export interface AzureKeyVaultKms { enabled?: boolean; @@ -220,10 +235,14 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + guardrailsVersions: GuardrailsVersions; + // (undocumented) maintenanceConfigurations: MaintenanceConfigurations; // (undocumented) managedClusters: ManagedClusters; // (undocumented) + managedClusterSnapshots: ManagedClusterSnapshots; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -235,6 +254,10 @@ export class ContainerServiceClient extends coreClient.ServiceClient { snapshots: Snapshots; // (undocumented) subscriptionId: string; + // (undocumented) + trustedAccessRoleBindings: TrustedAccessRoleBindings; + // (undocumented) + trustedAccessRoles: TrustedAccessRoles; } // @public @@ -272,11 +295,13 @@ export interface ContainerServiceNetworkProfile { dnsServiceIP?: string; dockerBridgeCidr?: string; ipFamilies?: IpFamily[]; + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; loadBalancerProfile?: ManagedClusterLoadBalancerProfile; loadBalancerSku?: LoadBalancerSku; natGatewayProfile?: ManagedClusterNATGatewayProfile; networkMode?: NetworkMode; networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; networkPolicy?: NetworkPolicy; outboundType?: OutboundType; podCidr?: string; @@ -285,6 +310,21 @@ export interface ContainerServiceNetworkProfile { serviceCidrs?: string[]; } +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfig { + enabled?: boolean; + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + mode?: Mode; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + scheduler?: IpvsScheduler; + tcpFinTimeoutSeconds?: number; + tcpTimeoutSeconds?: number; + udpTimeoutSeconds?: number; +} + // @public export interface ContainerServiceSshConfiguration { publicKeys: ContainerServiceSshPublicKey[]; @@ -307,6 +347,9 @@ export interface ContainerServiceVMDiagnostics { // @public export type ContainerServiceVMSizeTypes = string; +// @public +export type ControlledValues = string; + // @public export type Count = 1 | 3 | 5; @@ -361,9 +404,32 @@ export type Format = string; // @public export type GPUInstanceProfile = string; +// @public +export interface GuardrailsProfile { + excludedNamespaces?: string[]; + level: Level; + readonly systemExcludedNamespaces?: string[]; + version: string; +} + +// @public +export interface GuardrailsVersions { + list(resourceGroupName: string, resourceName: string, options?: GuardrailsVersionsListOptionalParams): Promise; +} + +// @public +export interface GuardrailsVersionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GuardrailsVersionsListResponse = ListGuardrailsVersionsResponse; + // @public export type IpFamily = string; +// @public +export type IpvsScheduler = string; + // @public export type KeyVaultNetworkAccessTypes = string; @@ -577,6 +643,12 @@ export enum KnownContainerServiceVMSizeTypes { StandardNV6 = "Standard_NV6" } +// @public +export enum KnownControlledValues { + RequestsAndLimits = "RequestsAndLimits", + RequestsOnly = "RequestsOnly" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -619,6 +691,12 @@ export enum KnownIpFamily { IPv6 = "IPv6" } +// @public +export enum KnownIpvsScheduler { + LeastConnection = "LeastConnection", + RoundRobin = "RoundRobin" +} + // @public export enum KnownKeyVaultNetworkAccessTypes { Private = "Private", @@ -631,6 +709,13 @@ export enum KnownKubeletDiskType { Temporary = "Temporary" } +// @public +export enum KnownLevel { + Enforcement = "Enforcement", + Off = "Off", + Warning = "Warning" +} + // @public export enum KnownLicenseType { None = "None", @@ -662,6 +747,12 @@ export enum KnownManagedClusterSKUTier { Paid = "Paid" } +// @public +export enum KnownMode { + Iptables = "IPTABLES", + Ipvs = "IPVS" +} + // @public export enum KnownNetworkMode { Bridge = "bridge", @@ -675,6 +766,11 @@ export enum KnownNetworkPlugin { None = "none" } +// @public +export enum KnownNetworkPluginMode { + Overlay = "Overlay" +} + // @public export enum KnownNetworkPolicy { Azure = "azure", @@ -690,6 +786,7 @@ export enum KnownOSDiskType { // @public export enum KnownOssku { CBLMariner = "CBLMariner", + Mariner = "Mariner", Ubuntu = "Ubuntu", Windows2019 = "Windows2019", Windows2022 = "Windows2022" @@ -720,7 +817,8 @@ export enum KnownPrivateEndpointConnectionProvisioningState { // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" } // @public @@ -743,9 +841,26 @@ export enum KnownScaleSetPriority { // @public export enum KnownSnapshotType { + ManagedCluster = "ManagedCluster", NodePool = "NodePool" } +// @public +export enum KnownTrustedAccessRoleBindingProvisioningState { + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownUpdateMode { + Auto = "Auto", + Initial = "Initial", + Off = "Off", + Recreate = "Recreate" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -790,6 +905,9 @@ export interface KubeletConfig { // @public export type KubeletDiskType = string; +// @public +export type Level = string; + // @public export type LicenseType = string; @@ -801,6 +919,13 @@ export interface LinuxOSConfig { transparentHugePageEnabled?: string; } +// @public (undocumented) +export interface ListGuardrailsVersionsResponse { + default?: boolean; + isPreview?: boolean; + readonly version?: string; +} + // @public export type LoadBalancerSku = string; @@ -867,11 +992,14 @@ export interface ManagedCluster extends TrackedResource { apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; + azureMonitorProfile?: ManagedClusterAzureMonitorProfile; readonly azurePortalFqdn?: string; + creationData?: CreationData; readonly currentKubernetesVersion?: string; disableLocalAccounts?: boolean; diskEncryptionSetID?: string; dnsPrefix?: string; + enableNamespaceResources?: boolean; enablePodSecurityPolicy?: boolean; enableRbac?: boolean; extendedLocation?: ExtendedLocation; @@ -882,11 +1010,13 @@ export interface ManagedCluster extends TrackedResource { identityProfile?: { [propertyName: string]: UserAssignedIdentity; }; + ingressProfile?: ManagedClusterIngressProfile; kubernetesVersion?: string; linuxProfile?: ContainerServiceLinuxProfile; readonly maxAgentPools?: number; networkProfile?: ContainerServiceNetworkProfile; nodeResourceGroup?: string; + oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; podIdentityProfile?: ManagedClusterPodIdentityProfile; readonly powerState?: PowerState; readonly privateFqdn?: string; @@ -898,6 +1028,7 @@ export interface ManagedCluster extends TrackedResource { sku?: ManagedClusterSKU; storageProfile?: ManagedClusterStorageProfile; windowsProfile?: ManagedClusterWindowsProfile; + workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; } // @public @@ -937,10 +1068,12 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; @@ -952,6 +1085,7 @@ export interface ManagedClusterAgentPoolProfileProperties { linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -980,6 +1114,7 @@ export interface ManagedClusterAgentPoolProfileProperties { upgradeSettings?: AgentPoolUpgradeSettings; vmSize?: string; vnetSubnetID?: string; + windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } @@ -989,7 +1124,9 @@ export interface ManagedClusterAPIServerAccessProfile { disableRunCommand?: boolean; enablePrivateCluster?: boolean; enablePrivateClusterPublicFqdn?: boolean; + enableVnetIntegration?: boolean; privateDNSZone?: string; + subnetId?: string; } // @public @@ -997,8 +1134,26 @@ export interface ManagedClusterAutoUpgradeProfile { upgradeChannel?: UpgradeChannel; } +// @public +export interface ManagedClusterAzureMonitorProfile { + metrics?: ManagedClusterAzureMonitorProfileMetrics; +} + +// @public +export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { + metricAnnotationsAllowList?: string; + metricLabelsAllowlist?: string; +} + +// @public +export interface ManagedClusterAzureMonitorProfileMetrics { + enabled: boolean; + kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; +} + // @public export interface ManagedClusterHttpProxyConfig { + readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1015,6 +1170,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; @@ -1060,6 +1226,12 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } +// @public +export interface ManagedClusterOidcIssuerProfile { + enabled?: boolean; + readonly issuerURL?: string; +} + // @public export interface ManagedClusterPodIdentity { bindingSelector?: string; @@ -1143,8 +1315,17 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } +// @public +export interface ManagedClusterPropertiesForSnapshot { + enableRbac?: boolean; + kubernetesVersion?: string; + readonly networkProfile?: NetworkProfileForSnapshot; + sku?: ManagedClusterSKU; +} + // @public export interface ManagedClusters { + abortLatestOperation(resourceGroupName: string, resourceName: string, options?: ManagedClustersAbortLatestOperationOptionalParams): Promise; beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise, ManagedClustersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise, void>>; @@ -1155,6 +1336,8 @@ export interface ManagedClusters { beginResetServicePrincipalProfileAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedClusterServicePrincipalProfile, options?: ManagedClustersResetServicePrincipalProfileOptionalParams): Promise; beginRotateClusterCertificates(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise, void>>; beginRotateClusterCertificatesAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise; + beginRotateServiceAccountSigningKeys(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise, void>>; + beginRotateServiceAccountSigningKeysAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise; beginRunCommand(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise, ManagedClustersRunCommandResponse>>; beginRunCommandAndWait(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise; beginStart(resourceGroupName: string, resourceName: string, options?: ManagedClustersStartOptionalParams): Promise, void>>; @@ -1176,6 +1359,10 @@ export interface ManagedClusters { listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ManagedClustersAbortLatestOperationOptionalParams extends coreClient.OperationOptions { +} + // @public export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1187,6 +1374,7 @@ export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1195,6 +1383,9 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.Operatio export interface ManagedClusterSecurityProfile { azureKeyVaultKms?: AzureKeyVaultKms; defender?: ManagedClusterSecurityProfileDefender; + imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; + workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } // @public @@ -1208,6 +1399,22 @@ export interface ManagedClusterSecurityProfileDefenderSecurityMonitoring { enabled?: boolean; } +// @public +export interface ManagedClusterSecurityProfileImageCleaner { + enabled?: boolean; + intervalHours?: number; +} + +// @public +export interface ManagedClusterSecurityProfileNodeRestriction { + enabled?: boolean; +} + +// @public +export interface ManagedClusterSecurityProfileWorkloadIdentity { + enabled?: boolean; +} + // @public export interface ManagedClusterServicePrincipalProfile { clientId: string; @@ -1329,6 +1536,82 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; +// @public +export interface ManagedClusterSnapshot extends TrackedResource { + creationData?: CreationData; + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; + snapshotType?: SnapshotType; +} + +// @public +export interface ManagedClusterSnapshotListResult { + readonly nextLink?: string; + value?: ManagedClusterSnapshot[]; +} + +// @public +export interface ManagedClusterSnapshots { + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedClusterSnapshot, options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsGetOptionalParams): Promise; + list(options?: ManagedClusterSnapshotsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, resourceName: string, parameters: TagsObject, options?: ManagedClusterSnapshotsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsCreateOrUpdateResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedClusterSnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; + // @public export interface ManagedClustersResetAADProfileOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1347,6 +1630,12 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams extends updateIntervalInMs?: number; } +// @public +export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface ManagedClustersRunCommandOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1370,14 +1659,21 @@ export interface ManagedClustersStopOptionalParams extends coreClient.OperationO // @public export interface ManagedClusterStorageProfile { + blobCSIDriver?: ManagedClusterStorageProfileBlobCSIDriver; diskCSIDriver?: ManagedClusterStorageProfileDiskCSIDriver; fileCSIDriver?: ManagedClusterStorageProfileFileCSIDriver; snapshotController?: ManagedClusterStorageProfileSnapshotController; } +// @public +export interface ManagedClusterStorageProfileBlobCSIDriver { + enabled?: boolean; +} + // @public export interface ManagedClusterStorageProfileDiskCSIDriver { enabled?: boolean; + version?: string; } // @public @@ -1417,21 +1713,55 @@ export interface ManagedClusterWindowsProfile { licenseType?: LicenseType; } +// @public +export interface ManagedClusterWorkloadAutoScalerProfile { + keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + // (undocumented) + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; +} + +// @public +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + enabled: boolean; +} + +// @public (undocumented) +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + controlledValues: ControlledValues; + enabled: boolean; + updateMode: UpdateMode; +} + // @public (undocumented) export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly clientId?: string; readonly principalId?: string; } +// @public +export type Mode = string; + // @public export type NetworkMode = string; // @public export type NetworkPlugin = string; +// @public +export type NetworkPluginMode = string; + // @public export type NetworkPolicy = string; +// @public +export interface NetworkProfileForSnapshot { + loadBalancerSku?: LoadBalancerSku; + networkMode?: NetworkMode; + networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; + networkPolicy?: NetworkPolicy; +} + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -1812,6 +2142,106 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface TrustedAccessRole { + readonly name?: string; + readonly rules?: TrustedAccessRoleRule[]; + readonly sourceResourceType?: string; +} + +// @public +export interface TrustedAccessRoleBinding extends Resource { + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + roles: string[]; + sourceResourceId: string; +} + +// @public +export interface TrustedAccessRoleBindingListResult { + readonly nextLink?: string; + value?: TrustedAccessRoleBinding[]; +} + +// @public +export type TrustedAccessRoleBindingProvisioningState = string; + +// @public +export interface TrustedAccessRoleBindings { + createOrUpdate(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, trustedAccessRoleBinding: TrustedAccessRoleBinding, options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: TrustedAccessRoleBindingsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsCreateOrUpdateResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface TrustedAccessRoleBindingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsGetResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleBindingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleListResult { + readonly nextLink?: string; + readonly value?: TrustedAccessRole[]; +} + +// @public +export interface TrustedAccessRoleRule { + readonly apiGroups?: string[]; + readonly nonResourceURLs?: string[]; + readonly resourceNames?: string[]; + readonly resources?: string[]; + readonly verbs?: string[]; +} + +// @public +export interface TrustedAccessRoles { + list(location: string, options?: TrustedAccessRolesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRolesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + +// @public +export interface TrustedAccessRolesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + +// @public +export type UpdateMode = string; + // @public export type UpgradeChannel = string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 298c9e25a85f..500b5688cbe4 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -22,7 +22,11 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, - SnapshotsImpl + SnapshotsImpl, + ManagedClusterSnapshotsImpl, + TrustedAccessRolesImpl, + TrustedAccessRoleBindingsImpl, + GuardrailsVersionsImpl } from "./operations"; import { Operations, @@ -32,7 +36,11 @@ import { PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, - Snapshots + Snapshots, + ManagedClusterSnapshots, + TrustedAccessRoles, + TrustedAccessRoleBindings, + GuardrailsVersions } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -68,7 +76,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/17.1.0`; + const packageDetails = `azsdk-js-arm-containerservice/17.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -88,41 +96,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-07-01"; + this.apiVersion = options.apiVersion || "2022-08-02-preview"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); @@ -133,6 +134,10 @@ 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.guardrailsVersions = new GuardrailsVersionsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -172,4 +177,8 @@ export class ContainerServiceClient extends coreClient.ServiceClient { privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; snapshots: Snapshots; + managedClusterSnapshots: ManagedClusterSnapshots; + trustedAccessRoles: TrustedAccessRoles; + trustedAccessRoleBindings: TrustedAccessRoleBindings; + guardrailsVersions: GuardrailsVersions; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 085f1f6ac9bd..6818bd70c032 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -164,6 +164,12 @@ export interface PowerState { code?: Code; } +/** Data used when creating a target resource from a source resource. */ +export interface CreationData { + /** This is the ARM ID of the source object to be used to create the target object. */ + sourceResourceId?: string; +} + /** Properties for the container service agent pool profile. */ export interface ManagedClusterAgentPoolProfileProperties { /** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */ @@ -178,6 +184,8 @@ export interface ManagedClusterAgentPoolProfileProperties { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; + /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ + messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ @@ -186,7 +194,7 @@ export interface ManagedClusterAgentPoolProfileProperties { maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -200,10 +208,10 @@ export interface ManagedClusterAgentPoolProfileProperties { type?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; /** - * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentOrchestratorVersion?: string; @@ -225,6 +233,8 @@ export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS deploys a daemonset and host services to sync custom certificate authorities from a user-provided config map into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -255,8 +265,12 @@ export interface ManagedClusterAgentPoolProfileProperties { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; + /** The Windows agent pool's specific profile. */ + windowsProfile?: AgentPoolWindowsProfile; } /** Settings for upgrading an agentpool */ @@ -363,10 +377,10 @@ export interface SysctlConfig { vmVfsCachePressure?: number; } -/** Data used when creating a target resource from a source resource. */ -export interface CreationData { - /** This is the ARM ID of the source object to be used to create the target object. */ - sourceResourceId?: string; +/** The Windows agent pool's specific profile. */ +export interface AgentPoolWindowsProfile { + /** The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. */ + disableOutboundNat?: boolean; } /** Profile for Linux VMs in the container service cluster. */ @@ -508,10 +522,23 @@ export interface ManagedClusterPodIdentityException { podLabels: { [propertyName: string]: string }; } +/** The OIDC issuer profile of the Managed Cluster. */ +export interface ManagedClusterOidcIssuerProfile { + /** + * The OIDC issuer url of the Managed Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issuerURL?: string; + /** Whether the OIDC issuer is enabled. */ + enabled?: boolean; +} + /** Profile of network configuration. */ export interface ContainerServiceNetworkProfile { /** Network plugin used for building the Kubernetes network. */ networkPlugin?: NetworkPlugin; + /** Network plugin mode used for building the Kubernetes network. */ + networkPluginMode?: NetworkPluginMode; /** Network policy used for building the Kubernetes network. */ networkPolicy?: NetworkPolicy; /** This cannot be specified if networkPlugin is anything other than 'azure'. */ @@ -538,6 +565,8 @@ export interface ContainerServiceNetworkProfile { serviceCidrs?: string[]; /** IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. */ ipFamilies?: IpFamily[]; + /** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; } /** Profile of the managed cluster load balancer. */ @@ -600,6 +629,28 @@ export interface ManagedClusterManagedOutboundIPProfile { count?: number; } +/** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfig { + /** Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). */ + enabled?: boolean; + /** Specify which proxy mode to use ('IPTABLES' or 'IPVS') */ + mode?: Mode; + /** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; +} + +/** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + /** IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. */ + scheduler?: IpvsScheduler; + /** The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. */ + tcpTimeoutSeconds?: number; + /** The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. */ + tcpFinTimeoutSeconds?: number; + /** The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. */ + udpTimeoutSeconds?: number; +} + /** For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). */ export interface ManagedClusterAADProfile { /** Whether to enable managed AAD. */ @@ -674,6 +725,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 +758,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 +773,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 +807,26 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +/** Workload Identity settings for the security profile. */ +export interface ManagedClusterSecurityProfileWorkloadIdentity { + /** Whether to enable Workload Identity */ + enabled?: boolean; +} + +/** ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. */ +export interface ManagedClusterSecurityProfileImageCleaner { + /** Whether to enable ImageCleaner on AKS cluster. */ + enabled?: boolean; + /** ImageCleaner scanning interval. */ + intervalHours?: number; +} + +/** Node Restriction settings for the security profile. */ +export interface ManagedClusterSecurityProfileNodeRestriction { + /** Whether to enable Node Restriction */ + enabled?: boolean; +} + /** Storage profile for the container service cluster. */ export interface ManagedClusterStorageProfile { /** AzureDisk CSI Driver settings for the storage profile. */ @@ -749,12 +835,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 +859,70 @@ export interface ManagedClusterStorageProfileSnapshotController { enabled?: boolean; } +/** AzureBlob CSI Driver settings for the storage profile. */ +export interface ManagedClusterStorageProfileBlobCSIDriver { + /** Whether to enable AzureBlob CSI Driver. The default value is false. */ + enabled?: boolean; +} + +/** Ingress profile for the container service cluster. */ +export interface ManagedClusterIngressProfile { + /** Web App Routing settings for the ingress profile. */ + webAppRouting?: ManagedClusterIngressProfileWebAppRouting; +} + +/** Web App Routing settings for the ingress profile. */ +export interface ManagedClusterIngressProfileWebAppRouting { + /** Whether to enable Web App Routing. */ + enabled?: boolean; + /** Resource ID of the DNS Zone to be associated with the web app. Used only when Web App Routing is enabled. */ + dnsZoneResourceId?: string; +} + +/** Workload Auto-scaler profile for the container service cluster. */ +export interface ManagedClusterWorkloadAutoScalerProfile { + /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ + keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; +} + +/** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ +export interface ManagedClusterWorkloadAutoScalerProfileKeda { + /** Whether to enable KEDA. */ + enabled: boolean; +} + +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + /** Whether to enable VPA. Default value is false. */ + enabled: boolean; + /** Controls which resource value autoscaler will change. Default value is RequestsAndLimits. */ + controlledValues: ControlledValues; + /** Each update mode level is a superset of the lower levels. Off= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -1262,10 +1568,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 +1593,8 @@ export interface AgentPool extends SubResource { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS deploys a daemonset and host services to sync custom certificate authorities from a user-provided config map into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -1317,8 +1625,12 @@ export interface AgentPool extends SubResource { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; + /** The Windows agent pool's specific profile. */ + windowsProfile?: AgentPoolWindowsProfile; } /** Managed cluster. */ @@ -1339,15 +1651,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 +1696,16 @@ export interface ManagedCluster extends TrackedResource { addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile }; /** See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration. */ podIdentityProfile?: ManagedClusterPodIdentityProfile; + /** The OIDC issuer profile of the Managed Cluster. */ + oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; /** The name of the resource group containing agent pool nodes. */ nodeResourceGroup?: string; /** Whether to enable Kubernetes Role-Based Access Control. */ enableRbac?: boolean; /** (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. */ enablePodSecurityPolicy?: boolean; + /** The default value is false. It can be enabled/disabled on creation and updation of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. */ + enableNamespaceResources?: boolean; /** The network configuration profile. */ networkProfile?: ContainerServiceNetworkProfile; /** The Azure Active Directory configuration. */ @@ -1412,8 +1730,14 @@ export interface ManagedCluster extends TrackedResource { securityProfile?: ManagedClusterSecurityProfile; /** Storage profile for the managed cluster. */ storageProfile?: ManagedClusterStorageProfile; + /** Ingress profile for the managed cluster. */ + ingressProfile?: ManagedClusterIngressProfile; /** Allow or deny public network access for AKS */ publicNetworkAccess?: PublicNetworkAccess; + /** Workload Auto-scaler profile for the container service cluster. */ + workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; + /** Prometheus addon profile for the container service cluster */ + azureMonitorProfile?: ManagedClusterAzureMonitorProfile; } /** Managed cluster Access Profile. */ @@ -1444,7 +1768,7 @@ export interface Snapshot extends TrackedResource { */ readonly osType?: OSType; /** - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osSku?: Ossku; @@ -1460,6 +1784,19 @@ export interface Snapshot extends TrackedResource { readonly enableFips?: boolean; } +/** A managed cluster snapshot resource. */ +export interface ManagedClusterSnapshot extends TrackedResource { + /** CreationData to be used to specify the source resource ID to create this snapshot. */ + creationData?: CreationData; + /** The type of a snapshot. The default is NodePool. */ + snapshotType?: SnapshotType; + /** + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; +} + /** Defines headers for AgentPools_upgradeNodeImageVersion operation. */ export interface AgentPoolsUpgradeNodeImageVersionHeaders { /** URL to query for status of the operation. */ @@ -1610,6 +1947,8 @@ export enum KnownOssku { Ubuntu = "Ubuntu", /** CBLMariner */ CBLMariner = "CBLMariner", + /** Mariner */ + Mariner = "Mariner", /** Windows2019 */ Windows2019 = "Windows2019", /** Windows2022 */ @@ -1623,6 +1962,7 @@ export enum KnownOssku { * ### Known values supported by the service * **Ubuntu** \ * **CBLMariner** \ + * **Mariner** \ * **Windows2019** \ * **Windows2022** */ @@ -1793,7 +2133,7 @@ export enum KnownNetworkPlugin { Azure = "azure", /** Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) for more information. */ Kubenet = "kubenet", - /** No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) for more information. */ + /** Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ None = "none" } @@ -1804,10 +2144,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. */ @@ -1904,6 +2259,42 @@ export enum KnownIpFamily { */ export type IpFamily = string; +/** Known values of {@link Mode} that the service accepts. */ +export enum KnownMode { + /** IPTables proxy mode */ + Iptables = "IPTABLES", + /** IPVS proxy mode. Must be using Kubernetes version >= 1.22. */ + Ipvs = "IPVS" +} + +/** + * Defines values for Mode. \ + * {@link KnownMode} can be used interchangeably with Mode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPTABLES**: IPTables proxy mode \ + * **IPVS**: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + */ +export type Mode = string; + +/** Known values of {@link IpvsScheduler} that the service accepts. */ +export enum KnownIpvsScheduler { + /** Round Robin */ + RoundRobin = "RoundRobin", + /** Least Connection */ + LeastConnection = "LeastConnection" +} + +/** + * Defines values for IpvsScheduler. \ + * {@link KnownIpvsScheduler} can be used interchangeably with IpvsScheduler, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RoundRobin**: Round Robin \ + * **LeastConnection**: Least Connection + */ +export type IpvsScheduler = string; + /** Known values of {@link UpgradeChannel} that the service accepts. */ export enum KnownUpgradeChannel { /** Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest supported minor version, the cluster first upgrades to the latest supported patch version on N-1 minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. */ @@ -1975,10 +2366,12 @@ export type KeyVaultNetworkAccessTypes = string; /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ + /** Inbound/Outbound to the managedCluster is allowed. */ Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" + /** Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. */ + Disabled = "Disabled", + /** Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. */ + SecuredByPerimeter = "SecuredByPerimeter" } /** @@ -1986,11 +2379,54 @@ export enum KnownPublicNetworkAccess { * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled** \ - * **Disabled** + * **Enabled**: Inbound\/Outbound to the managedCluster is allowed. \ + * **Disabled**: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. \ + * **SecuredByPerimeter**: Inbound\/Outbound traffic is managed by Microsoft.Network\/NetworkSecurityPerimeters. */ export type PublicNetworkAccess = string; +/** Known values of {@link ControlledValues} that the service accepts. */ +export enum KnownControlledValues { + /** Autoscaler will control resource requests and limits. */ + RequestsAndLimits = "RequestsAndLimits", + /** Autoscaler will control resource requests only. */ + RequestsOnly = "RequestsOnly" +} + +/** + * Defines values for ControlledValues. \ + * {@link KnownControlledValues} can be used interchangeably with ControlledValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RequestsAndLimits**: Autoscaler will control resource requests and limits. \ + * **RequestsOnly**: Autoscaler will control resource requests only. + */ +export type ControlledValues = string; + +/** Known values of {@link UpdateMode} that the service accepts. */ +export enum KnownUpdateMode { + /** Autoscaler never changes pod resources but provides recommendations. */ + Off = "Off", + /** Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime of the pod. */ + Initial = "Initial", + /** Autoscaler assigns resources on pod creation and updates pods that need further scaling during their lifetime by deleting and recreating. */ + Recreate = "Recreate", + /** Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the future, it may take advantage of restart-free mechanisms once they are available. */ + Auto = "Auto" +} + +/** + * Defines values for UpdateMode. \ + * {@link KnownUpdateMode} can be used interchangeably with UpdateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off**: Autoscaler never changes pod resources but provides recommendations. \ + * **Initial**: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime of the pod. \ + * **Recreate**: Autoscaler assigns resources on pod creation and updates pods that need further scaling during their lifetime by deleting and recreating. \ + * **Auto**: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the future, it may take advantage of restart-free mechanisms once they are available. + */ +export type UpdateMode = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -2117,7 +2553,9 @@ export type ConnectionStatus = string; /** Known values of {@link SnapshotType} that the service accepts. */ export enum KnownSnapshotType { /** The snapshot is a snapshot of a node pool. */ - NodePool = "NodePool" + NodePool = "NodePool", + /** The snapshot is a snapshot of a managed cluster. */ + ManagedCluster = "ManagedCluster" } /** @@ -2125,10 +2563,35 @@ export enum KnownSnapshotType { * {@link KnownSnapshotType} can be used interchangeably with SnapshotType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NodePool**: The snapshot is a snapshot of a node pool. + * **NodePool**: The snapshot is a snapshot of a node pool. \ + * **ManagedCluster**: The snapshot is a snapshot of a managed cluster. */ export type SnapshotType = string; +/** Known values of {@link TrustedAccessRoleBindingProvisioningState} that the service accepts. */ +export enum KnownTrustedAccessRoleBindingProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for TrustedAccessRoleBindingProvisioningState. \ + * {@link KnownTrustedAccessRoleBindingProvisioningState} can be used interchangeably with TrustedAccessRoleBindingProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** + */ +export type TrustedAccessRoleBindingProvisioningState = string; + /** Known values of {@link ContainerServiceVMSizeTypes} that the service accepts. */ export enum KnownContainerServiceVMSizeTypes { /** StandardA1 */ @@ -2680,6 +3143,27 @@ export enum KnownContainerServiceStorageProfileTypes { * **ManagedDisks** */ export type ContainerServiceStorageProfileTypes = string; + +/** Known values of {@link Level} that the service accepts. */ +export enum KnownLevel { + /** Off */ + Off = "Off", + /** Warning */ + Warning = "Warning", + /** Enforcement */ + Enforcement = "Enforcement" +} + +/** + * Defines values for Level. \ + * {@link KnownLevel} can be used interchangeably with Level, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off** \ + * **Warning** \ + * **Enforcement** + */ +export type Level = string; /** Defines values for ResourceIdentityType. */ export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "None"; /** Defines values for Count. */ @@ -2796,6 +3280,8 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { + /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ + ignorePodDisruptionBudget?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -2820,6 +3306,10 @@ export interface ManagedClustersResetAADProfileOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedClustersAbortLatestOperationOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface ManagedClustersRotateClusterCertificatesOptionalParams extends coreClient.OperationOptions { @@ -2829,6 +3319,15 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ManagedClustersStopOptionalParams extends coreClient.OperationOptions { @@ -2926,6 +3425,10 @@ export interface MaintenanceConfigurationsListByManagedClusterNextOptionalParams /** Contains response data for the listByManagedClusterNext operation. */ export type MaintenanceConfigurationsListByManagedClusterNextResponse = MaintenanceConfigurationListResult; +/** Optional parameters. */ +export interface AgentPoolsAbortLatestOperationOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface AgentPoolsListOptionalParams extends coreClient.OperationOptions {} @@ -2955,6 +3458,8 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { + /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ + ignorePodDisruptionBudget?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -3088,6 +3593,112 @@ 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 GuardrailsVersionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GuardrailsVersionsListResponse = ListGuardrailsVersionsResponse; + /** 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..3c9db97d9aa2 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -352,6 +352,21 @@ export const PowerState: coreClient.CompositeMapper = { } }; +export const CreationData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreationData", + modelProperties: { + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String" + } + } + } + } +}; + export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -397,6 +412,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String" } }, + messageOfTheDay: { + serializedName: "messageOfTheDay", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -522,6 +543,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Boolean" } }, + enableCustomCATrust: { + serializedName: "enableCustomCATrust", + type: { + name: "Boolean" + } + }, nodePublicIPPrefixID: { serializedName: "nodePublicIPPrefixID", type: { @@ -625,11 +652,24 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "hostGroupID", type: { name: "String" } + }, + windowsProfile: { + serializedName: "windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile" + } } } } @@ -944,15 +984,15 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }; -export const CreationData: coreClient.CompositeMapper = { +export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreationData", + className: "AgentPoolWindowsProfile", modelProperties: { - sourceResourceId: { - serializedName: "sourceResourceId", + disableOutboundNat: { + serializedName: "disableOutboundNat", type: { - name: "String" + name: "Boolean" } } } @@ -1367,6 +1407,28 @@ export const ManagedClusterPodIdentityException: coreClient.CompositeMapper = { } }; +export const ManagedClusterOidcIssuerProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterOidcIssuerProfile", + modelProperties: { + issuerURL: { + serializedName: "issuerURL", + readOnly: true, + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1379,6 +1441,12 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { name: "String" } }, + networkPluginMode: { + serializedName: "networkPluginMode", + type: { + name: "String" + } + }, networkPolicy: { serializedName: "networkPolicy", type: { @@ -1498,6 +1566,13 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { } } } + }, + kubeProxyConfig: { + serializedName: "kubeProxyConfig", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig" + } } } } @@ -1720,6 +1795,67 @@ export const ManagedClusterManagedOutboundIPProfile: coreClient.CompositeMapper } }; +export const ContainerServiceNetworkProfileKubeProxyConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + mode: { + serializedName: "mode", + type: { + name: "String" + } + }, + ipvsConfig: { + serializedName: "ipvsConfig", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig" + } + } + } + } +}; + +export const ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + modelProperties: { + scheduler: { + serializedName: "scheduler", + type: { + name: "String" + } + }, + tcpTimeoutSeconds: { + serializedName: "tcpTimeoutSeconds", + type: { + name: "Number" + } + }, + tcpFinTimeoutSeconds: { + serializedName: "tcpFinTimeoutSeconds", + type: { + name: "Number" + } + }, + udpTimeoutSeconds: { + serializedName: "udpTimeoutSeconds", + type: { + name: "Number" + } + } + } + } +}; + export const ManagedClusterAADProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1941,6 +2077,18 @@ export const ManagedClusterAPIServerAccessProfile: coreClient.CompositeMapper = type: { name: "Boolean" } + }, + enableVnetIntegration: { + serializedName: "enableVnetIntegration", + type: { + name: "Boolean" + } + }, + subnetId: { + serializedName: "subnetId", + type: { + name: "String" + } } } } @@ -2025,6 +2173,18 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { } } }, + effectiveNoProxy: { + serializedName: "effectiveNoProxy", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, trustedCa: { serializedName: "trustedCa", type: { @@ -2053,6 +2213,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 +2310,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 +2386,13 @@ export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { name: "Composite", className: "ManagedClusterStorageProfileSnapshotController" } + }, + blobCSIDriver: { + serializedName: "blobCSIDriver", + type: { + name: "Composite", + className: "ManagedClusterStorageProfileBlobCSIDriver" + } } } } @@ -2169,6 +2408,12 @@ export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapp type: { name: "Boolean" } + }, + version: { + serializedName: "version", + type: { + name: "String" + } } } } @@ -2204,74 +2449,259 @@ export const ManagedClusterStorageProfileSnapshotController: coreClient.Composit } }; -export const Resource: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfileBlobCSIDriver: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ManagedClusterStorageProfileBlobCSIDriver", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } - }, - systemData: { - serializedName: "systemData", + } + } + } +}; + +export const ManagedClusterIngressProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterIngressProfile", + modelProperties: { + webAppRouting: { + serializedName: "webAppRouting", type: { name: "Composite", - className: "SystemData" + className: "ManagedClusterIngressProfileWebAppRouting" } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "ManagedClusterIngressProfileWebAppRouting", modelProperties: { - createdBy: { - serializedName: "createdBy", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - createdByType: { - serializedName: "createdByType", + dnsZoneResourceId: { + serializedName: "dnsZoneResourceId", type: { name: "String" } - }, - createdAt: { - serializedName: "createdAt", + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile", + modelProperties: { + keda: { + serializedName: "keda", type: { - name: "DateTime" + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + verticalPodAutoscaler: { + serializedName: "verticalPodAutoscaler", type: { - name: "String" + name: "Composite", + className: + "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfileKeda: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileKeda", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + controlledValues: { + defaultValue: "RequestsAndLimits", + serializedName: "controlledValues", + required: true, + type: { + name: "String" + } + }, + updateMode: { + defaultValue: "Off", + serializedName: "updateMode", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfile", + modelProperties: { + metrics: { + serializedName: "metrics", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileMetrics" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfileMetrics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + kubeStateMetrics: { + serializedName: "kubeStateMetrics", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileKubeStateMetrics" + } + } + } + } +}; + +export const ManagedClusterAzureMonitorProfileKubeStateMetrics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileKubeStateMetrics", + modelProperties: { + metricLabelsAllowlist: { + serializedName: "metricLabelsAllowlist", + type: { + name: "String" + } + }, + metricAnnotationsAllowList: { + serializedName: "metricAnnotationsAllowList", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } @@ -2955,9 +3385,256 @@ export const RunCommandResult: coreClient.CompositeMapper = { name: "String" } }, - reason: { - serializedName: "properties.reason", - readOnly: true, + reason: { + serializedName: "properties.reason", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + +export const EndpointDependency: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const EndpointDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + protocol: { + serializedName: "protocol", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const SnapshotListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Snapshot" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterSnapshotListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSnapshotListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedClusterSnapshot" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterPropertiesForSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot", + modelProperties: { + kubernetesVersion: { + serializedName: "kubernetesVersion", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ManagedClusterSKU" + } + }, + enableRbac: { + serializedName: "enableRbac", + type: { + name: "Boolean" + } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfileForSnapshot" + } + } + } + } +}; + +export const NetworkProfileForSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileForSnapshot", + modelProperties: { + networkPlugin: { + defaultValue: "kubenet", + serializedName: "networkPlugin", + type: { + name: "String" + } + }, + networkPluginMode: { + serializedName: "networkPluginMode", + type: { + name: "String" + } + }, + networkPolicy: { + serializedName: "networkPolicy", + type: { + name: "String" + } + }, + networkMode: { + serializedName: "networkMode", + type: { + name: "String" + } + }, + loadBalancerSku: { + serializedName: "loadBalancerSku", type: { name: "String" } @@ -2966,20 +3643,20 @@ export const RunCommandResult: coreClient.CompositeMapper = { } }; -export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { +export const TrustedAccessRoleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundEnvironmentEndpointCollection", + className: "TrustedAccessRoleListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OutboundEnvironmentEndpoint" + className: "TrustedAccessRole" } } } @@ -2995,25 +3672,34 @@ export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = } }; -export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { +export const TrustedAccessRole: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundEnvironmentEndpoint", + className: "TrustedAccessRole", modelProperties: { - category: { - serializedName: "category", + sourceResourceType: { + serializedName: "sourceResourceType", + readOnly: true, type: { name: "String" } }, - endpoints: { - serializedName: "endpoints", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + rules: { + serializedName: "rules", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "EndpointDependency" + className: "TrustedAccessRoleRule" } } } @@ -3022,70 +3708,79 @@ export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { } }; -export const EndpointDependency: coreClient.CompositeMapper = { +export const TrustedAccessRoleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EndpointDependency", + className: "TrustedAccessRoleRule", modelProperties: { - domainName: { - serializedName: "domainName", + verbs: { + serializedName: "verbs", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - endpointDetails: { - serializedName: "endpointDetails", + apiGroups: { + serializedName: "apiGroups", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "EndpointDetail" + name: "String" } } } - } - } - } -}; - -export const EndpointDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EndpointDetail", - modelProperties: { - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } }, - port: { - serializedName: "port", + resources: { + serializedName: "resources", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - protocol: { - serializedName: "protocol", + resourceNames: { + serializedName: "resourceNames", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - description: { - serializedName: "description", + nonResourceURLs: { + serializedName: "nonResourceURLs", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const SnapshotListResult: coreClient.CompositeMapper = { +export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotListResult", + className: "TrustedAccessRoleBindingListResult", modelProperties: { value: { serializedName: "value", @@ -3094,7 +3789,7 @@ export const SnapshotListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Snapshot" + className: "TrustedAccessRoleBinding" } } } @@ -3110,6 +3805,34 @@ export const SnapshotListResult: coreClient.CompositeMapper = { } }; +export const ListGuardrailsVersionsResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListGuardrailsVersionsResponse", + modelProperties: { + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + }, + isPreview: { + serializedName: "isPreview", + type: { + name: "Boolean" + } + }, + default: { + serializedName: "default", + type: { + name: "Boolean" + } + } + } + } +}; + export const ContainerServiceMasterProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3216,6 +3939,52 @@ export const ContainerServiceVMDiagnostics: coreClient.CompositeMapper = { } }; +export const GuardrailsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsProfile", + modelProperties: { + systemExcludedNamespaces: { + serializedName: "systemExcludedNamespaces", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + version: { + serializedName: "version", + required: true, + type: { + name: "String" + } + }, + level: { + serializedName: "level", + required: true, + type: { + name: "String" + } + }, + excludedNamespaces: { + serializedName: "excludedNamespaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const ManagedClusterAgentPoolProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3270,6 +4039,42 @@ 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 MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3357,6 +4162,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String" } }, + messageOfTheDay: { + serializedName: "properties.messageOfTheDay", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -3482,6 +4293,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Boolean" } }, + enableCustomCATrust: { + serializedName: "properties.enableCustomCATrust", + type: { + name: "Boolean" + } + }, nodePublicIPPrefixID: { serializedName: "properties.nodePublicIPPrefixID", type: { @@ -3585,11 +4402,24 @@ export const AgentPool: coreClient.CompositeMapper = { className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "properties.capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "properties.hostGroupID", type: { name: "String" } + }, + windowsProfile: { + serializedName: "properties.windowsProfile", + type: { + name: "Composite", + className: "AgentPoolWindowsProfile" + } } } } @@ -3636,6 +4466,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 +4575,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterPodIdentityProfile" } }, + oidcIssuerProfile: { + serializedName: "properties.oidcIssuerProfile", + type: { + name: "Composite", + className: "ManagedClusterOidcIssuerProfile" + } + }, nodeResourceGroup: { serializedName: "properties.nodeResourceGroup", type: { @@ -3756,6 +4600,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean" } }, + enableNamespaceResources: { + serializedName: "properties.enableNamespaceResources", + type: { + name: "Boolean" + } + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -3845,11 +4695,32 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterStorageProfile" } }, + ingressProfile: { + serializedName: "properties.ingressProfile", + type: { + name: "Composite", + className: "ManagedClusterIngressProfile" + } + }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { name: "String" } + }, + workloadAutoScalerProfile: { + serializedName: "properties.workloadAutoScalerProfile", + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile" + } + }, + azureMonitorProfile: { + serializedName: "properties.azureMonitorProfile", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfile" + } } } } @@ -3938,6 +4809,37 @@ export const Snapshot: coreClient.CompositeMapper = { } }; +export const ManagedClusterSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSnapshot", + modelProperties: { + ...TrackedResource.type.modelProperties, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData" + } + }, + snapshotType: { + defaultValue: "NodePool", + serializedName: "properties.snapshotType", + type: { + name: "String" + } + }, + managedClusterPropertiesReadOnly: { + serializedName: "properties.managedClusterPropertiesReadOnly", + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot" + } + } + } + } +}; + export const AgentPoolsUpgradeNodeImageVersionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index aab620d555dd..dea6b0bcb2da 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -21,7 +21,9 @@ import { AgentPool as AgentPoolMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, - Snapshot as SnapshotMapper + Snapshot as SnapshotMapper, + ManagedClusterSnapshot as ManagedClusterSnapshotMapper, + TrustedAccessRoleBinding as TrustedAccessRoleBindingMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -51,7 +53,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-07-01", + defaultValue: "2022-08-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -184,6 +186,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 +291,28 @@ 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 +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index 50127341d737..065cad18af77 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -18,6 +18,7 @@ import { AgentPool, AgentPoolsListNextOptionalParams, AgentPoolsListOptionalParams, + AgentPoolsAbortLatestOperationOptionalParams, AgentPoolsListResponse, AgentPoolsGetOptionalParams, AgentPoolsGetResponse, @@ -104,6 +105,28 @@ export class AgentPoolsImpl implements AgentPools { } } + /** + * Aborting last running operation on agent pool. We return a 204 no content code here to indicate that + * the operation has been accepted and an abort will be attempted but is not guaranteed to complete + * successfully. Please look up the provisioning state of the agent pool to keep track of whether it + * changes to Canceled. A canceled provisioning state indicates that the abort was successful + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param options The options parameters. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: AgentPoolsAbortLatestOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, options }, + abortLatestOperationOperationSpec + ); + } + /** * Gets a list of agent pools in the specified managed cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -475,6 +498,27 @@ export class AgentPoolsImpl implements AgentPools { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const abortLatestOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", @@ -567,7 +611,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerservice/arm-containerservice/src/operations/guardrailsVersions.ts b/sdk/containerservice/arm-containerservice/src/operations/guardrailsVersions.ts new file mode 100644 index 000000000000..c4a736b34c70 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/guardrailsVersions.ts @@ -0,0 +1,72 @@ +/* + * 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 { GuardrailsVersions } 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 { + GuardrailsVersionsListOptionalParams, + GuardrailsVersionsListResponse +} from "../models"; + +/** Class containing GuardrailsVersions operations. */ +export class GuardrailsVersionsImpl implements GuardrailsVersions { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class GuardrailsVersions class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List available guardrails versions. + * @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?: GuardrailsVersionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/guardrailsversions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListGuardrailsVersionsResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + 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..108d6222a4c7 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,3 +14,7 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./managedClusterSnapshots"; +export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./guardrailsVersions"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts new file mode 100644 index 000000000000..e6ac26542e18 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts @@ -0,0 +1,447 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ManagedClusterSnapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListNextOptionalParams, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsListResponse, + ManagedClusterSnapshotsListByResourceGroupResponse, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams, + ManagedClusterSnapshotsListNextResponse, + ManagedClusterSnapshotsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing ManagedClusterSnapshots operations. */ +export class ManagedClusterSnapshotsImpl implements ManagedClusterSnapshots { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class ManagedClusterSnapshots class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + public list( + options?: ManagedClusterSnapshotsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: ManagedClusterSnapshotsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: ManagedClusterSnapshotsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + private _list( + options?: ManagedClusterSnapshotsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + updateTagsOperationSpec + ); + } + + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ManagedClusterSnapshotsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot + }, + 201: { + bodyMapper: Mappers.ManagedClusterSnapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index fee316d8fce4..7366d18f574e 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -49,7 +49,9 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, + ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -831,6 +833,27 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } + /** + * Aborting last running operation on managed cluster. We return a 204 no content code here to + * indicate that the operation has been accepted and an abort will be attempted but is not guaranteed + * to complete successfully. Please look up the provisioning state of the managed cluster to keep track + * of whether it changes to Canceled. A canceled provisioning state indicates that the abort was + * successful + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + abortLatestOperationOperationSpec + ); + } + /** * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more * details about rotating managed cluster certificates. @@ -915,6 +938,88 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } + /** + * Rotates the service account signing keys of a managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + async beginRotateServiceAccountSigningKeys( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + rotateServiceAccountSigningKeysOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Rotates the service account signing keys of a managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + async beginRotateServiceAccountSigningKeysAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise { + const poller = await this.beginRotateServiceAccountSigningKeys( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + /** * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster * stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A @@ -1554,7 +1659,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1614,6 +1722,26 @@ const resetAADProfileOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const abortLatestOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", @@ -1637,6 +1765,29 @@ const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const rotateServiceAccountSigningKeysOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; const stopOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..d438aa167fb0 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { TrustedAccessRoleBindings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListNextOptionalParams, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsListResponse, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams, + TrustedAccessRoleBindingsListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoleBindings operations. */ +export class TrustedAccessRoleBindingsImpl + implements TrustedAccessRoleBindings { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoleBindings class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, resourceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, resourceName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec + ); + } + + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + getOperationSpec + ); + } + + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + deleteOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: TrustedAccessRoleBindingsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.trustedAccessRoleBinding, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts new file mode 100644 index 000000000000..f92b063034b9 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts @@ -0,0 +1,158 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { TrustedAccessRoles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + TrustedAccessRole, + TrustedAccessRolesListNextOptionalParams, + TrustedAccessRolesListOptionalParams, + TrustedAccessRolesListResponse, + TrustedAccessRolesListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoles operations. */ +export class TrustedAccessRolesImpl implements TrustedAccessRoles { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoles class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + public list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: TrustedAccessRolesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts index 4e16d6840a5d..9ef428b30853 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts @@ -11,6 +11,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { AgentPool, AgentPoolsListOptionalParams, + AgentPoolsAbortLatestOperationOptionalParams, AgentPoolsGetOptionalParams, AgentPoolsGetResponse, AgentPoolsCreateOrUpdateOptionalParams, @@ -37,6 +38,22 @@ export interface AgentPools { resourceName: string, options?: AgentPoolsListOptionalParams ): PagedAsyncIterableIterator; + /** + * Aborting last running operation on agent pool. We return a 204 no content code here to indicate that + * the operation has been accepted and an abort will be attempted but is not guaranteed to complete + * successfully. Please look up the provisioning state of the agent pool to keep track of whether it + * changes to Canceled. A canceled provisioning state indicates that the abort was successful + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param options The options parameters. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + options?: AgentPoolsAbortLatestOperationOptionalParams + ): Promise; /** * Gets the specified managed cluster agent pool. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/guardrailsVersions.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/guardrailsVersions.ts new file mode 100644 index 000000000000..b9519b146b43 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/guardrailsVersions.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 { + GuardrailsVersionsListOptionalParams, + GuardrailsVersionsListResponse +} from "../models"; + +/** Interface representing a GuardrailsVersions. */ +export interface GuardrailsVersions { + /** + * List available guardrails versions. + * @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?: GuardrailsVersionsListOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index 6d786ed8c56d..108d6222a4c7 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -14,3 +14,7 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./managedClusterSnapshots"; +export * from "./trustedAccessRoles"; +export * from "./trustedAccessRoleBindings"; +export * from "./guardrailsVersions"; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts new file mode 100644 index 000000000000..bec60709a6e4 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ManagedClusterSnapshots. */ +export interface ManagedClusterSnapshots { + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + list( + options?: ManagedClusterSnapshotsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams + ): Promise; + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams + ): Promise; + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index ff803ac9e121..46e3c9106d03 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -38,7 +38,9 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, + ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -296,6 +298,21 @@ export interface ManagedClusters { parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams ): Promise; + /** + * Aborting last running operation on managed cluster. We return a 204 no content code here to + * indicate that the operation has been accepted and an abort will be attempted but is not guaranteed + * to complete successfully. Please look up the provisioning state of the managed cluster to keep track + * of whether it changes to Canceled. A canceled provisioning state indicates that the abort was + * successful + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + abortLatestOperation( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersAbortLatestOperationOptionalParams + ): Promise; /** * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more * details about rotating managed cluster certificates. @@ -320,6 +337,28 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams ): Promise; + /** + * Rotates the service account signing keys of a managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + beginRotateServiceAccountSigningKeys( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise, void>>; + /** + * Rotates the service account signing keys of a managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + beginRotateServiceAccountSigningKeysAndWait( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams + ): Promise; /** * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster * stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..a1849299cbd5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoleBindings. */ +export interface TrustedAccessRoleBindings { + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise; + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts new file mode 100644 index 000000000000..48bad47db1b5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + TrustedAccessRole, + TrustedAccessRolesListOptionalParams +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoles. */ +export interface TrustedAccessRoles { + /** + * List supported trusted access roles. + * @param location The name of Azure region. + * @param options The options parameters. + */ + list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/containerservice/arm-containerservice/test/sampleTest.ts b/sdk/containerservice/arm-containerservice/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerservice/arm-containerservice/tsconfig.json b/sdk/containerservice/arm-containerservice/tsconfig.json index 5bad5556bbfd..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservice/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"