From 178a29386c3dfa8a1193b8b4a80eecabe4f0607e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 1 Apr 2021 04:55:21 +0000 Subject: [PATCH] CodeGen from PR 13737 in Azure/azure-rest-api-specs Merge Dev-containerservice-microsoft.containerservice-2021-03-01 API to master (#13737) * Adds base for updating Microsoft.ContainerService from version stable/2021-02-01 to version 2021-03-01 * Updates readme * Updates API version in new specs and examples * fix the top swagger offenses caused by privateLinkResources, enableCSIProxy and OSDiskSize range (#13349) Co-authored-by: Charlie Li * Add enableFIPS property to 2021-03-01 API in dev 2021-03-01 branch (#13359) * fix the top swagger offenses caused by privateLinkResources, enableCSIProxy and OSDiskSize range * Add enableFIPS property to the 2021-03-01 API * Add enableFIPS property to the 2021-03-01 API Co-authored-by: Charlie Li * adding node-image upgrade channel enum (#13375) Co-authored-by: Charlie McBride * Add httpProxyConfig specs to 2021-03-01 API - dev (#13410) * Add httpProxyConfig specs to 2021-03-01 API - dev * Fix prettier * aks: add `bindingSelector` to managed cluster pod identity profile (#13399) * AKS runCommand new feature (#13420) * runCommand target to 03-01 * fix api-version in examples * Add property disableLocalAccounts to 2021-03-01 API version (#13385) * Add property disableLocalAccounts * Fix indentation * Add OSSKU and GPUInstanceProfile to containerservice/microsoft.container API 2021-03-01 (#13532) * Add OSSKU and GPUInstanceProfile * Add sample for OSSKU and GPUInstanceProfile * Fix custom words * Reference sample files * update custom-words * Update readme for sdks (#13515) * update readme for sdks * update readme for sdks Co-authored-by: Charlie Li * Add example to create agent pool with FIPS enabled (#13557) * add example to create agent pool with FIPS enabled * change a property name in the example file Co-authored-by: Charlie Li * Added extended location parameter to managed cluster which will target all agent pools to that extended location. (#13560) * Add data model for get OS options. (#13619) * Add data model for get OS options. * Add default resource name in API path. * Fix container service tags. (#13739) Co-authored-by: Tongyao Si Co-authored-by: Charlie Li Co-authored-by: Charlie McBride <33269602+charliedmcb@users.noreply.github.com> Co-authored-by: Charlie McBride Co-authored-by: Bo Wang <61758179+bowang-666@users.noreply.github.com> Co-authored-by: hbc Co-authored-by: Haitao Chen Co-authored-by: Tony Xu Co-authored-by: Mirza Sikander Co-authored-by: Jun Sun <33297523+JunSun17@users.noreply.github.com> --- .../src/containerServiceClientContext.ts | 8 +- .../src/models/agentPoolsMappers.ts | 3 + .../arm-containerservice/src/models/index.ts | 346 +++++++++++++++- .../maintenanceConfigurationsMappers.ts | 3 + .../src/models/managedClustersMappers.ts | 7 + .../src/models/mappers.ts | 375 ++++++++++++++++-- .../src/models/parameters.ts | 32 ++ .../privateEndpointConnectionsMappers.ts | 3 + .../src/operations/managedClusters.ts | 188 +++++++++ 9 files changed, 901 insertions(+), 64 deletions(-) diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts index 6773684f92b4..3f911e3cef0b 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts @@ -37,14 +37,14 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2021-02-01'; + this.apiVersion = '2021-03-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +52,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; } } diff --git a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts index 6c85a191b95f..bd7b4fd3f556 100644 --- a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts @@ -20,6 +20,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + ExtendedLocation, KubeletConfig, LinuxOSConfig, MaintenanceConfiguration, @@ -32,6 +33,7 @@ export { ManagedClusterAgentPoolProfileProperties, ManagedClusterAPIServerAccessProfile, ManagedClusterAutoUpgradeProfile, + ManagedClusterHTTPProxyConfig, ManagedClusterIdentity, ManagedClusterIdentityUserAssignedIdentitiesValue, ManagedClusterLoadBalancerProfile, @@ -50,6 +52,7 @@ export { PowerState, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkResource, PrivateLinkServiceConnectionState, Resource, ResourceReference, diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index b16c08819f58..05b5f0887ffd 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -502,6 +502,11 @@ export interface ManagedClusterAgentPoolProfileProperties { * Possible values include: 'Linux', 'Windows'. Default value: 'Linux'. */ osType?: OSType; + /** + * OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. Possible values include: 'Ubuntu', 'CBLMariner' + */ + osSKU?: OSSKU; /** * Maximum number of nodes for auto-scaling */ @@ -604,6 +609,16 @@ export interface ManagedClusterAgentPoolProfileProperties { * Whether to enable EncryptionAtHost */ enableEncryptionAtHost?: boolean; + /** + * Whether to use FIPS enabled OS + */ + enableFIPS?: boolean; + /** + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + * Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', + * 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + */ + gpuInstanceProfile?: GPUInstanceProfile; } /** @@ -702,6 +717,11 @@ export interface AgentPool extends SubResource { * Possible values include: 'Linux', 'Windows'. Default value: 'Linux'. */ osType?: OSType; + /** + * OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. Possible values include: 'Ubuntu', 'CBLMariner' + */ + osSKU?: OSSKU; /** * Maximum number of nodes for auto-scaling */ @@ -804,6 +824,16 @@ export interface AgentPool extends SubResource { * Whether to enable EncryptionAtHost */ enableEncryptionAtHost?: boolean; + /** + * Whether to use FIPS enabled OS + */ + enableFIPS?: boolean; + /** + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + * Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', + * 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + */ + gpuInstanceProfile?: GPUInstanceProfile; } /** @@ -833,6 +863,10 @@ export interface ManagedClusterWindowsProfile { * Benefits for Windows VMs. Possible values include: 'None', 'Windows_Server' */ licenseType?: LicenseType; + /** + * Whether to enable CSI proxy. + */ + enableCSIProxy?: boolean; } /** @@ -1079,6 +1113,65 @@ export interface MaintenanceConfiguration extends SubResource { notAllowedTime?: TimeSpan[]; } +/** + * run command request + */ +export interface RunCommandRequest { + /** + * command to run. + */ + command: string; + /** + * base64 encoded zip file, contains files required by the command + */ + context?: string; + /** + * AuthToken issued for AKS AAD Server App. + */ + clusterToken?: string; +} + +/** + * run command result. + */ +export interface RunCommandResult { + /** + * command id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * provisioning State + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * exit code of the command + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exitCode?: number; + /** + * time when the command started. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startedAt?: Date; + /** + * time when the command finished. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly finishedAt?: Date; + /** + * command output. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly logs?: string; + /** + * explain why provisioningState is set to failed (if so). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reason?: string; +} + /** * Profile for diagnostics on the container service VMs. */ @@ -1169,6 +1262,10 @@ export interface ManagedClusterPodIdentity { * Namespace of the pod identity. */ namespace: string; + /** + * Binding selector to use for the AzureIdentityBinding resource. + */ + bindingSelector?: string; /** * Information of the user assigned identity. */ @@ -1265,7 +1362,8 @@ export interface ManagedClusterAADProfile { */ export interface ManagedClusterAutoUpgradeProfile { /** - * upgrade channel for auto upgrade. Possible values include: 'rapid', 'stable', 'patch', 'none' + * upgrade channel for auto upgrade. Possible values include: 'rapid', 'stable', 'patch', + * 'node-image', 'none' */ upgradeChannel?: UpgradeChannel; } @@ -1320,6 +1418,59 @@ export interface ManagedClusterAPIServerAccessProfile { export interface ManagedClusterPropertiesIdentityProfileValue extends UserAssignedIdentity { } +/** + * A private link resource + */ +export interface PrivateLinkResource { + /** + * The ID of the private link resource. + */ + id?: string; + /** + * The name of the private link resource. + */ + name?: string; + /** + * The resource type. + */ + type?: string; + /** + * The group ID of the resource. + */ + groupId?: string; + /** + * RequiredMembers of the resource + */ + requiredMembers?: string[]; + /** + * The private link service ID of the resource, this field is exposed only to NRP internally. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkServiceID?: string; +} + +/** + * Configurations for provisioning the cluster with HTTP proxy servers. + */ +export interface ManagedClusterHTTPProxyConfig { + /** + * HTTP proxy server endpoint to use. + */ + httpProxy?: string; + /** + * HTTPS proxy server endpoint to use. + */ + httpsProxy?: string; + /** + * Endpoints that should not go through proxy. + */ + noProxy?: string[]; + /** + * Alternative CA cert to use for connecting to proxy servers. + */ + trustedCa?: string; +} + /** * An interface representing ManagedClusterIdentityUserAssignedIdentitiesValue. */ @@ -1381,6 +1532,20 @@ export interface ManagedClusterSKU { tier?: ManagedClusterSKUTier; } +/** + * The complex type of the extended location. + */ +export interface ExtendedLocation { + /** + * The name of the extended location. + */ + name?: string; + /** + * The type of the extended location. Possible values include: 'EdgeZone' + */ + type?: ExtendedLocationTypes; +} + /** * Managed cluster. */ @@ -1493,6 +1658,19 @@ export interface ManagedCluster extends Resource { * Identities associated with the cluster. */ identityProfile?: { [propertyName: string]: ManagedClusterPropertiesIdentityProfileValue }; + /** + * Private link resources associated with the cluster. + */ + privateLinkResources?: PrivateLinkResource[]; + /** + * If set to true, getting static credential will be disabled for this cluster. Expected to only + * be used for AAD clusters. + */ + disableLocalAccounts?: boolean; + /** + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + httpProxyConfig?: ManagedClusterHTTPProxyConfig; /** * The identity of the managed cluster, if configured. */ @@ -1501,6 +1679,10 @@ export interface ManagedCluster extends Resource { * The managed cluster SKU. */ sku?: ManagedClusterSKU; + /** + * The extended location of the Virtual Machine. + */ + extendedLocation?: ExtendedLocation; } /** @@ -1773,44 +1955,62 @@ export interface PrivateEndpointConnectionListResult { } /** - * A private link resource + * A list of private link resources */ -export interface PrivateLinkResource { +export interface PrivateLinkResourcesListResult { /** - * The ID of the private link resource. + * The collection value. */ - id?: string; + value?: PrivateLinkResource[]; +} + +/** + * OS option property. + */ +export interface OSOptionProperty { /** - * The name of the private link resource. + * OS type. */ - name?: string; + osType: string; /** - * The resource type. + * Whether FIPS image is enabled. */ - type?: string; + enableFipsImage: boolean; +} + +/** + * The OS option profile. + */ +export interface OSOptionProfile { /** - * The group ID of the resource. + * Id of the OS option profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - groupId?: string; + readonly id?: string; /** - * RequiredMembers of the resource + * Name of the OS option profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - requiredMembers?: string[]; + readonly name?: string; /** - * The private link service ID of the resource, this field is exposed only to NRP internally. + * Type of the OS option profile. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly privateLinkServiceID?: string; + readonly type?: string; + /** + * The list of OS option properties. + */ + osOptionPropertyList: OSOptionProperty[]; } /** - * A list of private link resources + * Optional Parameters. */ -export interface PrivateLinkResourcesListResult { +export interface ManagedClustersGetOSOptionsOptionalParams extends msRest.RequestOptionsBase { /** - * The collection value. + * resource type for which the OS options needs to be returned */ - value?: PrivateLinkResource[]; + resourceType?: string; } /** @@ -1944,6 +2144,14 @@ export type KubeletDiskType = 'OS' | 'Temporary'; */ export type OSType = 'Linux' | 'Windows'; +/** + * Defines values for OSSKU. + * Possible values include: 'Ubuntu', 'CBLMariner' + * @readonly + * @enum {string} + */ +export type OSSKU = 'Ubuntu' | 'CBLMariner'; + /** * Defines values for AgentPoolType. * Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' @@ -1984,6 +2192,14 @@ export type ScaleSetPriority = 'Spot' | 'Regular'; */ export type ScaleSetEvictionPolicy = 'Delete' | 'Deallocate'; +/** + * Defines values for GPUInstanceProfile. + * Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + * @readonly + * @enum {string} + */ +export type GPUInstanceProfile = 'MIG1g' | 'MIG2g' | 'MIG3g' | 'MIG4g' | 'MIG7g'; + /** * Defines values for LicenseType. * Possible values include: 'None', 'Windows_Server' @@ -2059,11 +2275,11 @@ export type ManagedClusterPodIdentityProvisioningState = 'Assigned' | 'Updating' /** * Defines values for UpgradeChannel. - * Possible values include: 'rapid', 'stable', 'patch', 'none' + * Possible values include: 'rapid', 'stable', 'patch', 'node-image', 'none' * @readonly * @enum {string} */ -export type UpgradeChannel = 'rapid' | 'stable' | 'patch' | 'none'; +export type UpgradeChannel = 'rapid' | 'stable' | 'patch' | 'node-image' | 'none'; /** * Defines values for Expander. @@ -2097,6 +2313,14 @@ export type ManagedClusterSKUName = 'Basic'; */ export type ManagedClusterSKUTier = 'Paid' | 'Free'; +/** + * Defines values for ExtendedLocationTypes. + * Possible values include: 'EdgeZone' + * @readonly + * @enum {string} + */ +export type ExtendedLocationTypes = 'EdgeZone'; + /** * Defines values for PrivateEndpointConnectionProvisioningState. * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' @@ -2133,6 +2357,26 @@ export type OperationsListResponse = OperationListResult & { }; }; +/** + * Contains response data for the getOSOptions operation. + */ +export type ManagedClustersGetOSOptionsResponse = OSOptionProfile & { + /** + * 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: OSOptionProfile; + }; +}; + /** * Contains response data for the list operation. */ @@ -2333,6 +2577,46 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster & { }; }; +/** + * Contains response data for the runCommand operation. + */ +export type ManagedClustersRunCommandResponse = RunCommandResult & { + /** + * 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: RunCommandResult; + }; +}; + +/** + * Contains response data for the getCommandResult operation. + */ +export type ManagedClustersGetCommandResultResponse = RunCommandResult & { + /** + * 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: RunCommandResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -2373,6 +2657,26 @@ export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { }; }; +/** + * Contains response data for the beginRunCommand operation. + */ +export type ManagedClustersBeginRunCommandResponse = RunCommandResult & { + /** + * 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: RunCommandResult; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts index cb88910b32f3..a0c96c349120 100644 --- a/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts @@ -15,6 +15,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + ExtendedLocation, KubeletConfig, LinuxOSConfig, MaintenanceConfiguration, @@ -28,6 +29,7 @@ export { ManagedClusterAgentPoolProfileProperties, ManagedClusterAPIServerAccessProfile, ManagedClusterAutoUpgradeProfile, + ManagedClusterHTTPProxyConfig, ManagedClusterIdentity, ManagedClusterIdentityUserAssignedIdentitiesValue, ManagedClusterLoadBalancerProfile, @@ -46,6 +48,7 @@ export { PowerState, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkResource, PrivateLinkServiceConnectionState, Resource, ResourceReference, diff --git a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts index 3128db3eaae9..b70e98f63d94 100644 --- a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts @@ -17,6 +17,7 @@ export { ContainerServiceSshPublicKey, CredentialResult, CredentialResults, + ExtendedLocation, KubeletConfig, LinuxOSConfig, MaintenanceConfiguration, @@ -29,6 +30,7 @@ export { ManagedClusterAgentPoolProfileProperties, ManagedClusterAPIServerAccessProfile, ManagedClusterAutoUpgradeProfile, + ManagedClusterHTTPProxyConfig, ManagedClusterIdentity, ManagedClusterIdentityUserAssignedIdentitiesValue, ManagedClusterListResult, @@ -48,12 +50,17 @@ export { ManagedClusterSKU, ManagedClusterUpgradeProfile, ManagedClusterWindowsProfile, + OSOptionProfile, + OSOptionProperty, PowerState, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkResource, PrivateLinkServiceConnectionState, Resource, ResourceReference, + RunCommandRequest, + RunCommandResult, SubResource, SysctlConfig, SystemData, diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 17d2eb41f789..fa40f16ca8d0 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -641,6 +641,12 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = name: "String" } }, + osSKU: { + serializedName: "osSKU", + type: { + name: "String" + } + }, maxCount: { serializedName: "maxCount", type: { @@ -807,6 +813,18 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = type: { name: "Boolean" } + }, + enableFIPS: { + serializedName: "enableFIPS", + type: { + name: "Boolean" + } + }, + gpuInstanceProfile: { + serializedName: "gpuInstanceProfile", + type: { + name: "String" + } } } } @@ -895,6 +913,12 @@ export const AgentPool: msRest.CompositeMapper = { name: "String" } }, + osSKU: { + serializedName: "properties.osSKU", + type: { + name: "String" + } + }, maxCount: { serializedName: "properties.maxCount", type: { @@ -1061,6 +1085,18 @@ export const AgentPool: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + enableFIPS: { + serializedName: "properties.enableFIPS", + type: { + name: "Boolean" + } + }, + gpuInstanceProfile: { + serializedName: "properties.gpuInstanceProfile", + type: { + name: "String" + } } } } @@ -1090,6 +1126,12 @@ export const ManagedClusterWindowsProfile: msRest.CompositeMapper = { type: { name: "String" } + }, + enableCSIProxy: { + serializedName: "enableCSIProxy", + type: { + name: "Boolean" + } } } } @@ -1536,6 +1578,94 @@ export const MaintenanceConfiguration: msRest.CompositeMapper = { } }; +export const RunCommandRequest: msRest.CompositeMapper = { + serializedName: "RunCommandRequest", + type: { + name: "Composite", + className: "RunCommandRequest", + modelProperties: { + command: { + required: true, + serializedName: "command", + type: { + name: "String" + } + }, + context: { + serializedName: "context", + type: { + name: "String" + } + }, + clusterToken: { + serializedName: "clusterToken", + type: { + name: "String" + } + } + } + } +}; + +export const RunCommandResult: msRest.CompositeMapper = { + serializedName: "RunCommandResult", + type: { + name: "Composite", + className: "RunCommandResult", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + exitCode: { + readOnly: true, + serializedName: "properties.exitCode", + type: { + name: "Number" + } + }, + startedAt: { + readOnly: true, + serializedName: "properties.startedAt", + type: { + name: "DateTime" + } + }, + finishedAt: { + readOnly: true, + serializedName: "properties.finishedAt", + type: { + name: "DateTime" + } + }, + logs: { + readOnly: true, + serializedName: "properties.logs", + type: { + name: "String" + } + }, + reason: { + readOnly: true, + serializedName: "properties.reason", + type: { + name: "String" + } + } + } + } +}; + export const ContainerServiceVMDiagnostics: msRest.CompositeMapper = { serializedName: "ContainerServiceVMDiagnostics", type: { @@ -1690,6 +1820,12 @@ export const ManagedClusterPodIdentity: msRest.CompositeMapper = { name: "String" } }, + bindingSelector: { + serializedName: "bindingSelector", + type: { + name: "String" + } + }, identity: { required: true, serializedName: "identity", @@ -2028,6 +2164,97 @@ export const ManagedClusterPropertiesIdentityProfileValue: msRest.CompositeMappe } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateLinkServiceID: { + readOnly: true, + serializedName: "privateLinkServiceID", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterHTTPProxyConfig: msRest.CompositeMapper = { + serializedName: "ManagedClusterHTTPProxyConfig", + type: { + name: "Composite", + className: "ManagedClusterHTTPProxyConfig", + modelProperties: { + httpProxy: { + serializedName: "httpProxy", + type: { + name: "String" + } + }, + httpsProxy: { + serializedName: "httpsProxy", + type: { + name: "String" + } + }, + noProxy: { + serializedName: "noProxy", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + trustedCa: { + serializedName: "trustedCa", + type: { + name: "String" + } + } + } + } +}; + export const ManagedClusterIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = { serializedName: "ManagedClusterIdentity_userAssignedIdentitiesValue", type: { @@ -2121,6 +2348,28 @@ export const ManagedClusterSKU: msRest.CompositeMapper = { } }; +export const ExtendedLocation: msRest.CompositeMapper = { + serializedName: "ExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const ManagedCluster: msRest.CompositeMapper = { serializedName: "ManagedCluster", type: { @@ -2312,6 +2561,31 @@ export const ManagedCluster: msRest.CompositeMapper = { } } }, + privateLinkResources: { + serializedName: "properties.privateLinkResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + disableLocalAccounts: { + serializedName: "properties.disableLocalAccounts", + type: { + name: "Boolean" + } + }, + httpProxyConfig: { + serializedName: "properties.httpProxyConfig", + type: { + name: "Composite", + className: "ManagedClusterHTTPProxyConfig" + } + }, identity: { serializedName: "identity", type: { @@ -2325,6 +2599,13 @@ export const ManagedCluster: msRest.CompositeMapper = { name: "Composite", className: "ManagedClusterSKU" } + }, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } } } } @@ -2781,72 +3062,88 @@ export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { } }; -export const PrivateLinkResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkResource", +export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", type: { name: "Composite", - className: "PrivateLinkResource", + className: "PrivateLinkResourcesListResult", modelProperties: { - id: { - serializedName: "id", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } } - }, - name: { - serializedName: "name", + } + } + } +}; + +export const OSOptionProperty: msRest.CompositeMapper = { + serializedName: "OSOptionProperty", + type: { + name: "Composite", + className: "OSOptionProperty", + modelProperties: { + osType: { + required: true, + serializedName: "os-type", type: { name: "String" } }, - type: { - serializedName: "type", + enableFipsImage: { + required: true, + serializedName: "enable-fips-image", type: { - name: "String" + name: "Boolean" } - }, - groupId: { - serializedName: "groupId", + } + } + } +}; + +export const OSOptionProfile: msRest.CompositeMapper = { + serializedName: "OSOptionProfile", + type: { + name: "Composite", + className: "OSOptionProfile", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - requiredMembers: { - serializedName: "requiredMembers", + name: { + readOnly: true, + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - privateLinkServiceID: { + type: { readOnly: true, - serializedName: "privateLinkServiceID", + serializedName: "type", type: { name: "String" } - } - } - } -}; - -export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourcesListResult", - type: { - name: "Composite", - className: "PrivateLinkResourcesListResult", - modelProperties: { - value: { - serializedName: "value", + }, + osOptionPropertyList: { + required: true, + serializedName: "properties.osOptionPropertyList", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "OSOptionProperty" } } } diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 27b330139896..f90a18426fdb 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -39,6 +39,16 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const commandId: msRest.OperationURLParameter = { + parameterPath: "commandId", + mapper: { + required: true, + serializedName: "commandId", + type: { + name: "String" + } + } +}; export const configName: msRest.OperationURLParameter = { parameterPath: "configName", mapper: { @@ -49,6 +59,16 @@ export const configName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -98,6 +118,18 @@ export const resourceName: msRest.OperationURLParameter = { } } }; +export const resourceType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "resourceType" + ], + mapper: { + serializedName: "resource-type", + type: { + name: "String" + } + } +}; export const roleName: msRest.OperationURLParameter = { parameterPath: "roleName", mapper: { diff --git a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts index b507c48ec66e..7c8fdc1fab59 100644 --- a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts @@ -15,6 +15,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + ExtendedLocation, KubeletConfig, LinuxOSConfig, MaintenanceConfiguration, @@ -27,6 +28,7 @@ export { ManagedClusterAgentPoolProfileProperties, ManagedClusterAPIServerAccessProfile, ManagedClusterAutoUpgradeProfile, + ManagedClusterHTTPProxyConfig, ManagedClusterIdentity, ManagedClusterIdentityUserAssignedIdentitiesValue, ManagedClusterLoadBalancerProfile, @@ -46,6 +48,7 @@ export { PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, + PrivateLinkResource, PrivateLinkServiceConnectionState, Resource, ResourceReference, diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index a3a0ee7f1249..22152b4b1c28 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -26,6 +26,35 @@ export class ManagedClusters { this.client = client; } + /** + * Gets supported OS options in the specified subscription. + * @summary Gets supported OS options in the specified subscription. + * @param location The name of a supported Azure region. + * @param [options] The optional parameters + * @returns Promise + */ + getOSOptions(location: string, options?: Models.ManagedClustersGetOSOptionsOptionalParams): Promise; + /** + * @param location The name of a supported Azure region. + * @param callback The callback + */ + getOSOptions(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The name of a supported Azure region. + * @param options The optional parameters + * @param callback The callback + */ + getOSOptions(location: string, options: Models.ManagedClustersGetOSOptionsOptionalParams, callback: msRest.ServiceCallback): void; + getOSOptions(location: string, options?: Models.ManagedClustersGetOSOptionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + getOSOptionsOperationSpec, + callback) as Promise; + } + /** * Gets a list of managed clusters in the specified subscription. The operation returns properties * of each managed cluster. @@ -404,6 +433,58 @@ export class ManagedClusters { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the + * command. + * @summary Run Command against Managed Kubernetes Service + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + runCommand(resourceGroupName: string, resourceName: string, requestPayload: Models.RunCommandRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginRunCommand(resourceGroupName,resourceName,requestPayload,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get command result from previous runCommand invoke. + * @summary Get command result. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command request. + * @param [options] The optional parameters + * @returns Promise + */ + getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command request. + * @param callback The callback + */ + getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command request. + * @param options The optional parameters + * @param callback The callback + */ + getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + commandId, + options + }, + getCommandResultOperationSpec, + callback) as Promise; + } + /** * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes * version. @@ -566,6 +647,28 @@ export class ManagedClusters { options); } + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the + * command. + * @summary Run Command against Managed Kubernetes Service + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginRunCommand(resourceGroupName: string, resourceName: string, requestPayload: Models.RunCommandRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + requestPayload, + options + }, + beginRunCommandOperationSpec, + options); + } + /** * Gets a list of managed clusters in the specified subscription. The operation returns properties * of each managed cluster. @@ -629,6 +732,31 @@ export class ManagedClusters { // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const getOSOptionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.resourceType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OSOptionProfile + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", @@ -827,6 +955,33 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const getCommandResultOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.commandId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RunCommandResult + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", @@ -1052,6 +1207,39 @@ const beginStartOperationSpec: msRest.OperationSpec = { serializer }; +const beginRunCommandOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "requestPayload", + mapper: { + ...Mappers.RunCommandRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RunCommandResult + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com",