diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 1dbcf82fdbf8..d4aafe2aea71 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -23,6 +23,8 @@ class ContainerServiceClient extends ContainerServiceClientContext { managedClusters: operations.ManagedClusters; agentPools: operations.AgentPools; privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + resolvePrivateLinkServiceId: operations.ResolvePrivateLinkServiceId; /** * Initializes a new instance of the ContainerServiceClient class. @@ -39,6 +41,8 @@ class ContainerServiceClient extends ContainerServiceClientContext { this.managedClusters = new operations.ManagedClusters(this); this.agentPools = new operations.AgentPools(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.resolvePrivateLinkServiceId = new operations.ResolvePrivateLinkServiceId(this); } } diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts index 094f7fe03b6b..85a48f9fb317 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts @@ -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}`; } @@ -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; } } diff --git a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts index 62cdcb830b7d..4b1df9e68354 100644 --- a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts @@ -59,6 +59,7 @@ export { OpenShiftManagedClusterIdentityProvider, OpenShiftManagedClusterMasterPoolProfile, OpenShiftRouterProfile, + PowerState, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkServiceConnectionState, diff --git a/sdk/containerservice/arm-containerservice/src/models/containerServicesMappers.ts b/sdk/containerservice/arm-containerservice/src/models/containerServicesMappers.ts index 67faee88ab17..a6d81b2e9332 100644 --- a/sdk/containerservice/arm-containerservice/src/models/containerServicesMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/containerServicesMappers.ts @@ -58,6 +58,7 @@ export { OrchestratorProfile, OrchestratorVersionProfile, OrchestratorVersionProfileListResult, + PowerState, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkServiceConnectionState, diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index e9b76961ba3f..b16dd8bc0f1e 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -810,6 +810,16 @@ export interface AgentPoolUpgradeSettings { maxSurge?: string; } +/** + * Describes the Power State of the cluster + */ +export interface PowerState { + /** + * Tells whether the cluster is Running or Stopped. Possible values include: 'Running', 'Stopped' + */ + code?: Code; +} + /** * Properties for the container service agent pool profile. */ @@ -867,6 +877,12 @@ export interface ManagedClusterAgentPoolProfileProperties { * specified. */ osDiskSizeGB?: number; + /** + * OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and + * 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: + * 'Managed', 'Ephemeral' + */ + osDiskType?: OSDiskType; /** * VNet SubnetID specifies the VNet's subnet identifier. */ @@ -919,6 +935,11 @@ export interface ManagedClusterAgentPoolProfileProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Describes whether the Agent Pool is Running or Stopped + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly powerState?: PowerState; /** * Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. */ @@ -1030,6 +1051,12 @@ export interface AgentPool extends SubResource { * specified. */ osDiskSizeGB?: number; + /** + * OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and + * 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: + * 'Managed', 'Ephemeral' + */ + osDiskType?: OSDiskType; /** * VNet SubnetID specifies the VNet's subnet identifier. */ @@ -1082,6 +1109,11 @@ export interface AgentPool extends SubResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Describes whether the Agent Pool is Running or Stopped + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly powerState?: PowerState; /** * Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. */ @@ -1131,11 +1163,21 @@ export interface AgentPool extends SubResource { */ export interface ManagedClusterWindowsProfile { /** - * The administrator username to use for Windows VMs. + * Specifies the name of the administrator account.

**restriction:** Cannot end in "." + *

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", + * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", + * "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", + * "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 + * character

**Max-length:** 20 characters */ adminUsername: string; /** - * The administrator password to use for Windows VMs. + * Specifies the password of the administrator account.

**Minimum-length:** 8 characters + *

**Max-length:** 123 characters

**Complexity requirements:** 3 out of 4 + * conditions below need to be fulfilled
Has lower characters
Has upper characters
+ * Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** + * "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", + * "Password1", "Password22", "iloveyou!" */ adminPassword?: string; /** @@ -1356,6 +1398,15 @@ export interface ManagedClusterAADProfile { */ export interface ManagedClusterPropertiesAutoScalerProfile { balanceSimilarNodeGroups?: string; + /** + * Possible values include: 'least-waste', 'most-pods', 'random' + */ + expander?: Expander; + maxEmptyBulkDelete?: string; + maxGracefulTerminationSec?: string; + maxTotalUnreadyPercentage?: string; + newPodScaleUpDelay?: string; + okTotalUnreadyCount?: string; scanInterval?: string; scaleDownDelayAfterAdd?: string; scaleDownDelayAfterDelete?: string; @@ -1363,7 +1414,8 @@ export interface ManagedClusterPropertiesAutoScalerProfile { scaleDownUnneededTime?: string; scaleDownUnreadyTime?: string; scaleDownUtilizationThreshold?: string; - maxGracefulTerminationSec?: string; + skipNodesWithLocalStorage?: string; + skipNodesWithSystemPods?: string; } /** @@ -1456,6 +1508,11 @@ export interface ManagedCluster extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Represents the Power State of the cluster + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly powerState?: PowerState; /** * The max number of agent pools for the managed cluster. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1816,6 +1873,47 @@ export interface PrivateEndpointConnectionListResult { value?: PrivateEndpointConnection[]; } +/** + * 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; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourcesListResult { + /** + * The collection value. + */ + value?: PrivateLinkResource[]; +} + /** * Optional Parameters. */ @@ -1985,6 +2083,14 @@ export type ContainerServiceVMSizeTypes = 'Standard_A1' | 'Standard_A10' | 'Stan */ export type ContainerServiceOrchestratorTypes = 'Kubernetes' | 'Swarm' | 'DCOS' | 'DockerCE' | 'Custom'; +/** + * Defines values for OSDiskType. + * Possible values include: 'Managed', 'Ephemeral' + * @readonly + * @enum {string} + */ +export type OSDiskType = 'Managed' | 'Ephemeral'; + /** * Defines values for AgentPoolType. * Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' @@ -2001,6 +2107,14 @@ export type AgentPoolType = 'VirtualMachineScaleSets' | 'AvailabilitySet'; */ export type AgentPoolMode = 'System' | 'User'; +/** + * Defines values for Code. + * Possible values include: 'Running', 'Stopped' + * @readonly + * @enum {string} + */ +export type Code = 'Running' | 'Stopped'; + /** * Defines values for ScaleSetPriority. * Possible values include: 'Spot', 'Regular' @@ -2065,6 +2179,14 @@ export type OutboundType = 'loadBalancer' | 'userDefinedRouting'; */ export type LoadBalancerSku = 'standard' | 'basic'; +/** + * Defines values for Expander. + * Possible values include: 'least-waste', 'most-pods', 'random' + * @readonly + * @enum {string} + */ +export type Expander = 'least-waste' | 'most-pods' | 'random'; + /** * Defines values for ResourceIdentityType. * Possible values include: 'SystemAssigned', 'UserAssigned', 'None' @@ -2666,9 +2788,9 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster & { }; /** - * Contains response data for the upgradeNodeImageVersion operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ManagedClustersUpgradeNodeImageVersionResponse = AgentPool & { +export type ManagedClustersBeginCreateOrUpdateResponse = ManagedCluster & { /** * The underlying HTTP response. */ @@ -2681,14 +2803,14 @@ export type ManagedClustersUpgradeNodeImageVersionResponse = AgentPool & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPool; + parsedBody: ManagedCluster; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the beginUpdateTags operation. */ -export type ManagedClustersBeginCreateOrUpdateResponse = ManagedCluster & { +export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { /** * The underlying HTTP response. */ @@ -2706,9 +2828,9 @@ export type ManagedClustersBeginCreateOrUpdateResponse = ManagedCluster & { }; /** - * Contains response data for the beginUpdateTags operation. + * Contains response data for the listNext operation. */ -export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { +export type ManagedClustersListNextResponse = ManagedClusterListResult & { /** * The underlying HTTP response. */ @@ -2721,14 +2843,14 @@ export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { /** * The response body as parsed JSON or XML */ - parsedBody: ManagedCluster; + parsedBody: ManagedClusterListResult; }; }; /** - * Contains response data for the beginUpgradeNodeImageVersion operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type ManagedClustersBeginUpgradeNodeImageVersionResponse = AgentPool & { +export type ManagedClustersListByResourceGroupNextResponse = ManagedClusterListResult & { /** * The underlying HTTP response. */ @@ -2741,14 +2863,14 @@ export type ManagedClustersBeginUpgradeNodeImageVersionResponse = AgentPool & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPool; + parsedBody: ManagedClusterListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type ManagedClustersListNextResponse = ManagedClusterListResult & { +export type AgentPoolsListResponse = AgentPoolListResult & { /** * The underlying HTTP response. */ @@ -2761,14 +2883,14 @@ export type ManagedClustersListNextResponse = ManagedClusterListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ManagedClusterListResult; + parsedBody: AgentPoolListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type ManagedClustersListByResourceGroupNextResponse = ManagedClusterListResult & { +export type AgentPoolsGetResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -2781,14 +2903,14 @@ export type ManagedClustersListByResourceGroupNextResponse = ManagedClusterListR /** * The response body as parsed JSON or XML */ - parsedBody: ManagedClusterListResult; + parsedBody: AgentPool; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type AgentPoolsListResponse = AgentPoolListResult & { +export type AgentPoolsCreateOrUpdateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -2801,14 +2923,14 @@ export type AgentPoolsListResponse = AgentPoolListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPoolListResult; + parsedBody: AgentPool; }; }; /** - * Contains response data for the get operation. + * Contains response data for the getUpgradeProfile operation. */ -export type AgentPoolsGetResponse = AgentPool & { +export type AgentPoolsGetUpgradeProfileResponse = AgentPoolUpgradeProfile & { /** * The underlying HTTP response. */ @@ -2821,14 +2943,14 @@ export type AgentPoolsGetResponse = AgentPool & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPool; + parsedBody: AgentPoolUpgradeProfile; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the getAvailableAgentPoolVersions operation. */ -export type AgentPoolsCreateOrUpdateResponse = AgentPool & { +export type AgentPoolsGetAvailableAgentPoolVersionsResponse = AgentPoolAvailableVersions & { /** * The underlying HTTP response. */ @@ -2841,14 +2963,14 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPool; + parsedBody: AgentPoolAvailableVersions; }; }; /** - * Contains response data for the getUpgradeProfile operation. + * Contains response data for the upgradeNodeImageVersion operation. */ -export type AgentPoolsGetUpgradeProfileResponse = AgentPoolUpgradeProfile & { +export type AgentPoolsUpgradeNodeImageVersionResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -2861,14 +2983,14 @@ export type AgentPoolsGetUpgradeProfileResponse = AgentPoolUpgradeProfile & { /** * The response body as parsed JSON or XML */ - parsedBody: AgentPoolUpgradeProfile; + parsedBody: AgentPool; }; }; /** - * Contains response data for the getAvailableAgentPoolVersions operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type AgentPoolsGetAvailableAgentPoolVersionsResponse = AgentPoolAvailableVersions & { +export type AgentPoolsBeginCreateOrUpdateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -2881,14 +3003,14 @@ export type AgentPoolsGetAvailableAgentPoolVersionsResponse = AgentPoolAvailable /** * The response body as parsed JSON or XML */ - parsedBody: AgentPoolAvailableVersions; + parsedBody: AgentPool; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the beginUpgradeNodeImageVersion operation. */ -export type AgentPoolsBeginCreateOrUpdateResponse = AgentPool & { +export type AgentPoolsBeginUpgradeNodeImageVersionResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -2984,3 +3106,43 @@ export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection parsedBody: PrivateEndpointConnection; }; }; + +/** + * Contains response data for the list operation. + */ +export type PrivateLinkResourcesListResponse = PrivateLinkResourcesListResult & { + /** + * 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: PrivateLinkResourcesListResult; + }; +}; + +/** + * Contains response data for the pOST operation. + */ +export type ResolvePrivateLinkServiceIdPOSTResponse = PrivateLinkResource & { + /** + * 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: PrivateLinkResource; + }; +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts index b16ddcf75f19..1581d299b955 100644 --- a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts @@ -60,6 +60,7 @@ export { OpenShiftManagedClusterIdentityProvider, OpenShiftManagedClusterMasterPoolProfile, OpenShiftRouterProfile, + PowerState, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkServiceConnectionState, diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 23fafe415798..6a7465db46f0 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -1183,6 +1183,22 @@ export const AgentPoolUpgradeSettings: msRest.CompositeMapper = { } }; +export const PowerState: msRest.CompositeMapper = { + serializedName: "PowerState", + type: { + name: "Composite", + className: "PowerState", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + } + } + } +}; + export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = { serializedName: "ManagedClusterAgentPoolProfileProperties", type: { @@ -1207,6 +1223,12 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = name: "Number" } }, + osDiskType: { + serializedName: "osDiskType", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -1283,6 +1305,14 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = name: "String" } }, + powerState: { + readOnly: true, + serializedName: "powerState", + type: { + name: "Composite", + className: "PowerState" + } + }, availabilityZones: { serializedName: "availabilityZones", type: { @@ -1409,6 +1439,12 @@ export const AgentPool: msRest.CompositeMapper = { name: "Number" } }, + osDiskType: { + serializedName: "properties.osDiskType", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -1485,6 +1521,14 @@ export const AgentPool: msRest.CompositeMapper = { name: "String" } }, + powerState: { + readOnly: true, + serializedName: "properties.powerState", + type: { + name: "Composite", + className: "PowerState" + } + }, availabilityZones: { serializedName: "properties.availabilityZones", type: { @@ -1574,18 +1618,12 @@ export const ManagedClusterWindowsProfile: msRest.CompositeMapper = { adminUsername: { required: true, serializedName: "adminUsername", - constraints: { - Pattern: /^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$/ - }, type: { name: "String" } }, adminPassword: { serializedName: "adminPassword", - constraints: { - Pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$/ - }, type: { name: "String" } @@ -1979,6 +2017,42 @@ export const ManagedClusterPropertiesAutoScalerProfile: msRest.CompositeMapper = name: "String" } }, + expander: { + serializedName: "expander", + type: { + name: "String" + } + }, + maxEmptyBulkDelete: { + serializedName: "max-empty-bulk-delete", + type: { + name: "String" + } + }, + maxGracefulTerminationSec: { + serializedName: "max-graceful-termination-sec", + type: { + name: "String" + } + }, + maxTotalUnreadyPercentage: { + serializedName: "max-total-unready-percentage", + type: { + name: "String" + } + }, + newPodScaleUpDelay: { + serializedName: "new-pod-scale-up-delay", + type: { + name: "String" + } + }, + okTotalUnreadyCount: { + serializedName: "ok-total-unready-count", + type: { + name: "String" + } + }, scanInterval: { serializedName: "scan-interval", type: { @@ -2021,8 +2095,14 @@ export const ManagedClusterPropertiesAutoScalerProfile: msRest.CompositeMapper = name: "String" } }, - maxGracefulTerminationSec: { - serializedName: "max-graceful-termination-sec", + skipNodesWithLocalStorage: { + serializedName: "skip-nodes-with-local-storage", + type: { + name: "String" + } + }, + skipNodesWithSystemPods: { + serializedName: "skip-nodes-with-system-pods", type: { name: "String" } @@ -2176,6 +2256,14 @@ export const ManagedCluster: msRest.CompositeMapper = { name: "String" } }, + powerState: { + readOnly: true, + serializedName: "properties.powerState", + type: { + name: "Composite", + className: "PowerState" + } + }, maxAgentPools: { readOnly: true, serializedName: "properties.maxAgentPools", @@ -2787,6 +2875,80 @@ export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { } }; +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 PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", + type: { + name: "Composite", + className: "PrivateLinkResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + export const OpenShiftManagedClusterListResult: msRest.CompositeMapper = { serializedName: "OpenShiftManagedClusterListResult", type: { diff --git a/sdk/containerservice/arm-containerservice/src/models/openShiftManagedClustersMappers.ts b/sdk/containerservice/arm-containerservice/src/models/openShiftManagedClustersMappers.ts index 280e986c8c9c..822f1430853a 100644 --- a/sdk/containerservice/arm-containerservice/src/models/openShiftManagedClustersMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/openShiftManagedClustersMappers.ts @@ -55,6 +55,7 @@ export { OpenShiftManagedClusterListResult, OpenShiftManagedClusterMasterPoolProfile, OpenShiftRouterProfile, + PowerState, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkServiceConnectionState, diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index cf7863ca08f0..d23042ee5add 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-07-01', + defaultValue: '2020-09-01', type: { name: "String" } diff --git a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts index a68d5ae6a5ed..706af67884eb 100644 --- a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts @@ -54,6 +54,7 @@ export { OpenShiftManagedClusterIdentityProvider, OpenShiftManagedClusterMasterPoolProfile, OpenShiftRouterProfile, + PowerState, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, diff --git a/sdk/containerservice/arm-containerservice/src/models/privateLinkResourcesMappers.ts b/sdk/containerservice/arm-containerservice/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..6924d859de8c --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + PrivateLinkResource, + PrivateLinkResourcesListResult +} from "../models/mappers"; diff --git a/sdk/containerservice/arm-containerservice/src/models/resolvePrivateLinkServiceIdMappers.ts b/sdk/containerservice/arm-containerservice/src/models/resolvePrivateLinkServiceIdMappers.ts new file mode 100644 index 000000000000..0ac1786acfd5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/models/resolvePrivateLinkServiceIdMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + PrivateLinkResource +} from "../models/mappers"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index e883d6d9a83b..c17bc7df8177 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -198,6 +198,20 @@ export class AgentPools { callback) as Promise; } + /** + * 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 an agent pool in the specified managed cluster. * @summary Creates or updates an agent pool. @@ -242,6 +256,27 @@ export class AgentPools { 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 agent pools in the specified managed cluster. The operation returns properties of * each agent pool. @@ -438,6 +473,33 @@ const beginDeleteMethodOperationSpec: 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", diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 0d10279e7a1f..55780450227a 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,3 +14,5 @@ export * from "./operations"; export * from "./managedClusters"; export * from "./agentPools"; export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./resolvePrivateLinkServiceId"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index e666f57fc681..d5d798f3e6f4 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -380,17 +380,29 @@ export class ManagedClusters { } /** - * Upgrade node image version of an agent pool to the latest. - * @summary Upgrade node image version of an agent pool to the latest. + * Stops a Running Managed Cluster + * @summary Stop Managed Cluster * @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 + * @returns Promise + */ + stop(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Starts a Stopped Managed Cluster + * @summary Start Managed Cluster + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @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; + start(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -518,23 +530,40 @@ export class ManagedClusters { } /** - * Upgrade node image version of an agent pool to the latest. - * @summary Upgrade node image version of an agent pool to the latest. + * Stops a Running Managed Cluster + * @summary Stop Managed Cluster * @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 { + beginStop(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, resourceName, - agentPoolName, options }, - beginUpgradeNodeImageVersionOperationSpec, + beginStopOperationSpec, + options); + } + + /** + * Starts a Stopped Managed Cluster + * @summary Start Managed Cluster + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginStartOperationSpec, options); } @@ -976,14 +1005,13 @@ const beginRotateClusterCertificatesOperationSpec: msRest.OperationSpec = { serializer }; -const beginUpgradeNodeImageVersionOperationSpec: msRest.OperationSpec = { +const beginStopOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName0, - Parameters.resourceName1, - Parameters.agentPoolName + Parameters.resourceName1 ], queryParameters: [ Parameters.apiVersion3 @@ -992,10 +1020,32 @@ const beginUpgradeNodeImageVersionOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 202: { - bodyMapper: Mappers.AgentPool - }, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.resourceName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/containerservice/arm-containerservice/src/operations/privateLinkResources.ts b/sdk/containerservice/arm-containerservice/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..c071ffd4e714 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/privateLinkResources.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: ContainerServiceClientContext; + + /** + * Create a PrivateLinkResources. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns + * properties of each private link resource. + * @summary Gets a list of private link resources in the specified managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.resourceName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts new file mode 100644 index 000000000000..8e98819573bc --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/resolvePrivateLinkServiceIdMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a ResolvePrivateLinkServiceId. */ +export class ResolvePrivateLinkServiceId { + private readonly client: ContainerServiceClientContext; + + /** + * Create a ResolvePrivateLinkServiceId. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets the private link service ID the specified managed cluster. + * @summary Gets the private link service ID for the specified managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service + * ID. + * @param [options] The optional parameters + * @returns Promise + */ + pOST(resourceGroupName: string, resourceName: string, parameters: Models.PrivateLinkResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service + * ID. + * @param callback The callback + */ + pOST(resourceGroupName: string, resourceName: string, parameters: Models.PrivateLinkResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service + * ID. + * @param options The optional parameters + * @param callback The callback + */ + pOST(resourceGroupName: string, resourceName: string, parameters: Models.PrivateLinkResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + pOST(resourceGroupName: string, resourceName: string, parameters: Models.PrivateLinkResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + pOSTOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const pOSTOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.resourceName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateLinkResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};