diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index a6ca97a8ab03..0d79fbb8b748 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,15 +1,24 @@ # Release History + +## 19.6.0 (2023-12-11) + +**Features** -## 19.5.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface AgentPoolNetworkProfile + - Added Interface IPTag + - Added Interface PortRange + - Added Type Alias BackendPoolType + - Added Type Alias Protocol + - Interface AgentPool has a new optional parameter capacityReservationGroupID + - Interface AgentPool has a new optional parameter networkProfile + - Interface AgentPoolUpgradeSettings has a new optional parameter nodeSoakDurationInMinutes + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter networkProfile + - Interface ManagedClusterLoadBalancerProfile has a new optional parameter backendPoolType + - Added Enum KnownBackendPoolType + - Added Enum KnownProtocol + + ## 19.5.0 (2023-11-22) **Features** diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index 1dc448fa95c7..910959f0eaf1 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7ae8d80917d262746790f86c98c5191bd0ce8eff", + "commit": "c65213cf3d924a5eecd4549c58ac25784f64e2a4", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.12 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/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.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.12" + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 3056236bd8e3..29b0894446d9 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.5.1", + "version": "19.6.0", "engines": { "node": ">=18.0.0" }, @@ -107,13 +107,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 5a4c240b416a..cb61100f7b9e 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -19,6 +19,7 @@ export interface AbsoluteMonthlySchedule { // @public export interface AgentPool extends SubResource { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; @@ -36,6 +37,7 @@ export interface AgentPool extends SubResource { maxPods?: number; minCount?: number; mode?: AgentPoolMode; + networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; nodeLabels?: { [propertyName: string]: string; @@ -89,6 +91,13 @@ export interface AgentPoolListResult { // @public export type AgentPoolMode = string; +// @public +export interface AgentPoolNetworkProfile { + allowedHostPorts?: PortRange[]; + applicationSecurityGroups?: string[]; + nodePublicIPTags?: IPTag[]; +} + // @public export interface AgentPools { beginAbortLatestOperation(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsAbortLatestOperationOptionalParams): Promise, AgentPoolsAbortLatestOperationResponse>>; @@ -213,6 +222,7 @@ export interface AgentPoolUpgradeProfilePropertiesUpgradesItem { export interface AgentPoolUpgradeSettings { drainTimeoutInMinutes?: number; maxSurge?: string; + nodeSoakDurationInMinutes?: number; } // @public @@ -223,6 +233,9 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +// @public +export type BackendPoolType = string; + // @public export interface CloudError { error?: CloudErrorBody; @@ -422,6 +435,12 @@ export type GPUInstanceProfile = string; // @public export type IpFamily = string; +// @public +export interface IPTag { + ipTagType?: string; + tag?: string; +} + // @public export interface IstioCertificateAuthority { plugin?: IstioPluginCertificateAuthority; @@ -481,6 +500,12 @@ export enum KnownAgentPoolType { VirtualMachineScaleSets = "VirtualMachineScaleSets" } +// @public +export enum KnownBackendPoolType { + NodeIP = "NodeIP", + NodeIPConfiguration = "NodeIPConfiguration" +} + // @public export enum KnownCode { Running = "Running", @@ -671,6 +696,12 @@ export enum KnownPrivateEndpointConnectionProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownProtocol { + TCP = "TCP", + UDP = "UDP" +} + // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", @@ -962,6 +993,7 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; @@ -979,6 +1011,7 @@ export interface ManagedClusterAgentPoolProfileProperties { maxPods?: number; minCount?: number; mode?: AgentPoolMode; + networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; nodeLabels?: { [propertyName: string]: string; @@ -1070,6 +1103,7 @@ export interface ManagedClusterListResult { // @public export interface ManagedClusterLoadBalancerProfile { allocatedOutboundPorts?: number; + backendPoolType?: BackendPoolType; effectiveOutboundIPs?: ResourceReference[]; enableMultipleStandardLoadBalancers?: boolean; idleTimeoutInMinutes?: number; @@ -1772,6 +1806,13 @@ export interface OutboundEnvironmentEndpointCollection { // @public export type OutboundType = string; +// @public +export interface PortRange { + portEnd?: number; + portStart?: number; + protocol?: Protocol; +} + // @public export interface PowerState { code?: Code; @@ -1869,6 +1910,9 @@ export interface PrivateLinkServiceConnectionState { status?: ConnectionStatus; } +// @public +export type Protocol = string; + // @public export interface ProxyResource extends Resource { } diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 32d73b86f9c3..9c844e827f1e 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -72,7 +72,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/19.5.1`; + const packageDetails = `azsdk-js-arm-containerservice/19.6.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -125,7 +125,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-09-01"; + this.apiVersion = options.apiVersion || "2023-11-01"; 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 334efca67397..0b6024cc12ae 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -298,8 +298,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; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; } /** Settings for upgrading an agentpool */ @@ -308,6 +312,8 @@ export interface AgentPoolUpgradeSettings { 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; + /** The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes. */ + nodeSoakDurationInMinutes?: number; } /** See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. */ @@ -414,6 +420,34 @@ export interface CreationData { sourceResourceId?: string; } +/** Network settings of an agent pool. */ +export interface AgentPoolNetworkProfile { + /** IPTags of instance-level public IPs. */ + nodePublicIPTags?: IPTag[]; + /** The port ranges that are allowed to access. The specified ranges are allowed to overlap. */ + allowedHostPorts?: PortRange[]; + /** The IDs of the application security groups which agent pool will associate when created. */ + applicationSecurityGroups?: string[]; +} + +/** Contains the IPTag associated with the object. */ +export interface IPTag { + /** The IP tag type. Example: RoutingPreference. */ + ipTagType?: string; + /** The value of the IP tag associated with the public IP. Example: Internet. */ + tag?: string; +} + +/** The port range. */ +export interface PortRange { + /** The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. */ + portStart?: number; + /** The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. */ + portEnd?: number; + /** The network protocol of the port. */ + protocol?: Protocol; +} + /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -614,6 +648,8 @@ export interface ManagedClusterLoadBalancerProfile { idleTimeoutInMinutes?: number; /** Enable multiple standard load balancers per AKS cluster or not. */ enableMultipleStandardLoadBalancers?: boolean; + /** The type of the managed inbound Load Balancer BackendPool. */ + backendPoolType?: BackendPoolType; } /** Desired managed outbound IPs for the cluster load balancer. */ @@ -1734,8 +1770,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; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; } /** Mesh upgrade profile properties for a major.minor release. */ @@ -2299,6 +2339,24 @@ export enum KnownGPUInstanceProfile { */ export type GPUInstanceProfile = string; +/** Known values of {@link Protocol} that the service accepts. */ +export enum KnownProtocol { + /** TCP protocol. */ + TCP = "TCP", + /** UDP protocol. */ + UDP = "UDP" +} + +/** + * Defines values for Protocol. \ + * {@link KnownProtocol} can be used interchangeably with Protocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP protocol. \ + * **UDP**: UDP protocol. + */ +export type Protocol = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** No additional licensing is applied. */ @@ -2482,6 +2540,24 @@ export enum KnownLoadBalancerSku { */ export type LoadBalancerSku = string; +/** Known values of {@link BackendPoolType} that the service accepts. */ +export enum KnownBackendPoolType { + /** The type of the managed inbound Load Balancer BackendPool. https:\//cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. */ + NodeIPConfiguration = "NodeIPConfiguration", + /** The type of the managed inbound Load Balancer BackendPool. https:\//cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. */ + NodeIP = "NodeIP" +} + +/** + * Defines values for BackendPoolType. \ + * {@link KnownBackendPoolType} can be used interchangeably with BackendPoolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NodeIPConfiguration**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. \ + * **NodeIP**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. + */ +export type BackendPoolType = string; + /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { /** IPv4 */ diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index b8fd0e79c650..81b8ec59a0cd 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -763,11 +763,24 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "hostGroupID", type: { name: "String" } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "AgentPoolNetworkProfile" + } } } } @@ -793,6 +806,16 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { type: { name: "Number" } + }, + nodeSoakDurationInMinutes: { + constraints: { + InclusiveMaximum: 30, + InclusiveMinimum: 0 + }, + serializedName: "nodeSoakDurationInMinutes", + type: { + name: "Number" + } } } } @@ -1119,6 +1142,106 @@ export const CreationData: coreClient.CompositeMapper = { } }; +export const AgentPoolNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolNetworkProfile", + modelProperties: { + nodePublicIPTags: { + serializedName: "nodePublicIPTags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPTag" + } + } + } + }, + allowedHostPorts: { + serializedName: "allowedHostPorts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortRange" + } + } + } + }, + applicationSecurityGroups: { + serializedName: "applicationSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IPTag: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPTag", + modelProperties: { + ipTagType: { + serializedName: "ipTagType", + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + } + } + } +}; + +export const PortRange: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PortRange", + modelProperties: { + portStart: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "portStart", + type: { + name: "Number" + } + }, + portEnd: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "portEnd", + type: { + name: "Number" + } + }, + protocol: { + serializedName: "protocol", + type: { + name: "String" + } + } + } + } +}; + export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1750,6 +1873,13 @@ export const ManagedClusterLoadBalancerProfile: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + backendPoolType: { + defaultValue: "NodeIPConfiguration", + serializedName: "backendPoolType", + type: { + name: "String" + } } } } @@ -4777,11 +4907,24 @@ export const AgentPool: coreClient.CompositeMapper = { className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "properties.capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "properties.hostGroupID", type: { name: "String" } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "AgentPoolNetworkProfile" + } } } } diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 5b3c73657ee4..b2cbe9db2958 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -52,7 +52,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-09-01", + defaultValue: "2023-11-01", isConstant: true, serializedName: "api-version", type: { 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"