diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
index 4a5ecad46cda4..1bf8d11453bd5 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
@@ -120,7 +120,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -346,7 +346,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -634,7 +634,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -855,7 +855,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1005,6 +1005,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
return _result;
}
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Creates or updates an agent pool.
///
@@ -1088,7 +1116,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1338,7 +1366,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1472,6 +1500,234 @@ internal AgentPoolsOperations(ContainerServiceClient client)
return _result;
}
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (resourceName != null)
+ {
+ if (resourceName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63);
+ }
+ if (resourceName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ string apiVersion = "2020-09-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Gets a list of agent pools in the specified managed cluster.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
index fac6394a3939e..e947c3f53ea6b 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
@@ -328,6 +328,58 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
}
}
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ {
+ return operations.UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Creates or updates an agent pool.
///
@@ -435,6 +487,58 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ {
+ return operations.BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Gets a list of agent pools in the specified managed cluster.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
index b53e00facb1ec..1ff517b46c2c7 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
@@ -101,6 +101,16 @@ public partial class ContainerServiceClient : ServiceClient
public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; }
+
+ ///
+ /// Gets the IResolvePrivateLinkServiceIdOperations.
+ ///
+ public virtual IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; private set; }
+
///
/// Initializes a new instance of the ContainerServiceClient class.
///
@@ -348,6 +358,8 @@ private void Initialize()
ManagedClusters = new ManagedClustersOperations(this);
AgentPools = new AgentPoolsOperations(this);
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
+ PrivateLinkResources = new PrivateLinkResourcesOperations(this);
+ ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
index 40bf792cb96bc..7c2a6be303d51 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
@@ -208,6 +208,37 @@ public partial interface IAgentPoolsOperations
///
Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Creates or updates an agent pool.
///
///
@@ -271,6 +302,37 @@ public partial interface IAgentPoolsOperations
///
Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrade node image version of an agent pool to the latest.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets a list of agent pools in the specified managed cluster.
///
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
index 8f78954b872fc..aa8ac82b43410 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
@@ -96,5 +96,15 @@ public partial interface IContainerServiceClient : System.IDisposable
///
IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ ///
+ /// Gets the IResolvePrivateLinkServiceIdOperations.
+ ///
+ IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; }
+
}
}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
index 7c90c0b4370a4..c52b4bd29ef41 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
@@ -430,10 +430,10 @@ public partial interface IManagedClustersOperations
///
Task RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The name of the resource group.
@@ -441,9 +441,6 @@ public partial interface IManagedClustersOperations
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
- ///
///
/// The headers that will be added to request.
///
@@ -453,13 +450,35 @@ public partial interface IManagedClustersOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
///
///
/// Thrown when a required parameter is null
///
- Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Creates or updates a managed cluster.
///
@@ -634,10 +653,10 @@ public partial interface IManagedClustersOperations
///
Task BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The name of the resource group.
@@ -645,9 +664,6 @@ public partial interface IManagedClustersOperations
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
- ///
///
/// The headers that will be added to request.
///
@@ -657,13 +673,35 @@ public partial interface IManagedClustersOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
///
///
/// Thrown when a required parameter is null
///
- Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of managed clusters in the specified subscription.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 0000000000000..21e62d6e697d3
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs
@@ -0,0 +1,58 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ public partial interface IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Gets a list of private link resources in the specified managed
+ /// cluster.
+ ///
+ ///
+ /// Gets a list of private link resources in the specified managed
+ /// cluster. The operation returns properties of each private link
+ /// resource.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs
new file mode 100644
index 0000000000000..6d0a46c660b50
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs
@@ -0,0 +1,59 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ResolvePrivateLinkServiceIdOperations operations.
+ ///
+ public partial interface IResolvePrivateLinkServiceIdOperations
+ {
+ ///
+ /// Gets the private link service ID for the specified managed cluster.
+ ///
+ ///
+ /// Gets the private link service ID the specified managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Parameters (name, groupId) supplied in order to resolve a private
+ /// link service ID.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
index a7a6108f31b6b..f38a4213bfc27 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
@@ -84,7 +84,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -278,7 +278,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -496,7 +496,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -729,7 +729,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "roleName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -951,7 +951,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1171,7 +1171,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1391,7 +1391,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1611,7 +1611,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1927,10 +1927,10 @@ internal ManagedClustersOperations(ContainerServiceClient client)
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The name of the resource group.
@@ -1938,8 +1938,30 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
///
///
/// The headers that will be added to request.
@@ -1947,10 +1969,10 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// The cancellation token.
///
- public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -2035,7 +2057,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
parameters.Validate();
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2282,7 +2304,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
TagsObject parameters = new TagsObject();
if (tags != null)
{
@@ -2510,7 +2532,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2720,7 +2742,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
parameters.Validate();
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2933,7 +2955,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3138,7 +3160,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3271,10 +3293,10 @@ internal ManagedClustersOperations(ContainerServiceClient client)
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The name of the resource group.
@@ -3282,9 +3304,6 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
- ///
///
/// Headers that will be added to request.
///
@@ -3294,9 +3313,6 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -3306,7 +3322,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -3342,11 +3358,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- if (agentPoolName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
- }
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3357,17 +3369,15 @@ internal ManagedClustersOperations(ContainerServiceClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
- tracingParameters.Add("agentPoolName", agentPoolName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
- _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -3431,7 +3441,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -3466,30 +3476,210 @@ internal ManagedClustersOperations(ContainerServiceClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 202)
+ if (_shouldTrace)
{
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- catch (JsonException ex)
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (resourceName != null)
+ {
+ if (resourceName.Length > 63)
{
- _httpRequest.Dispose();
- if (_httpResponse != null)
+ throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63);
+ }
+ if (resourceName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
+ }
+ }
+ string apiVersion = "2020-09-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
{
- _httpResponse.Dispose();
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
}
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
index a152a225467d8..dbbdd70909ea4 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
@@ -702,10 +702,10 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The operations group for this extension method.
@@ -716,19 +716,39 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
+ public static void Stop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.StopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Stop Managed Cluster
+ ///
+ ///
+ /// Stops a Running Managed Cluster
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
///
- public static AgentPool UpgradeNodeImageVersion(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ public static async Task StopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
{
- return operations.UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ (await operations.StopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Start Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Starts a Stopped Managed Cluster
///
///
/// The operations group for this extension method.
@@ -739,18 +759,32 @@ public static AgentPool UpgradeNodeImageVersion(this IManagedClustersOperations
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
+ public static void Start(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.StartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
///
///
/// The cancellation token.
///
- public static async Task UpgradeNodeImageVersionAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task StartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.StartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -1048,10 +1082,10 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stop Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Stops a Running Managed Cluster
///
///
/// The operations group for this extension method.
@@ -1062,19 +1096,39 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
+ public static void BeginStop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.BeginStopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Stop Managed Cluster
+ ///
+ ///
+ /// Stops a Running Managed Cluster
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
///
- public static AgentPool BeginUpgradeNodeImageVersion(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ public static async Task BeginStopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
{
- return operations.BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Start Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// Starts a Stopped Managed Cluster
///
///
/// The operations group for this extension method.
@@ -1085,18 +1139,32 @@ public static AgentPool BeginUpgradeNodeImageVersion(this IManagedClustersOperat
///
/// The name of the managed cluster resource.
///
- ///
- /// The name of the agent pool.
+ public static void BeginStart(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.BeginStartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Start Managed Cluster
+ ///
+ ///
+ /// Starts a Stopped Managed Cluster
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
///
///
/// The cancellation token.
///
- public static async Task BeginUpgradeNodeImageVersionAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginStartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
index 6fa595e91f0c7..71fa1233f70d6 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
@@ -102,6 +102,10 @@ public AgentPool()
/// the disk size for every machine in this master/agent pool. If you
/// specify 0, it will apply the default osDisk size according to the
/// vmSize specified.
+ /// 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'
/// VNet SubnetID specifies the VNet's
/// subnet identifier.
/// Maximum number of pods that can run on a
@@ -127,6 +131,8 @@ public AgentPool()
/// agentpool
/// The current deployment or
/// provisioning state, which only appears in the response.
+ /// Describes whether the Agent Pool is
+ /// Running or Stopped
/// Availability zones for nodes. Must
/// use VirtualMachineScaleSets AgentPoolType.
/// Enable public IP for nodes
@@ -149,12 +155,13 @@ public AgentPool()
/// create and scale. For example, key=value:NoSchedule.
/// The ID for Proximity
/// Placement Group.
- public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
+ public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
: base(id, name, type)
{
Count = count;
VmSize = vmSize;
OsDiskSizeGB = osDiskSizeGB;
+ OsDiskType = osDiskType;
VnetSubnetID = vnetSubnetID;
MaxPods = maxPods;
OsType = osType;
@@ -167,6 +174,7 @@ public AgentPool()
NodeImageVersion = nodeImageVersion;
UpgradeSettings = upgradeSettings;
ProvisioningState = provisioningState;
+ PowerState = powerState;
AvailabilityZones = availabilityZones;
EnableNodePublicIP = enableNodePublicIP;
ScaleSetPriority = scaleSetPriority;
@@ -262,6 +270,15 @@ public AgentPool()
[JsonProperty(PropertyName = "properties.osDiskSizeGB")]
public int? OsDiskSizeGB { get; set; }
+ ///
+ /// Gets or sets 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'
+ ///
+ [JsonProperty(PropertyName = "properties.osDiskType")]
+ public string OsDiskType { get; set; }
+
///
/// Gets or sets vNet SubnetID specifies the VNet's subnet identifier.
///
@@ -341,6 +358,12 @@ public AgentPool()
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
+ ///
+ /// Gets describes whether the Agent Pool is Running or Stopped
+ ///
+ [JsonProperty(PropertyName = "properties.powerState")]
+ public PowerState PowerState { get; private set; }
+
///
/// Gets or sets availability zones for nodes. Must use
/// VirtualMachineScaleSets AgentPoolType.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs
new file mode 100644
index 0000000000000..fcfc7f251aff5
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs
@@ -0,0 +1,22 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+
+ ///
+ /// Defines values for Code.
+ ///
+ public static class Code
+ {
+ public const string Running = "Running";
+ public const string Stopped = "Stopped";
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs
new file mode 100644
index 0000000000000..f8ba01bcb1b9b
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs
@@ -0,0 +1,23 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+
+ ///
+ /// Defines values for Expander.
+ ///
+ public static class Expander
+ {
+ public const string LeastWaste = "least-waste";
+ public const string MostPods = "most-pods";
+ public const string Random = "random";
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
index 09c0a914bfa84..41eb8f453aeab 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
@@ -41,6 +41,8 @@ public ManagedCluster()
/// Resource tags
/// The current deployment or
/// provisioning state, which only appears in the response.
+ /// Represents the Power State of the
+ /// cluster
/// The max number of agent pools for the
/// managed cluster.
/// Version of Kubernetes specified
@@ -83,10 +85,11 @@ public ManagedCluster()
/// The identity of the managed cluster, if
/// configured.
/// The managed cluster SKU.
- public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), string privateFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), ManagedClusterIdentity identity = default(ManagedClusterIdentity), ManagedClusterSKU sku = default(ManagedClusterSKU))
+ public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), string privateFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), ManagedClusterIdentity identity = default(ManagedClusterIdentity), ManagedClusterSKU sku = default(ManagedClusterSKU))
: base(location, id, name, type, tags)
{
ProvisioningState = provisioningState;
+ PowerState = powerState;
MaxAgentPools = maxAgentPools;
KubernetesVersion = kubernetesVersion;
DnsPrefix = dnsPrefix;
@@ -123,6 +126,12 @@ public ManagedCluster()
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
+ ///
+ /// Gets represents the Power State of the cluster
+ ///
+ [JsonProperty(PropertyName = "properties.powerState")]
+ public PowerState PowerState { get; private set; }
+
///
/// Gets the max number of agent pools for the managed cluster.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs
index fe1f89d386bc8..dde6436b015b2 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs
@@ -99,6 +99,10 @@ public ManagedClusterAgentPoolProfile()
/// the disk size for every machine in this master/agent pool. If you
/// specify 0, it will apply the default osDisk size according to the
/// vmSize specified.
+ /// 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'
/// VNet SubnetID specifies the VNet's
/// subnet identifier.
/// Maximum number of pods that can run on a
@@ -124,6 +128,8 @@ public ManagedClusterAgentPoolProfile()
/// agentpool
/// The current deployment or
/// provisioning state, which only appears in the response.
+ /// Describes whether the Agent Pool is
+ /// Running or Stopped
/// Availability zones for nodes. Must
/// use VirtualMachineScaleSets AgentPoolType.
/// Enable public IP for nodes
@@ -146,8 +152,8 @@ public ManagedClusterAgentPoolProfile()
/// create and scale. For example, key=value:NoSchedule.
/// The ID for Proximity
/// Placement Group.
- public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
- : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID)
+ public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
+ : base(count, vmSize, osDiskSizeGB, osDiskType, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID)
{
Name = name;
CustomInit();
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs
index f2b7ff21fa52a..aa1db67818095 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs
@@ -96,6 +96,10 @@ public ManagedClusterAgentPoolProfileProperties()
/// the disk size for every machine in this master/agent pool. If you
/// specify 0, it will apply the default osDisk size according to the
/// vmSize specified.
+ /// 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'
/// VNet SubnetID specifies the VNet's
/// subnet identifier.
/// Maximum number of pods that can run on a
@@ -121,6 +125,8 @@ public ManagedClusterAgentPoolProfileProperties()
/// agentpool
/// The current deployment or
/// provisioning state, which only appears in the response.
+ /// Describes whether the Agent Pool is
+ /// Running or Stopped
/// Availability zones for nodes. Must
/// use VirtualMachineScaleSets AgentPoolType.
/// Enable public IP for nodes
@@ -143,11 +149,12 @@ public ManagedClusterAgentPoolProfileProperties()
/// create and scale. For example, key=value:NoSchedule.
/// The ID for Proximity
/// Placement Group.
- public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
+ public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string))
{
Count = count;
VmSize = vmSize;
OsDiskSizeGB = osDiskSizeGB;
+ OsDiskType = osDiskType;
VnetSubnetID = vnetSubnetID;
MaxPods = maxPods;
OsType = osType;
@@ -160,6 +167,7 @@ public ManagedClusterAgentPoolProfileProperties()
NodeImageVersion = nodeImageVersion;
UpgradeSettings = upgradeSettings;
ProvisioningState = provisioningState;
+ PowerState = powerState;
AvailabilityZones = availabilityZones;
EnableNodePublicIP = enableNodePublicIP;
ScaleSetPriority = scaleSetPriority;
@@ -255,6 +263,15 @@ public ManagedClusterAgentPoolProfileProperties()
[JsonProperty(PropertyName = "osDiskSizeGB")]
public int? OsDiskSizeGB { get; set; }
+ ///
+ /// Gets or sets 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'
+ ///
+ [JsonProperty(PropertyName = "osDiskType")]
+ public string OsDiskType { get; set; }
+
///
/// Gets or sets vNet SubnetID specifies the VNet's subnet identifier.
///
@@ -334,6 +351,12 @@ public ManagedClusterAgentPoolProfileProperties()
[JsonProperty(PropertyName = "provisioningState")]
public string ProvisioningState { get; private set; }
+ ///
+ /// Gets describes whether the Agent Pool is Running or Stopped
+ ///
+ [JsonProperty(PropertyName = "powerState")]
+ public PowerState PowerState { get; private set; }
+
///
/// Gets or sets availability zones for nodes. Must use
/// VirtualMachineScaleSets AgentPoolType.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs
index a379f5ed844f5..dad6dbd5a33ec 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs
@@ -31,9 +31,17 @@ public ManagedClusterPropertiesAutoScalerProfile()
/// Initializes a new instance of the
/// ManagedClusterPropertiesAutoScalerProfile class.
///
- public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string maxGracefulTerminationSec = default(string))
+ /// Possible values include: 'least-waste',
+ /// 'most-pods', 'random'
+ public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string expander = default(string), string maxEmptyBulkDelete = default(string), string maxGracefulTerminationSec = default(string), string maxTotalUnreadyPercentage = default(string), string newPodScaleUpDelay = default(string), string okTotalUnreadyCount = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string skipNodesWithLocalStorage = default(string), string skipNodesWithSystemPods = default(string))
{
BalanceSimilarNodeGroups = balanceSimilarNodeGroups;
+ Expander = expander;
+ MaxEmptyBulkDelete = maxEmptyBulkDelete;
+ MaxGracefulTerminationSec = maxGracefulTerminationSec;
+ MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage;
+ NewPodScaleUpDelay = newPodScaleUpDelay;
+ OkTotalUnreadyCount = okTotalUnreadyCount;
ScanInterval = scanInterval;
ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd;
ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete;
@@ -41,7 +49,8 @@ public ManagedClusterPropertiesAutoScalerProfile()
ScaleDownUnneededTime = scaleDownUnneededTime;
ScaleDownUnreadyTime = scaleDownUnreadyTime;
ScaleDownUtilizationThreshold = scaleDownUtilizationThreshold;
- MaxGracefulTerminationSec = maxGracefulTerminationSec;
+ SkipNodesWithLocalStorage = skipNodesWithLocalStorage;
+ SkipNodesWithSystemPods = skipNodesWithSystemPods;
CustomInit();
}
@@ -55,6 +64,38 @@ public ManagedClusterPropertiesAutoScalerProfile()
[JsonProperty(PropertyName = "balance-similar-node-groups")]
public string BalanceSimilarNodeGroups { get; set; }
+ ///
+ /// Gets or sets possible values include: 'least-waste', 'most-pods',
+ /// 'random'
+ ///
+ [JsonProperty(PropertyName = "expander")]
+ public string Expander { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "max-empty-bulk-delete")]
+ public string MaxEmptyBulkDelete { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "max-graceful-termination-sec")]
+ public string MaxGracefulTerminationSec { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "max-total-unready-percentage")]
+ public string MaxTotalUnreadyPercentage { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "new-pod-scale-up-delay")]
+ public string NewPodScaleUpDelay { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "ok-total-unready-count")]
+ public string OkTotalUnreadyCount { get; set; }
+
///
///
[JsonProperty(PropertyName = "scan-interval")]
@@ -92,8 +133,13 @@ public ManagedClusterPropertiesAutoScalerProfile()
///
///
- [JsonProperty(PropertyName = "max-graceful-termination-sec")]
- public string MaxGracefulTerminationSec { get; set; }
+ [JsonProperty(PropertyName = "skip-nodes-with-local-storage")]
+ public string SkipNodesWithLocalStorage { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "skip-nodes-with-system-pods")]
+ public string SkipNodesWithSystemPods { get; set; }
}
}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs
index 9855f66a76830..cd8078ecf9aca 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs
@@ -32,10 +32,26 @@ public ManagedClusterWindowsProfile()
/// Initializes a new instance of the ManagedClusterWindowsProfile
/// class.
///
- /// The administrator username to use for
- /// Windows VMs.
- /// The administrator password to use for
- /// Windows VMs.
+ /// Specifies the name of the administrator
+ /// account. <br><br> **restriction:** Cannot end in "."
+ /// <br><br> **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". <br><br> **Minimum-length:**
+ /// 1 character <br><br> **Max-length:** 20
+ /// characters
+ /// Specifies the password of the
+ /// administrator account. <br><br> **Minimum-length:** 8
+ /// characters <br><br> **Max-length:** 123 characters
+ /// <br><br> **Complexity requirements:** 3 out of 4
+ /// conditions below need to be fulfilled <br> Has lower
+ /// characters <br>Has upper characters <br> Has a digit
+ /// <br> Has a special character (Regex match [\W_])
+ /// <br><br> **Disallowed values:** "abc@123", "P@$$w0rd",
+ /// "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!",
+ /// "Password1", "Password22", "iloveyou!"
/// The licenseType to use for Windows VMs.
/// Windows_Server is used to enable Azure Hybrid User Benefits for
/// Windows VMs. Possible values include: 'None',
@@ -54,13 +70,33 @@ public ManagedClusterWindowsProfile()
partial void CustomInit();
///
- /// Gets or sets the administrator username to use for Windows VMs.
+ /// Gets or sets specifies the name of the administrator account.
+ /// <br><br> **restriction:** Cannot end in
+ /// "." <br><br> **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".
+ /// <br><br> **Minimum-length:** 1
+ /// character <br><br> **Max-length:** 20
+ /// characters
///
[JsonProperty(PropertyName = "adminUsername")]
public string AdminUsername { get; set; }
///
- /// Gets or sets the administrator password to use for Windows VMs.
+ /// Gets or sets specifies the password of the administrator account.
+ /// <br><br> **Minimum-length:** 8
+ /// characters <br><br> **Max-length:** 123
+ /// characters <br><br> **Complexity
+ /// requirements:** 3 out of 4 conditions below need to be fulfilled
+ /// <br> Has lower characters <br>Has upper
+ /// characters <br> Has a digit <br> Has a
+ /// special character (Regex match [\W_])
+ /// <br><br> **Disallowed values:**
+ /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word",
+ /// "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
///
[JsonProperty(PropertyName = "adminPassword")]
public string AdminPassword { get; set; }
@@ -85,20 +121,6 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername");
}
- if (AdminUsername != null)
- {
- if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$");
- }
- }
- if (AdminPassword != null)
- {
- if (!System.Text.RegularExpressions.Regex.IsMatch(AdminPassword, "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "AdminPassword", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$");
- }
- }
}
}
}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs
new file mode 100644
index 0000000000000..6e51e4062eaa3
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs
@@ -0,0 +1,22 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+
+ ///
+ /// Defines values for OSDiskType.
+ ///
+ public static class OSDiskType
+ {
+ public const string Managed = "Managed";
+ public const string Ephemeral = "Ephemeral";
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs
new file mode 100644
index 0000000000000..bc3c17706c5b6
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs
@@ -0,0 +1,53 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the Power State of the cluster
+ ///
+ public partial class PowerState
+ {
+ ///
+ /// Initializes a new instance of the PowerState class.
+ ///
+ public PowerState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PowerState class.
+ ///
+ /// Tells whether the cluster is Running or Stopped.
+ /// Possible values include: 'Running', 'Stopped'
+ public PowerState(string code = default(string))
+ {
+ Code = code;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets tells whether the cluster is Running or Stopped.
+ /// Possible values include: 'Running', 'Stopped'
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs
new file mode 100644
index 0000000000000..a765914f95036
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs
@@ -0,0 +1,96 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A private link resource
+ ///
+ public partial class PrivateLinkResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ public PrivateLinkResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ /// The ID of the private link resource.
+ /// The name of the private link resource.
+ /// The resource type.
+ /// The group ID of the resource.
+ /// RequiredMembers of the
+ /// resource
+ /// The private link service ID of
+ /// the resource, this field is exposed only to NRP internally.
+ public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), string privateLinkServiceID = default(string))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ PrivateLinkServiceID = privateLinkServiceID;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the ID of the private link resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets the name of the private link resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the resource type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the group ID of the resource.
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; set; }
+
+ ///
+ /// Gets or sets requiredMembers of the resource
+ ///
+ [JsonProperty(PropertyName = "requiredMembers")]
+ public IList RequiredMembers { get; set; }
+
+ ///
+ /// Gets the private link service ID of the resource, this field is
+ /// exposed only to NRP internally.
+ ///
+ [JsonProperty(PropertyName = "privateLinkServiceID")]
+ public string PrivateLinkServiceID { get; private set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs
new file mode 100644
index 0000000000000..87267651779d9
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs
@@ -0,0 +1,55 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A list of private link resources
+ ///
+ public partial class PrivateLinkResourcesListResult
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResourcesListResult
+ /// class.
+ ///
+ public PrivateLinkResourcesListResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResourcesListResult
+ /// class.
+ ///
+ /// The collection value.
+ public PrivateLinkResourcesListResult(IList value = default(IList))
+ {
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the collection value.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs
index 9aa03fa35215e..1f4daff56d3a6 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs
@@ -70,7 +70,7 @@ internal Operations(ContainerServiceClient client)
///
public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs
index 4a6f473035d38..2ff59464abfae 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs
@@ -122,7 +122,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
}
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -349,7 +349,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -588,7 +588,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client)
{
parameters.Validate();
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -848,7 +848,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-09-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs
new file mode 100644
index 0000000000000..8ee2c81f7bed0
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs
@@ -0,0 +1,274 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResourcesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PrivateLinkResourcesOperations(ContainerServiceClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the ContainerServiceClient
+ ///
+ public ContainerServiceClient Client { get; private set; }
+
+ ///
+ /// Gets a list of private link resources in the specified managed cluster.
+ ///
+ ///
+ /// Gets a list of private link resources in the specified managed cluster. The
+ /// operation returns properties of each private link resource.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (resourceName != null)
+ {
+ if (resourceName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63);
+ }
+ if (resourceName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
+ }
+ }
+ string apiVersion = "2020-09-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs
new file mode 100644
index 0000000000000..24229e29bd676
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs
@@ -0,0 +1,73 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for PrivateLinkResourcesOperations.
+ ///
+ public static partial class PrivateLinkResourcesOperationsExtensions
+ {
+ ///
+ /// Gets a list of private link resources in the specified managed cluster.
+ ///
+ ///
+ /// Gets a list of private link resources in the specified managed cluster. The
+ /// operation returns properties of each private link resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ public static PrivateLinkResourcesListResult List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName)
+ {
+ return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of private link resources in the specified managed cluster.
+ ///
+ ///
+ /// Gets a list of private link resources in the specified managed cluster. The
+ /// operation returns properties of each private link resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs
new file mode 100644
index 0000000000000..48712faf8679b
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs
@@ -0,0 +1,288 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ResolvePrivateLinkServiceIdOperations operations.
+ ///
+ internal partial class ResolvePrivateLinkServiceIdOperations : IServiceOperations, IResolvePrivateLinkServiceIdOperations
+ {
+ ///
+ /// Initializes a new instance of the ResolvePrivateLinkServiceIdOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the ContainerServiceClient
+ ///
+ public ContainerServiceClient Client { get; private set; }
+
+ ///
+ /// Gets the private link service ID for the specified managed cluster.
+ ///
+ ///
+ /// Gets the private link service ID the specified managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Parameters (name, groupId) supplied in order to resolve a private link
+ /// service ID.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (resourceName != null)
+ {
+ if (resourceName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63);
+ }
+ if (resourceName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
+ }
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ string apiVersion = "2020-09-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "POST", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs
new file mode 100644
index 0000000000000..90c268c348846
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs
@@ -0,0 +1,79 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.ContainerService
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for ResolvePrivateLinkServiceIdOperations.
+ ///
+ public static partial class ResolvePrivateLinkServiceIdOperationsExtensions
+ {
+ ///
+ /// Gets the private link service ID for the specified managed cluster.
+ ///
+ ///
+ /// Gets the private link service ID the specified managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Parameters (name, groupId) supplied in order to resolve a private link
+ /// service ID.
+ ///
+ public static PrivateLinkResource POST(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters)
+ {
+ return operations.POSTAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the private link service ID for the specified managed cluster.
+ ///
+ ///
+ /// Gets the private link service ID the specified managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Parameters (name, groupId) supplied in order to resolve a private link
+ /// service ID.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task POSTAsync(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.POSTWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs
index bb2cb6f0ea604..80c80f01d64d1 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs
@@ -19,26 +19,17 @@ public static IEnumerable> ApiInfo_ContainerServic
{
return new Tuple[]
{
- new Tuple("ContainerService", "AgentPools", "2020-07-01"),
+ new Tuple("ContainerService", "AgentPools", "2020-09-01"),
new Tuple("ContainerService", "ContainerServices", "2017-07-01"),
new Tuple("ContainerService", "ContainerServices", "2019-08-01"),
- new Tuple("ContainerService", "ManagedClusters", "2020-07-01"),
+ new Tuple("ContainerService", "ManagedClusters", "2020-09-01"),
new Tuple("ContainerService", "OpenShiftManagedClusters", "2019-04-30"),
- new Tuple("ContainerService", "Operations", "2020-07-01"),
- new Tuple("ContainerService", "PrivateEndpointConnections", "2020-07-01"),
+ new Tuple("ContainerService", "Operations", "2020-09-01"),
+ new Tuple("ContainerService", "PrivateEndpointConnections", "2020-09-01"),
+ new Tuple("ContainerService", "PrivateLinkResources", "2020-09-01"),
+ new Tuple("ContainerService", "ResolvePrivateLinkServiceId", "2020-09-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerservice/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\abelch\\src\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "122829cebe6e4177e9eb6ff349071d3e2034b0e7";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-