Skip to content

Commit

Permalink
Release sdk 696 (#10720)
Browse files Browse the repository at this point in the history
* Generated from ef362e1f672ae04861fedc2d56182f7e4608d04a

[AKS] Use POST operation for node image version (#10294)

* update version

Co-authored-by: SDK Automation <[email protected]>
Co-authored-by: xichen <[email protected]>
  • Loading branch information
3 people authored Sep 4, 2020
1 parent b68bf12 commit 6aea513
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sdk/containerservice/arm-containerservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.0",
"version": "11.2.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.0";
const packageVersion = "11.2.0";

export class ContainerServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -37,7 +37,7 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien
if (!options) {
options = {};
}
if(!options.userAgent) {
if (!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
Expand All @@ -51,10 +51,10 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien
this.credentials = credentials;
this.subscriptionId = subscriptionId;

if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
62 changes: 59 additions & 3 deletions sdk/containerservice/arm-containerservice/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper =
}
},
nodeImageVersion: {
readOnly: true,
serializedName: "nodeImageVersion",
type: {
name: "String"
Expand Down Expand Up @@ -1464,6 +1465,7 @@ export const AgentPool: msRest.CompositeMapper = {
}
},
nodeImageVersion: {
readOnly: true,
serializedName: "properties.nodeImageVersion",
type: {
name: "String"
Expand Down Expand Up @@ -1587,6 +1589,12 @@ export const ManagedClusterWindowsProfile: msRest.CompositeMapper = {
type: {
name: "String"
}
},
licenseType: {
serializedName: "licenseType",
type: {
name: "String"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Models.ManagedClustersUpgradeNodeImageVersionResponse>
*/
upgradeNodeImageVersion(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise<Models.ManagedClustersUpgradeNodeImageVersionResponse> {
return this.beginUpgradeNodeImageVersion(resourceGroupName,resourceName,agentPoolName,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ManagedClustersUpgradeNodeImageVersionResponse>;
}

/**
* Creates or updates a managed cluster with the specified configuration for agents and Kubernetes
* version.
Expand Down Expand Up @@ -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<msRestAzure.LROPoller>
*/
beginUpgradeNodeImageVersion(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
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.
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6aea513

Please sign in to comment.