From d8cd7c35496c4cd47cdb5ec057a043ced3be9150 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 5 Aug 2020 08:12:39 +0000 Subject: [PATCH] Generated from ef362e1f672ae04861fedc2d56182f7e4608d04a [AKS] Use POST operation for node image version (#10294) --- .../arm-containerservice/package.json | 2 +- .../src/containerServiceClientContext.ts | 2 +- .../arm-containerservice/src/models/index.ts | 62 ++++++++++++++++++- .../src/models/mappers.ts | 8 +++ .../src/models/parameters.ts | 2 +- .../src/operations/managedClusters.ts | 62 +++++++++++++++++++ 6 files changed, 132 insertions(+), 6 deletions(-) diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 368825024e82..7c469888309e 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-containerservice", "author": "Microsoft Corporation", "description": "ContainerServiceClient Library with typescript type definitions for node.js and browser.", - "version": "11.0.0", + "version": "11.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts index 2c68ffc7695a..7436b6115be5 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-containerservice"; -const packageVersion = "11.0.0"; +const packageVersion = "11.1.0"; export class ContainerServiceClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; 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",