From a00a5fc8c0e218406c4cf90adeafbcaa8501e6d9 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Sat, 29 Aug 2020 03:11:16 +0000 Subject: [PATCH] Update from master --- .../arm-containerservice/src/models/index.ts | 62 ++++++++++++++++++- .../src/models/mappers.ts | 8 +++ .../src/models/parameters.ts | 2 +- .../src/operations/managedClusters.ts | 62 +++++++++++++++++++ 4 files changed, 130 insertions(+), 4 deletions(-) diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index c612a75017e4..e9b76961ba3f 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -907,8 +907,9 @@ export interface ManagedClusterAgentPoolProfileProperties { orchestratorVersion?: string; /** * Version of node image + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nodeImageVersion?: string; + readonly nodeImageVersion?: string; /** * Settings for upgrading the agentpool */ @@ -1069,8 +1070,9 @@ export interface AgentPool extends SubResource { orchestratorVersion?: string; /** * Version of node image + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nodeImageVersion?: string; + readonly nodeImageVersion?: string; /** * Settings for upgrading the agentpool */ @@ -1136,6 +1138,11 @@ export interface ManagedClusterWindowsProfile { * The administrator password to use for Windows VMs. */ adminPassword?: string; + /** + * The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + * Benefits for Windows VMs. Possible values include: 'None', 'Windows_Server' + */ + licenseType?: LicenseType; } /** @@ -1502,7 +1509,8 @@ export interface ManagedCluster extends Resource { */ enableRBAC?: boolean; /** - * (PREVIEW) Whether to enable Kubernetes Pod security policy. + * (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set + * for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. */ enablePodSecurityPolicy?: boolean; /** @@ -2009,6 +2017,14 @@ export type ScaleSetPriority = 'Spot' | 'Regular'; */ export type ScaleSetEvictionPolicy = 'Delete' | 'Deallocate'; +/** + * Defines values for LicenseType. + * Possible values include: 'None', 'Windows_Server' + * @readonly + * @enum {string} + */ +export type LicenseType = 'None' | 'Windows_Server'; + /** * Defines values for NetworkPlugin. * Possible values include: 'azure', 'kubenet' @@ -2649,6 +2665,26 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster & { }; }; +/** + * Contains response data for the upgradeNodeImageVersion operation. + */ +export type ManagedClustersUpgradeNodeImageVersionResponse = AgentPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AgentPool; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -2689,6 +2725,26 @@ export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { }; }; +/** + * Contains response data for the beginUpgradeNodeImageVersion operation. + */ +export type ManagedClustersBeginUpgradeNodeImageVersionResponse = AgentPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AgentPool; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index ba7f5fc97471..23fafe415798 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -1263,6 +1263,7 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = } }, nodeImageVersion: { + readOnly: true, serializedName: "nodeImageVersion", type: { name: "String" @@ -1464,6 +1465,7 @@ export const AgentPool: msRest.CompositeMapper = { } }, nodeImageVersion: { + readOnly: true, serializedName: "properties.nodeImageVersion", type: { name: "String" @@ -1587,6 +1589,12 @@ export const ManagedClusterWindowsProfile: msRest.CompositeMapper = { type: { name: "String" } + }, + licenseType: { + serializedName: "licenseType", + type: { + name: "String" + } } } } diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 0bf7ee17c711..cf7863ca08f0 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -72,7 +72,7 @@ export const apiVersion3: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2020-06-01', + defaultValue: '2020-07-01', type: { name: "String" } diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index f2d04b116621..e666f57fc681 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -379,6 +379,20 @@ export class ManagedClusters { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Upgrade node image version of an agent pool to the latest. + * @summary Upgrade node image version of an agent pool to the latest. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + upgradeNodeImageVersion(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpgradeNodeImageVersion(resourceGroupName,resourceName,agentPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes * version. @@ -503,6 +517,27 @@ export class ManagedClusters { options); } + /** + * Upgrade node image version of an agent pool to the latest. + * @summary Upgrade node image version of an agent pool to the latest. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpgradeNodeImageVersion(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + agentPoolName, + options + }, + beginUpgradeNodeImageVersionOperationSpec, + options); + } + /** * Gets a list of managed clusters in the specified subscription. The operation returns properties * of each managed cluster. @@ -941,6 +976,33 @@ const beginRotateClusterCertificatesOperationSpec: msRest.OperationSpec = { serializer }; +const beginUpgradeNodeImageVersionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.resourceName1, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: { + bodyMapper: Mappers.AgentPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com",