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..7aaca3f1064c 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. */ @@ -1356,6 +1388,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 +1404,8 @@ export interface ManagedClusterPropertiesAutoScalerProfile { scaleDownUnneededTime?: string; scaleDownUnreadyTime?: string; scaleDownUtilizationThreshold?: string; - maxGracefulTerminationSec?: string; + skipNodesWithLocalStorage?: string; + skipNodesWithSystemPods?: string; } /** @@ -1456,6 +1498,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 +1863,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 +2073,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 +2097,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 +2169,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' @@ -2984,3 +3096,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..8f4638437438 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: { @@ -1979,6 +2023,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 +2101,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 +2262,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 +2881,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/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..c429cd7e0373 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -379,6 +379,32 @@ export class ManagedClusters { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * 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 [options] The optional parameters + * @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 + */ + start(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,resourceName,options) + .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. @@ -517,6 +543,44 @@ export class ManagedClusters { options); } + /** + * 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 [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + 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); + } + /** * Upgrade node image version of an agent pool to the latest. * @summary Upgrade node image version of an agent pool to the latest. @@ -976,6 +1040,54 @@ const beginRotateClusterCertificatesOperationSpec: msRest.OperationSpec = { serializer }; +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.resourceName1 + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 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 + } + }, + serializer +}; + const beginUpgradeNodeImageVersionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", 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 +};