From 73d74165ec7c4469fd2e059b7bc6195bcb62a647 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 3 Aug 2023 03:03:03 +0000 Subject: [PATCH] CodeGen from PR 25100 in Azure/azure-rest-api-specs Merge 8678fb669f7fb2a765ec6ab532d72a846c3462cf into d3868979fd1f496c2da64add18c64f93188b3ef0 --- .../arm-containerservice/CHANGELOG.md | 17 +++ .../arm-containerservice/_meta.json | 8 +- .../arm-containerservice/package.json | 14 +- .../review/arm-containerservice.api.md | 41 ++++++ .../src/containerServiceClient.ts | 4 +- .../arm-containerservice/src/models/index.ts | 67 ++++++++- .../src/models/mappers.ts | 137 ++++++++++++++++++ .../src/models/parameters.ts | 2 +- .../arm-containerservice/test/sampleTest.ts | 43 ++++++ .../arm-containerservice/tsconfig.json | 10 +- 10 files changed, 315 insertions(+), 28 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/test/sampleTest.ts diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index d9590a047b8f..aa88c543d0cd 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,5 +1,22 @@ # Release History +## 19.2.0 (2023-08-03) + +**Features** + + - Added Interface ClusterUpgradeSettings + - Added Interface DelegatedResource + - Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + - Added Interface UpgradeOverrideSettings + - Added Type Alias NodeOSUpgradeChannel + - Interface AgentPoolUpgradeSettings has a new optional parameter drainTimeoutInMinutes + - Interface ManagedCluster has a new optional parameter upgradeSettings + - Interface ManagedClusterAutoUpgradeProfile has a new optional parameter nodeOSUpgradeChannel + - Interface ManagedClusterIdentity has a new optional parameter delegatedResources + - Interface ManagedClusterWorkloadAutoScalerProfile has a new optional parameter verticalPodAutoscaler + - Added Enum KnownNodeOSUpgradeChannel + + ## 19.1.0 (2023-07-03) **Features** diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index 10755f6694ba..5d2adb835736 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "64efc48302878a07d1d1231eaed0ca9cadfaf037", + "commit": "778e3d7445bce8ddbd8ab50e557e9f772761a21d", "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.5 --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.5" + "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 c9c9e3eec015..663b996009df 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,12 +3,12 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "19.1.0", + "version": "19.2.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.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 7b73cc5aed0b..d6adff191b50 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -211,6 +211,7 @@ export interface AgentPoolUpgradeProfilePropertiesUpgradesItem { // @public export interface AgentPoolUpgradeSettings { + drainTimeoutInMinutes?: number; maxSurge?: string; } @@ -235,6 +236,11 @@ export interface CloudErrorBody { target?: string; } +// @public +export interface ClusterUpgradeSettings { + overrideSettings?: UpgradeOverrideSettings; +} + // @public export type Code = string; @@ -340,6 +346,14 @@ export interface DateSpan { start: Date; } +// @public +export interface DelegatedResource { + location?: string; + referralResource?: string; + resourceId?: string; + tenantId?: string; +} + // @public export interface EndpointDependency { domainName?: string; @@ -532,6 +546,13 @@ export enum KnownNetworkPolicy { Cilium = "cilium" } +// @public +export enum KnownNodeOSUpgradeChannel { + NodeImage = "NodeImage", + None = "None", + Unmanaged = "Unmanaged" +} + // @public export enum KnownOSDiskType { Ephemeral = "Ephemeral", @@ -802,6 +823,7 @@ export interface ManagedCluster extends TrackedResource { sku?: ManagedClusterSKU; storageProfile?: ManagedClusterStorageProfile; supportPlan?: KubernetesSupportPlan; + upgradeSettings?: ClusterUpgradeSettings; windowsProfile?: ManagedClusterWindowsProfile; workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; } @@ -900,6 +922,7 @@ export interface ManagedClusterAPIServerAccessProfile { // @public export interface ManagedClusterAutoUpgradeProfile { + nodeOSUpgradeChannel?: NodeOSUpgradeChannel; upgradeChannel?: UpgradeChannel; } @@ -930,6 +953,9 @@ export interface ManagedClusterHttpProxyConfig { // @public export interface ManagedClusterIdentity { + delegatedResources?: { + [propertyName: string]: DelegatedResource; + }; readonly principalId?: string; readonly tenantId?: string; type?: ResourceIdentityType; @@ -1462,6 +1488,7 @@ export interface ManagedClusterWindowsProfile { // @public export interface ManagedClusterWorkloadAutoScalerProfile { keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } // @public @@ -1469,6 +1496,11 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } +// @public +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + enabled: boolean; +} + // @public (undocumented) export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly clientId?: string; @@ -1490,6 +1522,9 @@ export type NetworkPluginMode = string; // @public export type NetworkPolicy = string; +// @public +export type NodeOSUpgradeChannel = string; + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -1891,6 +1926,12 @@ export type Type = string; // @public export type UpgradeChannel = string; +// @public +export interface UpgradeOverrideSettings { + forceUpgrade?: boolean; + until?: Date; +} + // @public export interface UserAssignedIdentity { clientId?: string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 5b0cf17be7ed..9d83391c0346 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -68,7 +68,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/19.1.0`; + const packageDetails = `azsdk-js-arm-containerservice/19.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -121,7 +121,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-01"; + this.apiVersion = options.apiVersion || "2023-07-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 7b5bdc5b0e15..8d79b8cf21d1 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. @@ -292,6 +306,8 @@ export interface ManagedClusterAgentPoolProfileProperties { 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. */ @@ -664,6 +680,22 @@ export interface ManagedClusterAADProfile { export interface ManagedClusterAutoUpgradeProfile { /** For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). */ upgradeChannel?: UpgradeChannel; + /** Manner in which the OS on your nodes is updated. The default is NodeImage. */ + nodeOSUpgradeChannel?: NodeOSUpgradeChannel; +} + +/** Settings for upgrading a cluster. */ +export interface ClusterUpgradeSettings { + /** Settings for overrides. */ + overrideSettings?: UpgradeOverrideSettings; +} + +/** Settings for overrides when upgrading a cluster. */ +export interface UpgradeOverrideSettings { + /** Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution. */ + forceUpgrade?: boolean; + /** Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect. */ + until?: Date; } /** Parameters to be applied to the cluster-autoscaler when enabled */ @@ -841,6 +873,8 @@ export interface ManagedClusterStorageProfileBlobCSIDriver { export interface ManagedClusterWorkloadAutoScalerProfile { /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + /** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ + verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ @@ -849,6 +883,12 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } +/** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ +export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + /** Whether to enable VPA. Default value is false. */ + enabled: boolean; +} + /** Azure Monitor addon profiles for monitoring the managed cluster. */ export interface ManagedClusterAzureMonitorProfile { /** Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. */ @@ -1530,6 +1570,8 @@ export interface ManagedCluster extends TrackedResource { aadProfile?: ManagedClusterAADProfile; /** The auto upgrade configuration. */ autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; + /** Settings for upgrading a cluster. */ + upgradeSettings?: ClusterUpgradeSettings; /** Parameters to be applied to the cluster-autoscaler when enabled */ autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; /** The access profile for managed cluster API server. */ @@ -2193,7 +2235,7 @@ export enum KnownUpgradeChannel { Stable = "stable", /** Automatically upgrade the cluster to the latest supported patch version when it becomes available while keeping the minor version the same. 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 is upgraded to 1.17.9. */ Patch = "patch", - /** Automatically upgrade the node image to the latest version available. Microsoft provides patches and new images for image nodes frequently (usually weekly), but your running nodes won't get the new images unless you do a node image upgrade. Turning on the node-image channel will automatically update your node images whenever a new version is available. */ + /** Automatically upgrade the node image to the latest version available. Consider using nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from Kubernetes version patching */ NodeImage = "node-image", /** Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. */ None = "none" @@ -2207,11 +2249,32 @@ export enum KnownUpgradeChannel { * **rapid**: 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. \ * **stable**: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, where N is the latest supported 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 is upgraded to 1.18.6. \ * **patch**: Automatically upgrade the cluster to the latest supported patch version when it becomes available while keeping the minor version the same. 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 is upgraded to 1.17.9. \ - * **node-image**: Automatically upgrade the node image to the latest version available. Microsoft provides patches and new images for image nodes frequently (usually weekly), but your running nodes won't get the new images unless you do a node image upgrade. Turning on the node-image channel will automatically update your node images whenever a new version is available. \ + * **node-image**: Automatically upgrade the node image to the latest version available. Consider using nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from Kubernetes version patching \ * **none**: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. */ export type UpgradeChannel = string; +/** Known values of {@link NodeOSUpgradeChannel} that the service accepts. */ +export enum KnownNodeOSUpgradeChannel { + /** No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates */ + None = "None", + /** OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice */ + Unmanaged = "Unmanaged", + /** AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ + NodeImage = "NodeImage" +} + +/** + * Defines values for NodeOSUpgradeChannel. \ + * {@link KnownNodeOSUpgradeChannel} can be used interchangeably with NodeOSUpgradeChannel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates \ + * **Unmanaged**: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice \ + * **NodeImage**: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. + */ +export type NodeOSUpgradeChannel = string; + /** Known values of {@link Expander} that the service accepts. */ export enum KnownExpander { /** Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. This is useful when you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand those when there are pending pods that need a lot of those resources. */ diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 093d43927717..6764d5061399 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", @@ -743,6 +783,16 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { type: { name: "String" } + }, + drainTimeoutInMinutes: { + constraints: { + InclusiveMaximum: 1440, + InclusiveMinimum: 1 + }, + serializedName: "drainTimeoutInMinutes", + type: { + name: "Number" + } } } } @@ -943,6 +993,10 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }, netIpv4TcpkeepaliveIntvl: { + constraints: { + InclusiveMaximum: 90, + InclusiveMinimum: 10 + }, serializedName: "netIpv4TcpkeepaliveIntvl", type: { name: "Number" @@ -979,12 +1033,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" @@ -1906,6 +1968,49 @@ export const ManagedClusterAutoUpgradeProfile: coreClient.CompositeMapper = { type: { name: "String" } + }, + nodeOSUpgradeChannel: { + serializedName: "nodeOSUpgradeChannel", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterUpgradeSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterUpgradeSettings", + modelProperties: { + overrideSettings: { + serializedName: "overrideSettings", + type: { + name: "Composite", + className: "UpgradeOverrideSettings" + } + } + } + } +}; + +export const UpgradeOverrideSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpgradeOverrideSettings", + modelProperties: { + forceUpgrade: { + serializedName: "forceUpgrade", + type: { + name: "Boolean" + } + }, + until: { + serializedName: "until", + type: { + name: "DateTime" + } } } } @@ -2407,6 +2512,14 @@ export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper name: "Composite", className: "ManagedClusterWorkloadAutoScalerProfileKeda" } + }, + verticalPodAutoscaler: { + serializedName: "verticalPodAutoscaler", + type: { + name: "Composite", + className: + "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" + } } } } @@ -2428,6 +2541,23 @@ export const ManagedClusterWorkloadAutoScalerProfileKeda: coreClient.CompositeMa } }; +export const ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + export const ManagedClusterAzureMonitorProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4212,6 +4342,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterAutoUpgradeProfile" } }, + upgradeSettings: { + serializedName: "properties.upgradeSettings", + type: { + name: "Composite", + className: "ClusterUpgradeSettings" + } + }, autoScalerProfile: { serializedName: "properties.autoScalerProfile", type: { diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 49a1f9ce5d94..1454ac7a0824 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -51,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2023-07-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"