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..57e020a866783 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
@@ -53,10 +53,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// Gets a list of agent pools in the specified managed cluster.
///
- ///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
- ///
///
/// The name of the resource group.
///
@@ -86,6 +82,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -120,7 +120,6 @@ 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";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -128,7 +127,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -141,9 +139,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -251,7 +249,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -271,11 +269,8 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Gets the agent pool.
+ /// Gets the specified managed cluster agent pool.
///
- ///
- /// Gets the details of the agent pool by managed cluster and resource group.
- ///
///
/// The name of the resource group.
///
@@ -308,6 +303,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -346,7 +345,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -354,7 +352,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("agentPoolName", agentPoolName);
@@ -369,9 +366,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
_url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -499,11 +496,8 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Creates or updates an agent pool.
- ///
- ///
/// Creates or updates an agent pool in the specified managed cluster.
- ///
+ ///
///
/// The name of the resource group.
///
@@ -514,7 +508,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// The name of the agent pool.
///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
///
/// The headers that will be added to request.
@@ -530,11 +524,8 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -558,12 +549,8 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Gets upgrade profile for an agent pool.
+ /// Gets the upgrade profile for an agent pool.
///
- ///
- /// Gets the details of the upgrade profile for an agent pool with a specified
- /// resource group and managed cluster name.
- ///
///
/// The name of the resource group.
///
@@ -596,6 +583,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -634,7 +625,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -642,7 +632,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("agentPoolName", agentPoolName);
@@ -657,9 +646,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
_url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -787,10 +776,12 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// Gets a list of supported Kubernetes versions for the specified agent pool.
///
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// See [supported Kubernetes
+ /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions)
+ /// for more details about the version lifecycle.
///
///
/// The name of the resource group.
@@ -821,6 +812,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -855,7 +850,6 @@ 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";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -863,7 +857,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -876,9 +869,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -1006,10 +999,13 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Creates or updates an agent pool.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Creates or updates an agent pool in the specified managed cluster.
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
/// The name of the resource group.
@@ -1020,8 +1016,33 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// 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 in the specified managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
///
/// Headers that will be added to request.
@@ -1046,6 +1067,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1088,7 +1113,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2020-07-01";
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1096,7 +1124,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("agentPoolName", agentPoolName);
@@ -1112,9 +1139,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
_url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -1266,11 +1293,8 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -1300,6 +1324,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1338,7 +1366,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
}
- string apiVersion = "2020-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1346,7 +1373,6 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("agentPoolName", agentPoolName);
@@ -1361,9 +1387,9 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
_url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
List _queryParameters = new List();
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -1473,12 +1499,241 @@ internal AgentPoolsOperations(ContainerServiceClient client)
}
///
- /// Gets a list of agent pools in the specified managed cluster.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
+ ///
+ /// 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.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ 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 (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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.
+ ///
///
/// The NextLink from the previous successful call to List operation.
///
@@ -1630,7 +1885,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
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..e0c7263272e9d 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
@@ -24,10 +24,6 @@ public static partial class AgentPoolsOperationsExtensions
///
/// Gets a list of agent pools in the specified managed cluster.
///
- ///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
- ///
///
/// The operations group for this extension method.
///
@@ -45,10 +41,6 @@ public static IPage List(this IAgentPoolsOperations operations, strin
///
/// Gets a list of agent pools in the specified managed cluster.
///
- ///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
- ///
///
/// The operations group for this extension method.
///
@@ -70,11 +62,8 @@ public static IPage List(this IAgentPoolsOperations operations, strin
}
///
- /// Gets the agent pool.
+ /// Gets the specified managed cluster agent pool.
///
- ///
- /// Gets the details of the agent pool by managed cluster and resource group.
- ///
///
/// The operations group for this extension method.
///
@@ -93,11 +82,8 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour
}
///
- /// Gets the agent pool.
+ /// Gets the specified managed cluster agent pool.
///
- ///
- /// Gets the details of the agent pool by managed cluster and resource group.
- ///
///
/// The operations group for this extension method.
///
@@ -122,11 +108,8 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour
}
///
- /// Creates or updates an agent pool.
- ///
- ///
/// Creates or updates an agent pool in the specified managed cluster.
- ///
+ ///
///
/// The operations group for this extension method.
///
@@ -140,7 +123,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour
/// The name of the agent pool.
///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters)
{
@@ -148,11 +131,8 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
}
///
- /// Creates or updates an agent pool.
- ///
- ///
/// Creates or updates an agent pool in the specified managed cluster.
- ///
+ ///
///
/// The operations group for this extension method.
///
@@ -166,7 +146,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
/// The name of the agent pool.
///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
///
/// The cancellation token.
@@ -180,11 +160,8 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The operations group for this extension method.
///
@@ -203,11 +180,8 @@ public static void Delete(this IAgentPoolsOperations operations, string resource
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The operations group for this extension method.
///
@@ -229,12 +203,8 @@ public static void Delete(this IAgentPoolsOperations operations, string resource
}
///
- /// Gets upgrade profile for an agent pool.
+ /// Gets the upgrade profile for an agent pool.
///
- ///
- /// Gets the details of the upgrade profile for an agent pool with a specified
- /// resource group and managed cluster name.
- ///
///
/// The operations group for this extension method.
///
@@ -253,12 +223,8 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio
}
///
- /// Gets upgrade profile for an agent pool.
+ /// Gets the upgrade profile for an agent pool.
///
- ///
- /// Gets the details of the upgrade profile for an agent pool with a specified
- /// resource group and managed cluster name.
- ///
///
/// The operations group for this extension method.
///
@@ -283,10 +249,12 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio
}
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// Gets a list of supported Kubernetes versions for the specified agent pool.
///
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// See [supported Kubernetes
+ /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions)
+ /// for more details about the version lifecycle.
///
///
/// The operations group for this extension method.
@@ -303,10 +271,12 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
}
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// Gets a list of supported Kubernetes versions for the specified agent pool.
///
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// See [supported Kubernetes
+ /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions)
+ /// for more details about the version lifecycle.
///
///
/// The operations group for this extension method.
@@ -329,10 +299,13 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
}
///
- /// Creates or updates an agent pool.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Creates or updates an agent pool in the specified managed cluster.
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
/// The operations group for this extension method.
@@ -346,8 +319,60 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
///
/// 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();
+ }
+
+ ///
+ /// Upgrades the node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
+ ///
+ ///
+ /// 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 in the specified managed cluster.
+ ///
+ ///
+ /// 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.
+ ///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters)
{
@@ -355,11 +380,8 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
}
///
- /// Creates or updates an agent pool.
- ///
- ///
/// Creates or updates an agent pool in the specified managed cluster.
- ///
+ ///
///
/// The operations group for this extension method.
///
@@ -373,7 +395,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
/// The name of the agent pool.
///
///
- /// Parameters supplied to the Create or Update an agent pool operation.
+ /// The agent pool to create or update.
///
///
/// The cancellation token.
@@ -387,11 +409,8 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The operations group for this extension method.
///
@@ -410,11 +429,8 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
}
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The operations group for this extension method.
///
@@ -436,15 +452,69 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
}
///
- /// Gets a list of agent pools in the specified managed cluster.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
/// 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();
+ }
+
+ ///
+ /// Upgrades the node image version of an agent pool to the latest.
+ ///
+ ///
+ /// Upgrading the node image version of an agent pool applies the newest OS and
+ /// runtime updates to the nodes. AKS provides one new image per week with the
+ /// latest updates. For more details on node image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
///
/// The NextLink from the previous successful call to List operation.
///
@@ -456,10 +526,6 @@ public static IPage ListNext(this IAgentPoolsOperations operations, s
///
/// Gets a list of agent pools in the specified managed cluster.
///
- ///
- /// Gets a list of agent pools in the specified managed cluster. The operation
- /// returns properties of each agent pool.
- ///
///
/// The operations group for this extension method.
///
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..8ec676a4cb842 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
@@ -53,6 +53,11 @@ public partial class ContainerServiceClient : ServiceClient
public string SubscriptionId { get; set; }
+ ///
+ /// Client Api Version.
+ ///
+ public string ApiVersion { get; private set; }
+
///
/// The preferred language for the response.
///
@@ -71,16 +76,6 @@ public partial class ContainerServiceClient : ServiceClient
public bool? GenerateClientRequestId { get; set; }
- ///
- /// Gets the IOpenShiftManagedClustersOperations.
- ///
- public virtual IOpenShiftManagedClustersOperations OpenShiftManagedClusters { get; private set; }
-
- ///
- /// Gets the IContainerServicesOperations.
- ///
- public virtual IContainerServicesOperations ContainerServices { get; private set; }
-
///
/// Gets the IOperations.
///
@@ -91,6 +86,11 @@ public partial class ContainerServiceClient : ServiceClient
public virtual IManagedClustersOperations ManagedClusters { get; private set; }
+ ///
+ /// Gets the IMaintenanceConfigurationsOperations.
+ ///
+ public virtual IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; private set; }
+
///
/// Gets the IAgentPoolsOperations.
///
@@ -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.
///
@@ -342,13 +352,15 @@ public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials crede
///
private void Initialize()
{
- OpenShiftManagedClusters = new OpenShiftManagedClustersOperations(this);
- ContainerServices = new ContainerServicesOperations(this);
Operations = new Operations(this);
ManagedClusters = new ManagedClustersOperations(this);
+ MaintenanceConfigurations = new MaintenanceConfigurationsOperations(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");
+ ApiVersion = "2021-05-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
@@ -378,8 +390,6 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind"));
CustomInitialize();
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs
deleted file mode 100644
index 564aab6846208..0000000000000
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs
+++ /dev/null
@@ -1,1689 +0,0 @@
-//
-// 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;
-
- ///
- /// ContainerServicesOperations operations.
- ///
- internal partial class ContainerServicesOperations : IServiceOperations, IContainerServicesOperations
- {
- ///
- /// Initializes a new instance of the ContainerServicesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal ContainerServicesOperations(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 container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2017-07-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("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}/providers/Microsoft.ContainerService/containerServices").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- 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;
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets the properties of the specified container service.
- ///
- ///
- /// Gets the properties of the specified container service in the specified
- /// subscription and resource group. The operation returns the properties
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (containerServiceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2017-07-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("containerServiceName", containerServiceName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", 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/containerServices/{containerServiceName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- 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;
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2017-07-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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/containerServices").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- 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;
- }
-
- ///
- /// Gets a list of supported orchestrators in the specified subscription.
- ///
- ///
- /// Gets a list of supported orchestrators in the specified subscription. The
- /// operation returns properties of each orchestrator including version,
- /// available upgrades and whether that version or upgrades are in preview.
- ///
- ///
- /// The name of a supported Azure region.
- ///
- ///
- /// resource type for which the list of orchestrators needs to be returned
- ///
- ///
- /// 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> ListOrchestratorsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
- string apiVersion = "2019-08-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("location", location);
- tracingParameters.Add("resourceType", resourceType);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListOrchestrators", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (resourceType != null)
- {
- _queryParameters.Add(string.Format("resource-type={0}", System.Uri.EscapeDataString(resourceType)));
- }
- 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;
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (containerServiceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (parameters != null)
- {
- parameters.Validate();
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2017-07-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("containerServiceName", containerServiceName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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/containerServices/{containerServiceName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- 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("PUT");
- _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 && (int)_statusCode != 201 && (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 == 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);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _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);
- }
- }
- // 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;
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (containerServiceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2017-07-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("containerServiceName", containerServiceName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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/containerServices/{containerServiceName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- 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("DELETE");
- _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 != 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;
- }
- }
- 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)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- 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;
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// 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.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- 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/ContainerServicesOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperationsExtensions.cs
deleted file mode 100644
index bea8a4a2c4b8e..0000000000000
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperationsExtensions.cs
+++ /dev/null
@@ -1,547 +0,0 @@
-//
-// 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 ContainerServicesOperations.
- ///
- public static partial class ContainerServicesOperationsExtensions
- {
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static IPage List(this IContainerServicesOperations operations)
- {
- return operations.ListAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task> ListAsync(this IContainerServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static ContainerServiceModel CreateOrUpdate(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task CreateOrUpdateAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets the properties of the specified container service.
- ///
- ///
- /// Gets the properties of the specified container service in the specified
- /// subscription and resource group. The operation returns the properties
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static ContainerServiceModel Get(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName)
- {
- return operations.GetAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets the properties of the specified container service.
- ///
- ///
- /// Gets the properties of the specified container service in the specified
- /// subscription and resource group. The operation returns the properties
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task GetAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static void Delete(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName)
- {
- operations.DeleteAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task DeleteAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static IPage ListByResourceGroup(this IContainerServicesOperations operations, string resourceGroupName)
- {
- return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task> ListByResourceGroupAsync(this IContainerServicesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets a list of supported orchestrators in the specified subscription.
- ///
- ///
- /// Gets a list of supported orchestrators in the specified subscription. The
- /// operation returns properties of each orchestrator including version,
- /// available upgrades and whether that version or upgrades are in preview.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of a supported Azure region.
- ///
- ///
- /// resource type for which the list of orchestrators needs to be returned
- ///
- public static OrchestratorVersionProfileListResult ListOrchestrators(this IContainerServicesOperations operations, string location, string resourceType = default(string))
- {
- return operations.ListOrchestratorsAsync(location, resourceType).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a list of supported orchestrators in the specified subscription.
- ///
- ///
- /// Gets a list of supported orchestrators in the specified subscription. The
- /// operation returns properties of each orchestrator including version,
- /// available upgrades and whether that version or upgrades are in preview.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of a supported Azure region.
- ///
- ///
- /// resource type for which the list of orchestrators needs to be returned
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task ListOrchestratorsAsync(this IContainerServicesOperations operations, string location, string resourceType = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListOrchestratorsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static ContainerServiceModel BeginCreateOrUpdate(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters)
- {
- return operations.BeginCreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified configuration of
- /// orchestrator, masters, and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service operation.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task BeginCreateOrUpdateAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static void BeginDelete(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName)
- {
- operations.BeginDeleteAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified subscription and
- /// resource group. The operation does not delete other resources created as
- /// part of creating a container service, including storage accounts, VMs, and
- /// availability sets. All the other resources created with the container
- /// service are part of the same resource group and can be deleted
- /// individually.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task BeginDeleteAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static IPage ListNext(this IContainerServicesOperations operations, string nextPageLink)
- {
- return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription. The
- /// operation returns properties of each container service including state,
- /// orchestrator, number of masters and agents, and FQDNs of masters and
- /// agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task> ListNextAsync(this IContainerServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static IPage ListByResourceGroupNext(this IContainerServicesOperations operations, string nextPageLink)
- {
- return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and FQDNs of
- /// masters and agents.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- public static async Task> ListByResourceGroupNextAsync(this IContainerServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
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..7bf6c26939600 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
@@ -26,10 +26,6 @@ public partial interface IAgentPoolsOperations
///
/// Gets a list of agent pools in the specified managed cluster.
///
- ///
- /// Gets a list of agent pools in the specified managed cluster. The
- /// operation returns properties of each agent pool.
- ///
///
/// The name of the resource group.
///
@@ -53,12 +49,8 @@ public partial interface IAgentPoolsOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets the agent pool.
+ /// Gets the specified managed cluster agent pool.
///
- ///
- /// Gets the details of the agent pool by managed cluster and resource
- /// group.
- ///
///
/// The name of the resource group.
///
@@ -85,11 +77,8 @@ public partial interface IAgentPoolsOperations
///
Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates an agent pool.
- ///
- ///
/// Creates or updates an agent pool in the specified managed cluster.
- ///
+ ///
///
/// The name of the resource group.
///
@@ -100,8 +89,7 @@ public partial interface IAgentPoolsOperations
/// The name of the agent pool.
///
///
- /// Parameters supplied to the Create or Update an agent pool
- /// operation.
+ /// The agent pool to create or update.
///
///
/// The headers that will be added to request.
@@ -120,11 +108,8 @@ public partial interface IAgentPoolsOperations
///
Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -148,12 +133,8 @@ public partial interface IAgentPoolsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets upgrade profile for an agent pool.
+ /// Gets the upgrade profile for an agent pool.
///
- ///
- /// Gets the details of the upgrade profile for an agent pool with a
- /// specified resource group and managed cluster name.
- ///
///
/// The name of the resource group.
///
@@ -180,10 +161,13 @@ public partial interface IAgentPoolsOperations
///
Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// Gets a list of supported Kubernetes versions for the specified
+ /// agent pool.
///
///
- /// Gets a list of supported versions for the specified agent pool.
+ /// See [supported Kubernetes
+ /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions)
+ /// for more details about the version lifecycle.
///
///
/// The name of the resource group.
@@ -208,10 +192,14 @@ public partial interface IAgentPoolsOperations
///
Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates an agent pool.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Creates or updates an agent pool in the specified managed cluster.
+ /// Upgrading the node image version of an agent pool applies the
+ /// newest OS and runtime updates to the nodes. AKS provides one new
+ /// image per week with the latest updates. For more details on node
+ /// image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
/// The name of the resource group.
@@ -222,9 +210,36 @@ public partial interface IAgentPoolsOperations
///
/// 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 in the specified managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
///
- /// Parameters supplied to the Create or Update an agent pool
- /// operation.
+ /// The agent pool to create or update.
///
///
/// The headers that will be added to request.
@@ -243,11 +258,8 @@ public partial interface IAgentPoolsOperations
///
Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes an agent pool.
+ /// Deletes an agent pool in the specified managed cluster.
///
- ///
- /// Deletes the agent pool in the specified managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -271,12 +283,43 @@ public partial interface IAgentPoolsOperations
///
Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of agent pools in the specified managed cluster.
+ /// Upgrades the node image version of an agent pool to the latest.
///
///
- /// Gets a list of agent pools in the specified managed cluster. The
- /// operation returns properties of each agent pool.
+ /// Upgrading the node image version of an agent pool applies the
+ /// newest OS and runtime updates to the nodes. AKS provides one new
+ /// image per week with the latest updates. For more details on node
+ /// image versions, see:
+ /// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
+ ///
+ /// 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.
+ ///
///
/// The NextLink from the previous successful call to List operation.
///
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..2b88f1d250124 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
@@ -47,6 +47,11 @@ public partial interface IContainerServiceClient : System.IDisposable
///
string SubscriptionId { get; set; }
+ ///
+ /// Client Api Version.
+ ///
+ string ApiVersion { get; }
+
///
/// The preferred language for the response.
///
@@ -66,16 +71,6 @@ public partial interface IContainerServiceClient : System.IDisposable
bool? GenerateClientRequestId { get; set; }
- ///
- /// Gets the IOpenShiftManagedClustersOperations.
- ///
- IOpenShiftManagedClustersOperations OpenShiftManagedClusters { get; }
-
- ///
- /// Gets the IContainerServicesOperations.
- ///
- IContainerServicesOperations ContainerServices { get; }
-
///
/// Gets the IOperations.
///
@@ -86,6 +81,11 @@ public partial interface IContainerServiceClient : System.IDisposable
///
IManagedClustersOperations ManagedClusters { get; }
+ ///
+ /// Gets the IMaintenanceConfigurationsOperations.
+ ///
+ IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; }
+
///
/// Gets the IAgentPoolsOperations.
///
@@ -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/IContainerServicesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServicesOperations.cs
deleted file mode 100644
index a081424bad6c6..0000000000000
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServicesOperations.cs
+++ /dev/null
@@ -1,340 +0,0 @@
-//
-// 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;
-
- ///
- /// ContainerServicesOperations operations.
- ///
- public partial interface IContainerServicesOperations
- {
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription.
- /// The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and
- /// FQDNs of masters and agents.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified
- /// configuration of orchestrator, masters, and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service
- /// operation.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets the properties of the specified container service.
- ///
- ///
- /// Gets the properties of the specified container service in the
- /// specified subscription and resource group. The operation returns
- /// the properties including state, orchestrator, number of masters and
- /// agents, and FQDNs of masters and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified
- /// subscription and resource group. The operation does not delete
- /// other resources created as part of creating a container service,
- /// including storage accounts, VMs, and availability sets. All the
- /// other resources created with the container service are part of the
- /// same resource group and can be deleted individually.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container
- /// service including state, orchestrator, number of masters and
- /// agents, and FQDNs of masters and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a list of supported orchestrators in the specified
- /// subscription.
- ///
- ///
- /// Gets a list of supported orchestrators in the specified
- /// subscription. The operation returns properties of each orchestrator
- /// including version, available upgrades and whether that version or
- /// upgrades are in preview.
- ///
- ///
- /// The name of a supported Azure region.
- ///
- ///
- /// resource type for which the list of orchestrators needs to be
- /// returned
- ///
- ///
- /// 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> ListOrchestratorsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Creates or updates a container service.
- ///
- ///
- /// Creates or updates a container service with the specified
- /// configuration of orchestrator, masters, and agents.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// Parameters supplied to the Create or Update a Container Service
- /// operation.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes the specified container service.
- ///
- ///
- /// Deletes the specified container service in the specified
- /// subscription and resource group. The operation does not delete
- /// other resources created as part of creating a container service,
- /// including storage accounts, VMs, and availability sets. All the
- /// other resources created with the container service are part of the
- /// same resource group and can be deleted individually.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the container service in the specified subscription and
- /// resource group.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a list of container services in the specified subscription.
- ///
- ///
- /// Gets a list of container services in the specified subscription.
- /// The operation returns properties of each container service
- /// including state, orchestrator, number of masters and agents, and
- /// FQDNs of masters and agents.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a list of container services in the specified resource group.
- ///
- ///
- /// Gets a list of container services in the specified subscription and
- /// resource group. The operation returns properties of each container
- /// service including state, orchestrator, number of masters and
- /// agents, and FQDNs of masters and agents.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// 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
- ///
- [System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
- Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs
new file mode 100644
index 0000000000000..8b6ea84dee6d5
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs
@@ -0,0 +1,161 @@
+//
+// 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;
+
+ ///
+ /// MaintenanceConfigurationsOperations operations.
+ ///
+ public partial interface IMaintenanceConfigurationsOperations
+ {
+ ///
+ /// Gets a list of maintenance configurations in the specified 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 unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the specified maintenance configuration of a managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the maintenance configuration.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a maintenance configuration in the specified
+ /// managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the maintenance configuration.
+ ///
+ ///
+ /// The maintenance configuration to create or update.
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a maintenance configuration.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The name of the maintenance configuration.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of maintenance configurations in the specified managed
+ /// cluster.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
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..23d59d0baea05 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
@@ -23,13 +23,34 @@ namespace Microsoft.Azure.Management.ContainerService
///
public partial interface IManagedClustersOperations
{
+ ///
+ /// Gets supported OS options in the specified subscription.
+ ///
+ ///
+ /// The name of a supported Azure region.
+ ///
+ ///
+ /// The resource type for which the OS options needs to be returned
+ ///
+ ///
+ /// 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> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of managed clusters in the specified subscription.
///
- ///
- /// Gets a list of managed clusters in the specified subscription. The
- /// operation returns properties of each managed cluster.
- ///
///
/// The headers that will be added to request.
///
@@ -50,10 +71,6 @@ public partial interface IManagedClustersOperations
/// Lists managed clusters in the specified subscription and resource
/// group.
///
- ///
- /// Lists managed clusters in the specified subscription and resource
- /// group. The operation returns properties of each managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -74,12 +91,8 @@ public partial interface IManagedClustersOperations
///
Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets upgrade profile for a managed cluster.
+ /// Gets the upgrade profile of a managed cluster.
///
- ///
- /// Gets the details of the upgrade profile for a managed cluster with
- /// a specified resource group and name.
- ///
///
/// The name of the resource group.
///
@@ -106,12 +119,10 @@ public partial interface IManagedClustersOperations
/// Gets an access profile of a managed cluster.
///
///
- /// Gets the accessProfile for the specified role name of the managed
- /// cluster with a specified resource group and name. **WARNING**: This
- /// API will be deprecated. Instead use
- /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials)
+ /// **WARNING**: This API will be deprecated. Instead use
+ /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials)
/// or
- /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials)
+ /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials)
/// .
///
///
@@ -141,18 +152,17 @@ public partial interface IManagedClustersOperations
[System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets cluster admin credential of a managed cluster.
+ /// Lists the admin credentials of a managed cluster.
///
- ///
- /// Gets cluster admin credential of the managed cluster with a
- /// specified resource group and name.
- ///
///
/// The name of the resource group.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// server fqdn type for credentials to be returned
+ ///
///
/// The headers that will be added to request.
///
@@ -168,20 +178,19 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets cluster user credential of a managed cluster.
+ /// Lists the user credentials of a managed cluster.
///
- ///
- /// Gets cluster user credential of the managed cluster with a
- /// specified resource group and name.
- ///
///
/// The name of the resource group.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// server fqdn type for credentials to be returned
+ ///
///
/// The headers that will be added to request.
///
@@ -197,20 +206,19 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets cluster monitoring user credential of a managed cluster.
+ /// Lists the cluster monitoring user credentials of a managed cluster.
///
- ///
- /// Gets cluster monitoring user credential of the managed cluster with
- /// a specified resource group and name.
- ///
///
/// The name of the resource group.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// server fqdn type for credentials to be returned
+ ///
///
/// The headers that will be added to request.
///
@@ -226,14 +234,10 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a managed cluster.
///
- ///
- /// Gets the details of the managed cluster with a specified resource
- /// group and name.
- ///
///
/// The name of the resource group.
///
@@ -259,10 +263,6 @@ public partial interface IManagedClustersOperations
///
/// Creates or updates a managed cluster.
///
- ///
- /// Creates or updates a managed cluster with the specified
- /// configuration for agents and Kubernetes version.
- ///
///
/// The name of the resource group.
///
@@ -270,8 +270,7 @@ public partial interface IManagedClustersOperations
/// The name of the managed cluster resource.
///
///
- /// Parameters supplied to the Create or Update a Managed Cluster
- /// operation.
+ /// The managed cluster to create or update.
///
///
/// The headers that will be added to request.
@@ -292,9 +291,6 @@ public partial interface IManagedClustersOperations
///
/// Updates tags on a managed cluster.
///
- ///
- /// Updates a managed cluster with the specified tags.
- ///
///
/// The name of the resource group.
///
@@ -323,10 +319,6 @@ public partial interface IManagedClustersOperations
///
/// Deletes a managed cluster.
///
- ///
- /// Deletes the managed cluster with a specified resource group and
- /// name.
- ///
///
/// The name of the resource group.
///
@@ -347,10 +339,11 @@ public partial interface IManagedClustersOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Reset Service Principal Profile of a managed cluster.
+ /// Reset the Service Principal Profile of a managed cluster.
///
///
- /// Update the service principal Profile for a managed cluster.
+ /// This action cannot be performed on a cluster that is not using a
+ /// service principal
///
///
/// The name of the resource group.
@@ -359,8 +352,7 @@ public partial interface IManagedClustersOperations
/// The name of the managed cluster resource.
///
///
- /// Parameters supplied to the Reset Service Principal Profile
- /// operation for a Managed Cluster.
+ /// The service principal profile to set on the managed cluster.
///
///
/// The headers that will be added to request.
@@ -376,11 +368,8 @@ public partial interface IManagedClustersOperations
///
Task ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Reset AAD Profile of a managed cluster.
+ /// Reset the AAD Profile of a managed cluster.
///
- ///
- /// Update the AAD Profile for a managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -388,8 +377,7 @@ public partial interface IManagedClustersOperations
/// The name of the managed cluster resource.
///
///
- /// Parameters supplied to the Reset AAD Profile operation for a
- /// Managed Cluster.
+ /// The AAD profile to set on the Managed Cluster
///
///
/// The headers that will be added to request.
@@ -405,10 +393,12 @@ public partial interface IManagedClustersOperations
///
Task ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Rotate certificates of a managed cluster.
+ /// Rotates the certificates of a managed cluster.
///
///
- /// Rotate certificates of a managed cluster.
+ /// See [Certificate
+ /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation)
+ /// for more details about rotating managed cluster certificates.
///
///
/// The name of the resource group.
@@ -430,10 +420,16 @@ 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.
+ /// Stops a Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// This can only be performed on Azure Virtual Machine Scale set
+ /// backed clusters. Stopping a cluster stops the control plane and
+ /// agent nodes entirely, while maintaining all object and cluster
+ /// state. A cluster does not accrue charges while it is stopped. See
+ /// [stopping a
+ /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster)
+ /// for more details about stopping a cluster.
///
///
/// The name of the resource group.
@@ -441,8 +437,62 @@ 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Starts a previously stopped Managed Cluster
+ ///
+ ///
+ /// See [starting a
+ /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster)
+ /// for more details about starting a 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 StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Submits a command to run against the Managed Cluster.
+ ///
+ ///
+ /// AKS will create a pod to run the command. This is primarily useful
+ /// for private clusters. For more information see [AKS Run
+ /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The run command request
///
///
/// The headers that will be added to request.
@@ -459,13 +509,44 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates a managed cluster.
+ /// Gets the results of a command which has been run on the Managed
+ /// Cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Id of the command.
+ ///
+ ///
+ /// 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> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of egress endpoints (network endpoints of all outbound
+ /// dependencies) in the specified managed cluster.
///
///
- /// Creates or updates a managed cluster with the specified
- /// configuration for agents and Kubernetes version.
+ /// Gets a list of egress endpoints (network endpoints of all outbound
+ /// dependencies) in the specified managed cluster. The operation
+ /// returns properties of each egress endpoint.
///
///
/// The name of the resource group.
@@ -473,9 +554,33 @@ public partial interface IManagedClustersOperations
///
/// 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>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a managed cluster.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
///
- /// Parameters supplied to the Create or Update a Managed Cluster
- /// operation.
+ /// The managed cluster to create or update.
///
///
/// The headers that will be added to request.
@@ -496,9 +601,6 @@ public partial interface IManagedClustersOperations
///
/// Updates tags on a managed cluster.
///
- ///
- /// Updates a managed cluster with the specified tags.
- ///
///
/// The name of the resource group.
///
@@ -527,10 +629,6 @@ public partial interface IManagedClustersOperations
///
/// Deletes a managed cluster.
///
- ///
- /// Deletes the managed cluster with a specified resource group and
- /// name.
- ///
///
/// The name of the resource group.
///
@@ -551,10 +649,11 @@ public partial interface IManagedClustersOperations
///
Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Reset Service Principal Profile of a managed cluster.
+ /// Reset the Service Principal Profile of a managed cluster.
///
///
- /// Update the service principal Profile for a managed cluster.
+ /// This action cannot be performed on a cluster that is not using a
+ /// service principal
///
///
/// The name of the resource group.
@@ -563,8 +662,7 @@ public partial interface IManagedClustersOperations
/// The name of the managed cluster resource.
///
///
- /// Parameters supplied to the Reset Service Principal Profile
- /// operation for a Managed Cluster.
+ /// The service principal profile to set on the managed cluster.
///
///
/// The headers that will be added to request.
@@ -580,11 +678,8 @@ public partial interface IManagedClustersOperations
///
Task BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Reset AAD Profile of a managed cluster.
+ /// Reset the AAD Profile of a managed cluster.
///
- ///
- /// Update the AAD Profile for a managed cluster.
- ///
///
/// The name of the resource group.
///
@@ -592,8 +687,7 @@ public partial interface IManagedClustersOperations
/// The name of the managed cluster resource.
///
///
- /// Parameters supplied to the Reset AAD Profile operation for a
- /// Managed Cluster.
+ /// The AAD profile to set on the Managed Cluster
///
///
/// The headers that will be added to request.
@@ -609,10 +703,12 @@ public partial interface IManagedClustersOperations
///
Task BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Rotate certificates of a managed cluster.
+ /// Rotates the certificates of a managed cluster.
///
///
- /// Rotate certificates of a managed cluster.
+ /// See [Certificate
+ /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation)
+ /// for more details about rotating managed cluster certificates.
///
///
/// The name of the resource group.
@@ -634,10 +730,43 @@ 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.
+ /// Stops a Managed Cluster
+ ///
+ ///
+ /// This can only be performed on Azure Virtual Machine Scale set
+ /// backed clusters. Stopping a cluster stops the control plane and
+ /// agent nodes entirely, while maintaining all object and cluster
+ /// state. A cluster does not accrue charges while it is stopped. See
+ /// [stopping a
+ /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster)
+ /// for more details about stopping a 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 BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Starts a previously stopped Managed Cluster
///
///
- /// Upgrade node image version of an agent pool to the latest.
+ /// See [starting a
+ /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster)
+ /// for more details about starting a cluster.
///
///
/// The name of the resource group.
@@ -645,8 +774,35 @@ 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Submits a command to run against the Managed Cluster.
+ ///
+ ///
+ /// AKS will create a pod to run the command. This is primarily useful
+ /// for private clusters. For more information see [AKS Run
+ /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The run command request
///
///
/// The headers that will be added to request.
@@ -663,14 +819,10 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary