diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index 19f0a9446185..6b54c4d357ea 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,31 +1,48 @@ # Release History -## 19.1.0-beta.1 (2023-06-12) +## 19.1.0-beta.2 (2023-06-26) **Features** - Added operation group ManagedClusterSnapshots - Added operation group TrustedAccessRoleBindings - Added operation group TrustedAccessRoles + - Added operation ManagedClusters.getMeshRevisionProfile + - Added operation ManagedClusters.getMeshUpgradeProfile + - Added operation ManagedClusters.listMeshRevisionProfiles + - Added operation ManagedClusters.listMeshUpgradeProfiles - Added Interface AbsoluteMonthlySchedule - Added Interface AgentPoolNetworkProfile + - Added Interface AgentPoolSecurityProfile - Added Interface AgentPoolWindowsProfile - Added Interface ClusterUpgradeSettings + - Added Interface CompatibleVersions - Added Interface ContainerServiceNetworkProfileKubeProxyConfig - Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - Added Interface DailySchedule - Added Interface DateSpan + - Added Interface DelegatedResource - Added Interface GuardrailsProfile - Added Interface IPTag + - Added Interface IstioCertificateAuthority - Added Interface IstioComponents + - Added Interface IstioEgressGateway - Added Interface IstioIngressGateway + - Added Interface IstioPluginCertificateAuthority - Added Interface IstioServiceMesh - Added Interface MaintenanceWindow - Added Interface ManagedClusterIngressProfile - Added Interface ManagedClusterIngressProfileWebAppRouting - Added Interface ManagedClusterNodeResourceGroupProfile - Added Interface ManagedClusterPropertiesForSnapshot + - Added Interface ManagedClusterSecurityProfileImageIntegrity - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClustersGetMeshRevisionProfileOptionalParams + - Added Interface ManagedClustersGetMeshUpgradeProfileOptionalParams + - Added Interface ManagedClustersListMeshRevisionProfilesNextOptionalParams + - Added Interface ManagedClustersListMeshRevisionProfilesOptionalParams + - Added Interface ManagedClustersListMeshUpgradeProfilesNextOptionalParams + - Added Interface ManagedClustersListMeshUpgradeProfilesOptionalParams - Added Interface ManagedClusterSnapshot - Added Interface ManagedClusterSnapshotListResult - Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams @@ -37,9 +54,17 @@ - Added Interface ManagedClusterSnapshotsListOptionalParams - Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams - Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + - Added Interface MeshRevision + - Added Interface MeshRevisionProfile + - Added Interface MeshRevisionProfileList + - Added Interface MeshRevisionProfileProperties + - Added Interface MeshUpgradeProfile + - Added Interface MeshUpgradeProfileList + - Added Interface MeshUpgradeProfileProperties - Added Interface NetworkMonitoring - Added Interface NetworkProfileForSnapshot - Added Interface PortRange + - Added Interface ProxyResource - Added Interface RelativeMonthlySchedule - Added Interface Schedule - Added Interface ServiceMeshProfile @@ -55,14 +80,22 @@ - Added Interface TrustedAccessRoleRule - Added Interface TrustedAccessRolesListNextOptionalParams - Added Interface TrustedAccessRolesListOptionalParams + - Added Interface UlimitConfig - Added Interface UpgradeOverrideSettings - Added Interface WeeklySchedule + - Added Type Alias AgentPoolSSHAccess - Added Type Alias BackendPoolType - Added Type Alias ControlledValues - Added Type Alias ControlPlaneUpgradeOverride - Added Type Alias IpvsScheduler - Added Type Alias IstioIngressGatewayMode - Added Type Alias Level + - Added Type Alias ManagedClustersGetMeshRevisionProfileResponse + - Added Type Alias ManagedClustersGetMeshUpgradeProfileResponse + - Added Type Alias ManagedClustersListMeshRevisionProfilesNextResponse + - Added Type Alias ManagedClustersListMeshRevisionProfilesResponse + - Added Type Alias ManagedClustersListMeshUpgradeProfilesNextResponse + - Added Type Alias ManagedClustersListMeshUpgradeProfilesResponse - Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse - Added Type Alias ManagedClusterSnapshotsGetResponse - Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse @@ -88,10 +121,13 @@ - Interface AgentPool has a new optional parameter enableCustomCATrust - Interface AgentPool has a new optional parameter messageOfTheDay - Interface AgentPool has a new optional parameter networkProfile + - Interface AgentPool has a new optional parameter securityProfile - Interface AgentPool has a new optional parameter windowsProfile - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface AgentPoolUpgradeSettings has a new optional parameter drainTimeoutInMinutes - Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig - Interface ContainerServiceNetworkProfile has a new optional parameter monitoring + - Interface LinuxOSConfig has a new optional parameter ulimits - Interface MaintenanceConfiguration has a new optional parameter maintenanceWindow - Interface ManagedCluster has a new optional parameter creationData - Interface ManagedCluster has a new optional parameter enableNamespaceResources @@ -104,17 +140,21 @@ - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter networkProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter securityProfile - 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 ManagedClusterAutoUpgradeProfile has a new optional parameter nodeOSUpgradeChannel - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy + - Interface ManagedClusterIdentity has a new optional parameter delegatedResources - Interface ManagedClusterLoadBalancerProfile has a new optional parameter backendPoolType - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget - Interface ManagedClusterSecurityProfile has a new optional parameter customCATrustCertificates + - Interface ManagedClusterSecurityProfile has a new optional parameter imageIntegrity - Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version - Interface ManagedClusterWorkloadAutoScalerProfile has a new optional parameter verticalPodAutoscaler + - Added Enum KnownAgentPoolSSHAccess - Added Enum KnownBackendPoolType - Added Enum KnownControlledValues - Added Enum KnownControlPlaneUpgradeOverride diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index 0ab3b516e60b..459894ca3496 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1b33e81bbdc28fcd6644a1315b8d7b1b6d030590", + "commit": "a06116a08ebebc4fd812db01a95e1feb129c68ae", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 24818b76156c..c60acbbccebd 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": "19.1.0-beta.1", + "version": "19.1.0-beta.2", "engines": { "node": ">=14.0.0" }, @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice" } \ 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 93fd18e46d0d..97fb8661d20c 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -58,6 +58,7 @@ export interface AgentPool extends SubResource { scaleDownMode?: ScaleDownMode; scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; scaleSetPriority?: ScaleSetPriority; + securityProfile?: AgentPoolSecurityProfile; spotMaxPrice?: number; tags?: { [propertyName: string]: string; @@ -156,6 +157,11 @@ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOpti // @public export type AgentPoolsDeleteResponse = AgentPoolsDeleteHeaders; +// @public +export interface AgentPoolSecurityProfile { + sshAccess?: AgentPoolSSHAccess; +} + // @public export interface AgentPoolsGetAvailableAgentPoolVersionsOptionalParams extends coreClient.OperationOptions { } @@ -191,6 +197,9 @@ export interface AgentPoolsListOptionalParams extends coreClient.OperationOption // @public export type AgentPoolsListResponse = AgentPoolListResult; +// @public +export type AgentPoolSSHAccess = string; + // @public export interface AgentPoolsUpgradeNodeImageVersionHeaders { azureAsyncOperation?: string; @@ -224,6 +233,7 @@ export interface AgentPoolUpgradeProfilePropertiesUpgradesItem { // @public export interface AgentPoolUpgradeSettings { + drainTimeoutInMinutes?: number; maxSurge?: string; } @@ -264,6 +274,14 @@ export interface ClusterUpgradeSettings { // @public export type Code = string; +// @public (undocumented) +export interface CompatibleVersions { + // (undocumented) + name?: string; + // (undocumented) + versions?: string[]; +} + // @public export type ConnectionStatus = string; @@ -395,6 +413,14 @@ export interface DateSpan { start: Date; } +// @public +export interface DelegatedResource { + location?: string; + referralResource?: string; + resourceId?: string; + tenantId?: string; +} + // @public export interface EndpointDependency { domainName?: string; @@ -450,11 +476,24 @@ export interface IPTag { // @public export type IpvsScheduler = string; +// @public +export interface IstioCertificateAuthority { + plugin?: IstioPluginCertificateAuthority; +} + // @public export interface IstioComponents { ingressGateways?: IstioIngressGateway[]; } +// @public +export interface IstioEgressGateway { + enabled: boolean; + nodeSelector?: { + [propertyName: string]: string; + }; +} + // @public export interface IstioIngressGateway { enabled: boolean; @@ -464,9 +503,20 @@ export interface IstioIngressGateway { // @public export type IstioIngressGatewayMode = string; +// @public +export interface IstioPluginCertificateAuthority { + certChainObjectName?: string; + certObjectName?: string; + keyObjectName?: string; + keyVaultId?: string; + rootCertObjectName?: string; +} + // @public export interface IstioServiceMesh { + certificateAuthority?: IstioCertificateAuthority; components?: IstioComponents; + revisions?: string[]; } // @public @@ -478,6 +528,12 @@ export enum KnownAgentPoolMode { User = "User" } +// @public +export enum KnownAgentPoolSSHAccess { + Disabled = "Disabled", + LocalUser = "LocalUser" +} + // @public export enum KnownAgentPoolType { AvailabilitySet = "AvailabilitySet", @@ -873,6 +929,7 @@ export interface LinuxOSConfig { sysctls?: SysctlConfig; transparentHugePageDefrag?: string; transparentHugePageEnabled?: string; + ulimits?: UlimitConfig; } // @public @@ -1072,6 +1129,7 @@ export interface ManagedClusterAgentPoolProfileProperties { scaleDownMode?: ScaleDownMode; scaleSetEvictionPolicy?: ScaleSetEvictionPolicy; scaleSetPriority?: ScaleSetPriority; + securityProfile?: AgentPoolSecurityProfile; spotMaxPrice?: number; tags?: { [propertyName: string]: string; @@ -1129,6 +1187,9 @@ export interface ManagedClusterHttpProxyConfig { // @public export interface ManagedClusterIdentity { + delegatedResources?: { + [propertyName: string]: DelegatedResource; + }; readonly principalId?: string; readonly tenantId?: string; type?: ResourceIdentityType; @@ -1324,6 +1385,8 @@ export interface ManagedClusters { get(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetOptionalParams): Promise; getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options?: ManagedClustersGetAccessProfileOptionalParams): Promise; getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options?: ManagedClustersGetCommandResultOptionalParams): Promise; + getMeshRevisionProfile(location: string, mode: string, options?: ManagedClustersGetMeshRevisionProfileOptionalParams): Promise; + getMeshUpgradeProfile(resourceGroupName: string, resourceName: string, mode: string, options?: ManagedClustersGetMeshUpgradeProfileOptionalParams): Promise; getOSOptions(location: string, options?: ManagedClustersGetOSOptionsOptionalParams): Promise; getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetUpgradeProfileOptionalParams): Promise; list(options?: ManagedClustersListOptionalParams): PagedAsyncIterableIterator; @@ -1332,6 +1395,8 @@ export interface ManagedClusters { listClusterMonitoringUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterMonitoringUserCredentialsOptionalParams): Promise; listClusterUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterUserCredentialsOptionalParams): Promise; listKubernetesVersions(location: string, options?: ManagedClustersListKubernetesVersionsOptionalParams): Promise; + listMeshRevisionProfiles(location: string, options?: ManagedClustersListMeshRevisionProfilesOptionalParams): PagedAsyncIterableIterator; + listMeshUpgradeProfiles(resourceGroupName: string, resourceName: string, options?: ManagedClustersListMeshUpgradeProfilesOptionalParams): PagedAsyncIterableIterator; listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; } @@ -1380,6 +1445,7 @@ export interface ManagedClusterSecurityProfile { customCATrustCertificates?: Uint8Array[]; defender?: ManagedClusterSecurityProfileDefender; imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } @@ -1401,6 +1467,11 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +// @public +export interface ManagedClusterSecurityProfileImageIntegrity { + enabled?: boolean; +} + // @public export interface ManagedClusterSecurityProfileNodeRestriction { enabled?: boolean; @@ -1436,6 +1507,20 @@ export interface ManagedClustersGetCommandResultOptionalParams extends coreClien // @public export type ManagedClustersGetCommandResultResponse = RunCommandResult; +// @public +export interface ManagedClustersGetMeshRevisionProfileOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetMeshRevisionProfileResponse = MeshRevisionProfile; + +// @public +export interface ManagedClustersGetMeshUpgradeProfileOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetMeshUpgradeProfileResponse = MeshUpgradeProfile; + // @public export interface ManagedClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -1516,6 +1601,34 @@ export interface ManagedClustersListKubernetesVersionsOptionalParams extends cor // @public export type ManagedClustersListKubernetesVersionsResponse = KubernetesVersionListResult; +// @public +export interface ManagedClustersListMeshRevisionProfilesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListMeshRevisionProfilesNextResponse = MeshRevisionProfileList; + +// @public +export interface ManagedClustersListMeshRevisionProfilesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListMeshRevisionProfilesResponse = MeshRevisionProfileList; + +// @public +export interface ManagedClustersListMeshUpgradeProfilesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListMeshUpgradeProfilesNextResponse = MeshUpgradeProfileList; + +// @public +export interface ManagedClustersListMeshUpgradeProfilesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListMeshUpgradeProfilesResponse = MeshUpgradeProfileList; + // @public export interface ManagedClustersListNextOptionalParams extends coreClient.OperationOptions { } @@ -1793,6 +1906,46 @@ export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly principalId?: string; } +// @public +export interface MeshRevision { + compatibleWith?: CompatibleVersions[]; + // (undocumented) + revision?: string; + upgrades?: string[]; +} + +// @public +export interface MeshRevisionProfile extends ProxyResource { + properties?: MeshRevisionProfileProperties; +} + +// @public +export interface MeshRevisionProfileList { + readonly nextLink?: string; + value?: MeshRevisionProfile[]; +} + +// @public +export interface MeshRevisionProfileProperties { + // (undocumented) + meshRevisions?: MeshRevision[]; +} + +// @public +export interface MeshUpgradeProfile extends ProxyResource { + properties?: MeshUpgradeProfileProperties; +} + +// @public +export interface MeshUpgradeProfileList { + readonly nextLink?: string; + value?: MeshUpgradeProfile[]; +} + +// @public +export interface MeshUpgradeProfileProperties extends MeshRevision { +} + // @public export type Mode = string; @@ -2000,6 +2153,10 @@ export interface PrivateLinkServiceConnectionState { // @public export type Protocol = string; +// @public +export interface ProxyResource extends Resource { +} + // @public export type PublicNetworkAccess = string; @@ -2345,6 +2502,12 @@ export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; // @public export type Type = string; +// @public +export interface UlimitConfig { + maxLockedMemory?: string; + noFile?: string; +} + // @public export type UpdateMode = string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 230f9b678e83..09e7a8e2c1ed 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -74,7 +74,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/19.1.0-beta.1`; + const packageDetails = `azsdk-js-arm-containerservice/19.1.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -127,7 +127,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-02-preview"; + this.apiVersion = options.apiVersion || "2023-06-02-preview"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 97f1012d50e8..eaff54293cb7 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -168,12 +168,26 @@ export interface ManagedClusterIdentity { readonly tenantId?: string; /** For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). */ type?: ResourceIdentityType; + /** The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only. */ + delegatedResources?: { [propertyName: string]: DelegatedResource }; /** The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ userAssignedIdentities?: { [propertyName: string]: ManagedServiceIdentityUserAssignedIdentitiesValue; }; } +/** Delegated resource properties - internal use only. */ +export interface DelegatedResource { + /** The ARM resource id of the delegated resource - internal use only. */ + resourceId?: string; + /** The tenant id of the delegated resource - internal use only. */ + tenantId?: string; + /** The delegation id of the referral delegation (optional) - internal use only. */ + referralResource?: string; + /** The source resource location - internal use only. */ + location?: string; +} + export interface ManagedServiceIdentityUserAssignedIdentitiesValue { /** * The principal id of user assigned identity. @@ -302,12 +316,16 @@ export interface ManagedClusterAgentPoolProfileProperties { windowsProfile?: AgentPoolWindowsProfile; /** Network-related settings of an agent pool. */ networkProfile?: AgentPoolNetworkProfile; + /** The security settings of an agent pool. */ + securityProfile?: AgentPoolSecurityProfile; } /** Settings for upgrading an agentpool */ export interface AgentPoolUpgradeSettings { /** This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade */ maxSurge?: string; + /** The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. */ + drainTimeoutInMinutes?: number; } /** See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. */ @@ -346,6 +364,8 @@ export interface LinuxOSConfig { transparentHugePageDefrag?: string; /** The size in MB of a swap file that will be created on each node. */ swapFileSizeMB?: number; + /** Ulimit settings for Linux agent nodes. */ + ulimits?: UlimitConfig; } /** Sysctl settings for Linux agent nodes. */ @@ -408,6 +428,14 @@ export interface SysctlConfig { vmVfsCachePressure?: number; } +/** Ulimit settings for Linux agent nodes */ +export interface UlimitConfig { + /** Maximum locked-in-memory address space (KB) */ + maxLockedMemory?: string; + /** Maximum number of open files */ + noFile?: 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. */ @@ -442,6 +470,12 @@ export interface PortRange { protocol?: Protocol; } +/** The security settings of an agent pool. */ +export interface AgentPoolSecurityProfile { + /** SSH access method of an agent pool. */ + sshAccess?: AgentPoolSSHAccess; +} + /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -868,6 +902,8 @@ export interface ManagedClusterSecurityProfile { workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; /** Image Cleaner settings for the security profile. */ imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + /** Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. See https://aka.ms/aks/image-integrity for how to use this feature via policy. */ + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; /** [Node Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) settings for the security profile. */ nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; /** A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust feature enabled. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority) */ @@ -914,6 +950,12 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +/** Image integrity related settings for the security profile. */ +export interface ManagedClusterSecurityProfileImageIntegrity { + /** Whether to enable image integrity. The default value is false. */ + enabled?: boolean; +} + /** Node Restriction settings for the security profile. */ export interface ManagedClusterSecurityProfileNodeRestriction { /** Whether to enable Node Restriction */ @@ -1048,6 +1090,10 @@ export interface ServiceMeshProfile { export interface IstioServiceMesh { /** Istio components configuration. */ components?: IstioComponents; + /** Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described here https://aka.ms/asm-plugin-ca */ + certificateAuthority?: IstioCertificateAuthority; + /** The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade */ + revisions?: string[]; } /** Istio components configuration. */ @@ -1064,6 +1110,26 @@ export interface IstioIngressGateway { enabled: boolean; } +/** Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described here https://aka.ms/asm-plugin-ca */ +export interface IstioCertificateAuthority { + /** Plugin certificates information for Service Mesh. */ + plugin?: IstioPluginCertificateAuthority; +} + +/** Plugin certificates information for Service Mesh. */ +export interface IstioPluginCertificateAuthority { + /** The resource ID of the Key Vault. */ + keyVaultId?: string; + /** Intermediate certificate object name in Azure Key Vault. */ + certObjectName?: string; + /** Intermediate certificate private key object name in Azure Key Vault. */ + keyObjectName?: string; + /** Root certificate object name in Azure Key Vault. */ + rootCertObjectName?: string; + /** Certificate chain object name in Azure Key Vault. */ + certChainObjectName?: string; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -1630,6 +1696,55 @@ export interface TrustedAccessRoleBindingListResult { readonly nextLink?: string; } +/** Holds an array of MeshRevisionsProfiles */ +export interface MeshRevisionProfileList { + /** Array of service mesh add-on revision profiles for all supported mesh modes. */ + value?: MeshRevisionProfile[]; + /** + * The URL to get the next set of mesh revision profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Mesh revision profile properties for a mesh */ +export interface MeshRevisionProfileProperties { + meshRevisions?: MeshRevision[]; +} + +/** Holds information on upgrades and compatibility for given major.minor mesh release. */ +export interface MeshRevision { + revision?: string; + /** List of revisions available for upgrade of a specific mesh revision */ + upgrades?: string[]; + /** List of items this revision of service mesh is compatible with, and their associated versions. */ + compatibleWith?: CompatibleVersions[]; +} + +export interface CompatibleVersions { + name?: string; + versions?: string[]; +} + +/** Holds an array of MeshUpgradeProfiles */ +export interface MeshUpgradeProfileList { + /** Array of supported service mesh add-on upgrade profiles. */ + value?: MeshUpgradeProfile[]; + /** + * The URL to get the next set of mesh upgrade profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Istio egress gateway configuration. */ +export interface IstioEgressGateway { + /** Whether to enable the egress gateway. */ + enabled: boolean; + /** NodeSelector for scheduling the egress gateway. */ + nodeSelector?: { [propertyName: string]: string }; +} + /** Profile for the container service agent pool. */ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { @@ -1662,6 +1777,9 @@ export interface TrustedAccessRoleBinding extends Resource { roles: string[]; } +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned maintenance. */ export interface MaintenanceConfiguration extends SubResource { /** @@ -1780,8 +1898,13 @@ export interface AgentPool extends SubResource { windowsProfile?: AgentPoolWindowsProfile; /** Network-related settings of an agent pool. */ networkProfile?: AgentPoolNetworkProfile; + /** The security settings of an agent pool. */ + securityProfile?: AgentPoolSecurityProfile; } +/** Mesh upgrade profile properties for a major.minor release. */ +export interface MeshUpgradeProfileProperties extends MeshRevision {} + /** Managed cluster. */ export interface ManagedCluster extends TrackedResource { /** The managed cluster SKU. */ @@ -1956,6 +2079,18 @@ export interface ManagedClusterSnapshot extends TrackedResource { readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; } +/** Mesh revision profile for a mesh. */ +export interface MeshRevisionProfile extends ProxyResource { + /** Mesh revision profile properties for a mesh */ + properties?: MeshRevisionProfileProperties; +} + +/** Upgrade profile for given mesh. */ +export interface MeshUpgradeProfile extends ProxyResource { + /** Mesh upgrade profile properties for a major.minor release. */ + properties?: MeshUpgradeProfileProperties; +} + /** Defines headers for ManagedClusters_delete operation. */ export interface ManagedClustersDeleteHeaders { /** URL to query for status of the operation. */ @@ -2365,6 +2500,24 @@ export enum KnownProtocol { */ export type Protocol = string; +/** Known values of {@link AgentPoolSSHAccess} that the service accepts. */ +export enum KnownAgentPoolSSHAccess { + /** Can SSH onto the node as a local user using private key. */ + LocalUser = "LocalUser", + /** SSH service will be turned off on the node. */ + Disabled = "Disabled" +} + +/** + * Defines values for AgentPoolSSHAccess. \ + * {@link KnownAgentPoolSSHAccess} can be used interchangeably with AgentPoolSSHAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocalUser**: Can SSH onto the node as a local user using private key. \ + * **Disabled**: SSH service will be turned off on the node. + */ +export type AgentPoolSSHAccess = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** No additional licensing is applied. */ @@ -3299,6 +3452,34 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsOptional /** Contains response data for the listOutboundNetworkDependenciesEndpoints operation. */ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersListMeshRevisionProfilesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMeshRevisionProfiles operation. */ +export type ManagedClustersListMeshRevisionProfilesResponse = MeshRevisionProfileList; + +/** Optional parameters. */ +export interface ManagedClustersGetMeshRevisionProfileOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getMeshRevisionProfile operation. */ +export type ManagedClustersGetMeshRevisionProfileResponse = MeshRevisionProfile; + +/** Optional parameters. */ +export interface ManagedClustersListMeshUpgradeProfilesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMeshUpgradeProfiles operation. */ +export type ManagedClustersListMeshUpgradeProfilesResponse = MeshUpgradeProfileList; + +/** Optional parameters. */ +export interface ManagedClustersGetMeshUpgradeProfileOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getMeshUpgradeProfile operation. */ +export type ManagedClustersGetMeshUpgradeProfileResponse = MeshUpgradeProfile; + /** Optional parameters. */ export interface ManagedClustersListNextOptionalParams extends coreClient.OperationOptions {} @@ -3320,6 +3501,20 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsNextOpti /** Contains response data for the listOutboundNetworkDependenciesEndpointsNext operation. */ export type ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersListMeshRevisionProfilesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMeshRevisionProfilesNext operation. */ +export type ManagedClustersListMeshRevisionProfilesNextResponse = MeshRevisionProfileList; + +/** Optional parameters. */ +export interface ManagedClustersListMeshUpgradeProfilesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMeshUpgradeProfilesNext operation. */ +export type ManagedClustersListMeshUpgradeProfilesNextResponse = MeshUpgradeProfileList; + /** Optional parameters. */ export interface MaintenanceConfigurationsListByManagedClusterOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index c6e27dbe23fd..cdfdbf4a8a52 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -396,6 +396,13 @@ export const ManagedClusterIdentity: coreClient.CompositeMapper = { allowedValues: ["SystemAssigned", "UserAssigned", "None"] } }, + delegatedResources: { + serializedName: "delegatedResources", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "DelegatedResource" } } + } + }, userAssignedIdentities: { serializedName: "userAssignedIdentities", type: { @@ -412,6 +419,39 @@ export const ManagedClusterIdentity: coreClient.CompositeMapper = { } }; +export const DelegatedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DelegatedResource", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + referralResource: { + serializedName: "referralResource", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const ManagedServiceIdentityUserAssignedIdentitiesValue: coreClient.CompositeMapper = { type: { name: "Composite", @@ -775,6 +815,13 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Composite", className: "AgentPoolNetworkProfile" } + }, + securityProfile: { + serializedName: "securityProfile", + type: { + name: "Composite", + className: "AgentPoolSecurityProfile" + } } } } @@ -790,6 +837,16 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { type: { name: "String" } + }, + drainTimeoutInMinutes: { + constraints: { + InclusiveMaximum: 1440, + InclusiveMinimum: 1 + }, + serializedName: "drainTimeoutInMinutes", + type: { + name: "Number" + } } } } @@ -907,6 +964,13 @@ export const LinuxOSConfig: coreClient.CompositeMapper = { type: { name: "Number" } + }, + ulimits: { + serializedName: "ulimits", + type: { + name: "Composite", + className: "UlimitConfig" + } } } } @@ -990,6 +1054,10 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }, netIpv4TcpkeepaliveIntvl: { + constraints: { + InclusiveMaximum: 90, + InclusiveMinimum: 10 + }, serializedName: "netIpv4TcpkeepaliveIntvl", type: { name: "Number" @@ -1026,12 +1094,20 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }, netNetfilterNfConntrackMax: { + constraints: { + InclusiveMaximum: 2097152, + InclusiveMinimum: 131072 + }, serializedName: "netNetfilterNfConntrackMax", type: { name: "Number" } }, netNetfilterNfConntrackBuckets: { + constraints: { + InclusiveMaximum: 524288, + InclusiveMinimum: 65536 + }, serializedName: "netNetfilterNfConntrackBuckets", type: { name: "Number" @@ -1089,6 +1165,27 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }; +export const UlimitConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UlimitConfig", + modelProperties: { + maxLockedMemory: { + serializedName: "maxLockedMemory", + type: { + name: "String" + } + }, + noFile: { + serializedName: "noFile", + type: { + name: "String" + } + } + } + } +}; + export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1204,6 +1301,21 @@ export const PortRange: coreClient.CompositeMapper = { } }; +export const AgentPoolSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolSecurityProfile", + modelProperties: { + sshAccess: { + serializedName: "sshAccess", + type: { + name: "String" + } + } + } + } +}; + export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2519,6 +2631,13 @@ export const ManagedClusterSecurityProfile: coreClient.CompositeMapper = { className: "ManagedClusterSecurityProfileImageCleaner" } }, + imageIntegrity: { + serializedName: "imageIntegrity", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity" + } + }, nodeRestriction: { serializedName: "nodeRestriction", type: { @@ -2651,6 +2770,21 @@ export const ManagedClusterSecurityProfileImageCleaner: coreClient.CompositeMapp } }; +export const ManagedClusterSecurityProfileImageIntegrity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + export const ManagedClusterSecurityProfileNodeRestriction: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3026,6 +3160,28 @@ export const IstioServiceMesh: coreClient.CompositeMapper = { name: "Composite", className: "IstioComponents" } + }, + certificateAuthority: { + serializedName: "certificateAuthority", + type: { + name: "Composite", + className: "IstioCertificateAuthority" + } + }, + revisions: { + constraints: { + MaxItems: 2, + UniqueItems: true + }, + serializedName: "revisions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -3075,6 +3231,61 @@ export const IstioIngressGateway: coreClient.CompositeMapper = { } }; +export const IstioCertificateAuthority: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IstioCertificateAuthority", + modelProperties: { + plugin: { + serializedName: "plugin", + type: { + name: "Composite", + className: "IstioPluginCertificateAuthority" + } + } + } + } +}; + +export const IstioPluginCertificateAuthority: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IstioPluginCertificateAuthority", + modelProperties: { + keyVaultId: { + serializedName: "keyVaultId", + type: { + name: "String" + } + }, + certObjectName: { + serializedName: "certObjectName", + type: { + name: "String" + } + }, + keyObjectName: { + serializedName: "keyObjectName", + type: { + name: "String" + } + }, + rootCertObjectName: { + serializedName: "rootCertObjectName", + type: { + name: "String" + } + }, + certChainObjectName: { + serializedName: "certChainObjectName", + type: { + name: "String" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4483,6 +4694,170 @@ export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { } }; +export const MeshRevisionProfileList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshRevisionProfileList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MeshRevisionProfile" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MeshRevisionProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshRevisionProfileProperties", + modelProperties: { + meshRevisions: { + serializedName: "meshRevisions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MeshRevision" + } + } + } + } + } + } +}; + +export const MeshRevision: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshRevision", + modelProperties: { + revision: { + serializedName: "revision", + type: { + name: "String" + } + }, + upgrades: { + serializedName: "upgrades", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + compatibleWith: { + serializedName: "compatibleWith", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CompatibleVersions" + } + } + } + } + } + } +}; + +export const CompatibleVersions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CompatibleVersions", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + versions: { + serializedName: "versions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MeshUpgradeProfileList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshUpgradeProfileList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MeshUpgradeProfile" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IstioEgressGateway: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IstioEgressGateway", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + nodeSelector: { + serializedName: "nodeSelector", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + export const ManagedClusterAgentPoolProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4573,6 +4948,16 @@ export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { } }; +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4932,11 +5317,28 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Composite", className: "AgentPoolNetworkProfile" } + }, + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "AgentPoolSecurityProfile" + } } } } }; +export const MeshUpgradeProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshUpgradeProfileProperties", + modelProperties: { + ...MeshRevision.type.modelProperties + } + } +}; + export const ManagedCluster: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5386,6 +5788,40 @@ export const ManagedClusterSnapshot: coreClient.CompositeMapper = { } }; +export const MeshRevisionProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshRevisionProfile", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MeshRevisionProfileProperties" + } + } + } + } +}; + +export const MeshUpgradeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshUpgradeProfile", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MeshUpgradeProfileProperties" + } + } + } + } +}; + export const ManagedClustersDeleteHeaders: 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 9876ccfb05e1..4355817452a5 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -53,7 +53,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-02-preview", + defaultValue: "2023-06-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -222,6 +222,24 @@ export const commandId: OperationURLParameter = { } }; +export const mode: OperationURLParameter = { + parameterPath: "mode", + mapper: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + ), + MaxLength: 24, + MinLength: 1 + }, + serializedName: "mode", + required: true, + type: { + name: "String" + } + } +}; + export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index 9f19bbbfa7f1..cf9ed477abd1 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -31,6 +31,14 @@ import { ManagedClustersListOutboundNetworkDependenciesEndpointsNextOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsResponse, + MeshRevisionProfile, + ManagedClustersListMeshRevisionProfilesNextOptionalParams, + ManagedClustersListMeshRevisionProfilesOptionalParams, + ManagedClustersListMeshRevisionProfilesResponse, + MeshUpgradeProfile, + ManagedClustersListMeshUpgradeProfilesNextOptionalParams, + ManagedClustersListMeshUpgradeProfilesOptionalParams, + ManagedClustersListMeshUpgradeProfilesResponse, ManagedClustersGetOSOptionsOptionalParams, ManagedClustersGetOSOptionsResponse, ManagedClustersListKubernetesVersionsOptionalParams, @@ -73,9 +81,15 @@ import { ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, ManagedClustersGetCommandResultResponse, + ManagedClustersGetMeshRevisionProfileOptionalParams, + ManagedClustersGetMeshRevisionProfileResponse, + ManagedClustersGetMeshUpgradeProfileOptionalParams, + ManagedClustersGetMeshUpgradeProfileResponse, ManagedClustersListNextResponse, ManagedClustersListByResourceGroupNextResponse, - ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse + ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse, + ManagedClustersListMeshRevisionProfilesNextResponse, + ManagedClustersListMeshUpgradeProfilesNextResponse } from "../models"; /// @@ -299,6 +313,160 @@ export class ManagedClustersImpl implements ManagedClusters { } } + /** + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and + * available upgrades + * @param location The name of Azure region. + * @param options The options parameters. + */ + public listMeshRevisionProfiles( + location: string, + options?: ManagedClustersListMeshRevisionProfilesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listMeshRevisionProfilesPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listMeshRevisionProfilesPagingPage( + location, + options, + settings + ); + } + }; + } + + private async *listMeshRevisionProfilesPagingPage( + location: string, + options?: ManagedClustersListMeshRevisionProfilesOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedClustersListMeshRevisionProfilesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listMeshRevisionProfiles(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listMeshRevisionProfilesNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listMeshRevisionProfilesPagingAll( + location: string, + options?: ManagedClustersListMeshRevisionProfilesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listMeshRevisionProfilesPagingPage( + location, + options + )) { + yield* page; + } + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public listMeshUpgradeProfiles( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersListMeshUpgradeProfilesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listMeshUpgradeProfilesPagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listMeshUpgradeProfilesPagingPage( + resourceGroupName, + resourceName, + options, + settings + ); + } + }; + } + + private async *listMeshUpgradeProfilesPagingPage( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersListMeshUpgradeProfilesOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedClustersListMeshUpgradeProfilesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listMeshUpgradeProfiles( + resourceGroupName, + resourceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listMeshUpgradeProfilesNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listMeshUpgradeProfilesPagingAll( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersListMeshUpgradeProfilesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listMeshUpgradeProfilesPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + /** * Gets supported OS options in the specified subscription. * @param location The name of Azure region. @@ -1529,6 +1697,76 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and + * available upgrades + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _listMeshRevisionProfiles( + location: string, + options?: ManagedClustersListMeshRevisionProfilesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listMeshRevisionProfilesOperationSpec + ); + } + + /** + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and + * available upgrades + * @param location The name of Azure region. + * @param mode The mode of the mesh. + * @param options The options parameters. + */ + getMeshRevisionProfile( + location: string, + mode: string, + options?: ManagedClustersGetMeshRevisionProfileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, mode, options }, + getMeshRevisionProfileOperationSpec + ); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _listMeshUpgradeProfiles( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersListMeshUpgradeProfilesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listMeshUpgradeProfilesOperationSpec + ); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @param options The options parameters. + */ + getMeshUpgradeProfile( + resourceGroupName: string, + resourceName: string, + mode: string, + options?: ManagedClustersGetMeshUpgradeProfileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, mode, options }, + getMeshUpgradeProfileOperationSpec + ); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -1582,6 +1820,44 @@ export class ManagedClustersImpl implements ManagedClusters { listOutboundNetworkDependenciesEndpointsNextOperationSpec ); } + + /** + * ListMeshRevisionProfilesNext + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the ListMeshRevisionProfiles + * method. + * @param options The options parameters. + */ + private _listMeshRevisionProfilesNext( + location: string, + nextLink: string, + options?: ManagedClustersListMeshRevisionProfilesNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listMeshRevisionProfilesNextOperationSpec + ); + } + + /** + * ListMeshUpgradeProfilesNext + * @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 ListMeshUpgradeProfiles + * method. + * @param options The options parameters. + */ + private _listMeshUpgradeProfilesNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: ManagedClustersListMeshUpgradeProfilesNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listMeshUpgradeProfilesNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -2193,6 +2469,94 @@ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.Operatio headerParameters: [Parameters.accept], serializer }; +const listMeshRevisionProfilesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshRevisionProfileList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const getMeshRevisionProfileOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshRevisionProfile + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.mode + ], + headerParameters: [Parameters.accept], + serializer +}; +const listMeshUpgradeProfilesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshUpgradeProfileList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getMeshUpgradeProfileOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshUpgradeProfile + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.mode + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -2253,3 +2617,44 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper headerParameters: [Parameters.accept], serializer }; +const listMeshRevisionProfilesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshRevisionProfileList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listMeshUpgradeProfilesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MeshUpgradeProfileList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index d336c303c4f6..7833a74a8d8e 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -14,6 +14,10 @@ import { ManagedClustersListByResourceGroupOptionalParams, OutboundEnvironmentEndpoint, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, + MeshRevisionProfile, + ManagedClustersListMeshRevisionProfilesOptionalParams, + MeshUpgradeProfile, + ManagedClustersListMeshUpgradeProfilesOptionalParams, ManagedClustersGetOSOptionsOptionalParams, ManagedClustersGetOSOptionsResponse, ManagedClustersListKubernetesVersionsOptionalParams, @@ -55,7 +59,11 @@ import { ManagedClustersRunCommandOptionalParams, ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, - ManagedClustersGetCommandResultResponse + ManagedClustersGetCommandResultResponse, + ManagedClustersGetMeshRevisionProfileOptionalParams, + ManagedClustersGetMeshRevisionProfileResponse, + ManagedClustersGetMeshUpgradeProfileOptionalParams, + ManagedClustersGetMeshUpgradeProfileResponse } from "../models"; /// @@ -89,6 +97,27 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams ): PagedAsyncIterableIterator; + /** + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and + * available upgrades + * @param location The name of Azure region. + * @param options The options parameters. + */ + listMeshRevisionProfiles( + location: string, + options?: ManagedClustersListMeshRevisionProfilesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists available upgrades for all service meshes in a specific 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. + */ + listMeshUpgradeProfiles( + resourceGroupName: string, + resourceName: string, + options?: ManagedClustersListMeshUpgradeProfilesOptionalParams + ): PagedAsyncIterableIterator; /** * Gets supported OS options in the specified subscription. * @param location The name of Azure region. @@ -522,4 +551,29 @@ export interface ManagedClusters { commandId: string, options?: ManagedClustersGetCommandResultOptionalParams ): Promise; + /** + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and + * available upgrades + * @param location The name of Azure region. + * @param mode The mode of the mesh. + * @param options The options parameters. + */ + getMeshRevisionProfile( + location: string, + mode: string, + options?: ManagedClustersGetMeshRevisionProfileOptionalParams + ): Promise; + /** + * Gets available upgrades for a service mesh in a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @param options The options parameters. + */ + getMeshUpgradeProfile( + resourceGroupName: string, + resourceName: string, + mode: string, + options?: ManagedClustersGetMeshUpgradeProfileOptionalParams + ): Promise; } 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"