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 57e020a86678..9ceaf43c292f 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs
@@ -54,7 +54,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Gets a list of agent pools in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -86,16 +86,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -272,7 +290,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Gets the specified managed cluster agent pool.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -307,16 +325,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -499,7 +535,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Creates or updates an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -527,7 +563,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Deletes an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -535,16 +571,20 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -552,7 +592,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Gets the upgrade profile for an agent pool.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -587,16 +627,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -784,7 +842,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// for more details about the version lifecycle.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -816,16 +874,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1008,7 +1084,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1022,10 +1098,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// The cancellation token.
///
- public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> 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);
+ AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -1033,7 +1109,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Creates or updates an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1071,16 +1147,34 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1296,7 +1390,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// Deletes an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1304,6 +1398,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// Headers that will be added to request.
///
@@ -1322,22 +1420,40 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1376,6 +1492,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("ignorePodDisruptionBudget", ignorePodDisruptionBudget);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
@@ -1391,6 +1508,10 @@ internal AgentPoolsOperations(ContainerServiceClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
+ if (ignorePodDisruptionBudget != null)
+ {
+ _queryParameters.Add(string.Format("ignore-pod-disruption-budget={0}", System.Uri.EscapeDataString(ignorePodDisruptionBudget)));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -1508,7 +1629,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
/// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1537,22 +1658,40 @@ internal AgentPoolsOperations(ContainerServiceClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> 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.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1699,7 +1838,7 @@ internal AgentPoolsOperations(ContainerServiceClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1724,6 +1863,19 @@ internal AgentPoolsOperations(ContainerServiceClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
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 e0c7263272e9..f2b308648386 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs
@@ -28,7 +28,7 @@ public static partial class AgentPoolsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -45,7 +45,7 @@ public static IPage List(this IAgentPoolsOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -68,7 +68,7 @@ public static IPage List(this IAgentPoolsOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -88,7 +88,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -114,7 +114,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -137,7 +137,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -166,7 +166,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -174,9 +174,13 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st
///
/// The name of the agent pool.
///
- public static void Delete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
+ public static void Delete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string))
{
- operations.DeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ operations.DeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget).GetAwaiter().GetResult();
}
///
@@ -186,7 +190,7 @@ public static void Delete(this IAgentPoolsOperations operations, string resource
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -194,12 +198,16 @@ public static void Delete(this IAgentPoolsOperations operations, string resource
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The cancellation token.
///
- public static async Task DeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -209,7 +217,7 @@ public static void Delete(this IAgentPoolsOperations operations, string resource
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -229,7 +237,7 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -260,7 +268,7 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -282,7 +290,7 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -311,7 +319,7 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -337,7 +345,7 @@ public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations opera
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -363,7 +371,7 @@ public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations opera
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -386,7 +394,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -415,7 +423,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -423,9 +431,13 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation
///
/// The name of the agent pool.
///
- public static void BeginDelete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName)
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
+ public static void BeginDelete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string))
{
- operations.BeginDeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult();
+ operations.BeginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget).GetAwaiter().GetResult();
}
///
@@ -435,7 +447,7 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -443,12 +455,16 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The cancellation token.
///
- public static async Task BeginDeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginDeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -464,7 +480,7 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -490,7 +506,7 @@ public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
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 79b8567011fc..e8712379b6c5 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs
@@ -47,14 +47,12 @@ public partial class ContainerServiceClient : ServiceClient
- /// Subscription credentials which uniquely identify Microsoft Azure
- /// subscription. The subscription ID forms part of the URI for every service
- /// call.
+ /// The ID of the target subscription.
///
public string SubscriptionId { get; set; }
///
- /// Client Api Version.
+ /// The API version to use for this operation.
///
public string ApiVersion { get; private set; }
@@ -111,6 +109,16 @@ public partial class ContainerServiceClient : ServiceClient
public virtual IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; private set; }
+ ///
+ /// Gets the ISnapshotsOperations.
+ ///
+ public virtual ISnapshotsOperations Snapshots { get; private set; }
+
+ ///
+ /// Gets the IManagedClusterSnapshotsOperations.
+ ///
+ public virtual IManagedClusterSnapshotsOperations ManagedClusterSnapshots { get; private set; }
+
///
/// Initializes a new instance of the ContainerServiceClient class.
///
@@ -359,8 +367,10 @@ private void Initialize()
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this);
+ Snapshots = new SnapshotsOperations(this);
+ ManagedClusterSnapshots = new ManagedClusterSnapshotsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-07-01";
+ ApiVersion = "2022-03-02-preview";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
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 7bf6c2693960..1f6fbbd5d3b8 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs
@@ -27,7 +27,7 @@ public partial interface IAgentPoolsOperations
/// Gets a list of agent pools in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -52,7 +52,7 @@ public partial interface IAgentPoolsOperations
/// Gets the specified managed cluster agent pool.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -80,7 +80,7 @@ public partial interface IAgentPoolsOperations
/// Creates or updates an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -111,7 +111,7 @@ public partial interface IAgentPoolsOperations
/// Deletes an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -119,6 +119,10 @@ public partial interface IAgentPoolsOperations
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node
+ /// without considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
@@ -131,12 +135,12 @@ public partial interface IAgentPoolsOperations
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the upgrade profile for an agent pool.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -170,7 +174,7 @@ public partial interface IAgentPoolsOperations
/// for more details about the version lifecycle.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -202,7 +206,7 @@ public partial interface IAgentPoolsOperations
/// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -225,12 +229,12 @@ public partial interface IAgentPoolsOperations
///
/// Thrown when a required parameter is null
///
- Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ 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 resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -261,7 +265,7 @@ public partial interface IAgentPoolsOperations
/// Deletes an agent pool in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -269,6 +273,10 @@ public partial interface IAgentPoolsOperations
///
/// The name of the agent pool.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node
+ /// without considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
@@ -281,7 +289,7 @@ public partial interface IAgentPoolsOperations
///
/// Thrown when a required parameter is null
///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Upgrades the node image version of an agent pool to the latest.
///
@@ -293,7 +301,7 @@ public partial interface IAgentPoolsOperations
/// https://docs.microsoft.com/azure/aks/node-image-upgrade
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -316,7 +324,7 @@ public partial interface IAgentPoolsOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of agent pools in the specified managed cluster.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
index 2b88f1d25012..5c011d8eef25 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs
@@ -41,14 +41,12 @@ public partial interface IContainerServiceClient : System.IDisposable
ServiceClientCredentials Credentials { get; }
///
- /// Subscription credentials which uniquely identify Microsoft Azure
- /// subscription. The subscription ID forms part of the URI for every
- /// service call.
+ /// The ID of the target subscription.
///
string SubscriptionId { get; set; }
///
- /// Client Api Version.
+ /// The API version to use for this operation.
///
string ApiVersion { get; }
@@ -106,5 +104,15 @@ public partial interface IContainerServiceClient : System.IDisposable
///
IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; }
+ ///
+ /// Gets the ISnapshotsOperations.
+ ///
+ ISnapshotsOperations Snapshots { get; }
+
+ ///
+ /// Gets the IManagedClusterSnapshotsOperations.
+ ///
+ IManagedClusterSnapshotsOperations ManagedClusterSnapshots { get; }
+
}
}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs
index 8b6ea84dee6d..aec8c81a7d30 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs
@@ -28,7 +28,7 @@ public partial interface IMaintenanceConfigurationsOperations
/// cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -53,7 +53,7 @@ public partial interface IMaintenanceConfigurationsOperations
/// Gets the specified maintenance configuration of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -82,7 +82,7 @@ public partial interface IMaintenanceConfigurationsOperations
/// managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -113,7 +113,7 @@ public partial interface IMaintenanceConfigurationsOperations
/// Deletes a maintenance configuration.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClusterSnapshotsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClusterSnapshotsOperations.cs
new file mode 100644
index 000000000000..99d24c6e1e05
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClusterSnapshotsOperations.cs
@@ -0,0 +1,219 @@
+//
+// 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;
+
+ ///
+ /// ManagedClusterSnapshotsOperations operations.
+ ///
+ public partial interface IManagedClusterSnapshotsOperations
+ {
+ ///
+ /// Gets a list of managed cluster snapshots in the specified
+ /// subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and
+ /// resource group.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The managed cluster snapshot 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, ManagedClusterSnapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of managed cluster snapshots in the specified
+ /// subscription.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and
+ /// resource group.
+ ///
+ ///
+ /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(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 23d59d0baea0..2c29b399d4b8 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs
@@ -27,7 +27,7 @@ public partial interface IManagedClustersOperations
/// Gets supported OS options in the specified subscription.
///
///
- /// The name of a supported Azure region.
+ /// The name of Azure region.
///
///
/// The resource type for which the OS options needs to be returned
@@ -72,7 +72,7 @@ public partial interface IManagedClustersOperations
/// group.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The headers that will be added to request.
@@ -94,7 +94,7 @@ public partial interface IManagedClustersOperations
/// Gets the upgrade profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -126,7 +126,7 @@ public partial interface IManagedClustersOperations
/// .
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -155,7 +155,7 @@ public partial interface IManagedClustersOperations
/// Lists the admin credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -183,7 +183,7 @@ public partial interface IManagedClustersOperations
/// Lists the user credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -191,6 +191,13 @@ public partial interface IManagedClustersOperations
///
/// server fqdn type for credentials to be returned
///
+ ///
+ /// Only apply to AAD clusters, specifies the format of returned
+ /// kubeconfig. Format 'azure' will return azure auth-provider
+ /// kubeconfig; format 'exec' will return exec format kubeconfig, which
+ /// requires kubelogin binary in the path. Possible values include:
+ /// 'azure', 'exec'
+ ///
///
/// The headers that will be added to request.
///
@@ -206,12 +213,12 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Lists the cluster monitoring user credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -239,7 +246,7 @@ public partial interface IManagedClustersOperations
/// Gets a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -264,7 +271,7 @@ public partial interface IManagedClustersOperations
/// Creates or updates a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -292,7 +299,7 @@ public partial interface IManagedClustersOperations
/// Updates tags on a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -320,11 +327,15 @@ public partial interface IManagedClustersOperations
/// Deletes a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node
+ /// without considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
@@ -337,7 +348,7 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Reset the Service Principal Profile of a managed cluster.
///
@@ -346,7 +357,7 @@ public partial interface IManagedClustersOperations
/// service principal
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -371,7 +382,7 @@ public partial interface IManagedClustersOperations
/// Reset the AAD Profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -401,7 +412,7 @@ public partial interface IManagedClustersOperations
/// for more details about rotating managed cluster certificates.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -420,6 +431,28 @@ public partial interface IManagedClustersOperations
///
Task RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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 RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Stops a Managed Cluster
///
///
@@ -432,7 +465,7 @@ public partial interface IManagedClustersOperations
/// for more details about stopping a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -459,7 +492,7 @@ public partial interface IManagedClustersOperations
/// for more details about starting a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -486,7 +519,7 @@ public partial interface IManagedClustersOperations
/// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -515,7 +548,7 @@ public partial interface IManagedClustersOperations
/// Cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -549,7 +582,7 @@ public partial interface IManagedClustersOperations
/// returns properties of each egress endpoint.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -574,7 +607,7 @@ public partial interface IManagedClustersOperations
/// Creates or updates a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -602,7 +635,7 @@ public partial interface IManagedClustersOperations
/// Updates tags on a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -630,11 +663,15 @@ public partial interface IManagedClustersOperations
/// Deletes a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node
+ /// without considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
@@ -647,7 +684,7 @@ public partial interface IManagedClustersOperations
///
/// Thrown when a required parameter is null
///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Reset the Service Principal Profile of a managed cluster.
///
@@ -656,7 +693,7 @@ public partial interface IManagedClustersOperations
/// service principal
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -681,7 +718,7 @@ public partial interface IManagedClustersOperations
/// Reset the AAD Profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -711,7 +748,7 @@ public partial interface IManagedClustersOperations
/// for more details about rotating managed cluster certificates.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -730,6 +767,28 @@ public partial interface IManagedClustersOperations
///
Task BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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 BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Stops a Managed Cluster
///
///
@@ -742,7 +801,7 @@ public partial interface IManagedClustersOperations
/// for more details about stopping a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -769,7 +828,7 @@ public partial interface IManagedClustersOperations
/// for more details about starting a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -796,7 +855,7 @@ public partial interface IManagedClustersOperations
/// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs
index 65c6818cb075..c7215b26ffaf 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -32,7 +32,7 @@ public partial interface IPrivateEndpointConnectionsOperations
/// https://docs.microsoft.com/azure/aks/private-clusters
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -61,7 +61,7 @@ public partial interface IPrivateEndpointConnectionsOperations
/// https://docs.microsoft.com/azure/aks/private-clusters
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -89,7 +89,7 @@ public partial interface IPrivateEndpointConnectionsOperations
/// Updates a private endpoint connection.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -120,7 +120,7 @@ public partial interface IPrivateEndpointConnectionsOperations
/// Deletes a private endpoint connection.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -145,7 +145,7 @@ public partial interface IPrivateEndpointConnectionsOperations
/// Deletes a private endpoint connection.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs
index cd758eb5d374..3a8134d0ca55 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs
@@ -32,7 +32,7 @@ public partial interface IPrivateLinkResourcesOperations
/// https://docs.microsoft.com/azure/aks/private-clusters
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs
index a8d2d4863090..743ac50836f1 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs
@@ -27,7 +27,7 @@ public partial interface IResolvePrivateLinkServiceIdOperations
/// Gets the private link service ID for the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs
new file mode 100644
index 000000000000..604e546f73f3
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs
@@ -0,0 +1,215 @@
+//
+// 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;
+
+ ///
+ /// SnapshotsOperations operations.
+ ///
+ public partial interface ISnapshotsOperations
+ {
+ ///
+ /// Gets a list of snapshots in the specified subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists snapshots in the specified subscription and resource group.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The snapshot 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, Snapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates tags on a snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of snapshots in the specified subscription.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists snapshots in the specified subscription and resource group.
+ ///
+ ///
+ /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs
index 07ee742f075d..7c28a1eeae51 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs
@@ -54,7 +54,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
/// Gets a list of maintenance configurations in the specified managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -86,16 +86,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -272,7 +290,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
/// Gets the specified maintenance configuration of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -307,16 +325,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -500,7 +536,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
/// cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -538,16 +574,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -741,7 +795,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
/// Deletes a maintenance configuration.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -773,16 +827,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs
index 638889d85358..b50c1e74eaa7 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs
@@ -28,7 +28,7 @@ public static partial class MaintenanceConfigurationsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -45,7 +45,7 @@ public static IPage ListByManagedCluster(this IMainten
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -68,7 +68,7 @@ public static IPage ListByManagedCluster(this IMainten
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -88,7 +88,7 @@ public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -115,7 +115,7 @@ public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -139,7 +139,7 @@ public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigura
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -168,7 +168,7 @@ public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigura
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -188,7 +188,7 @@ public static void Delete(this IMaintenanceConfigurationsOperations operations,
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClusterSnapshotsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClusterSnapshotsOperations.cs
new file mode 100644
index 000000000000..ba3feafa0c76
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClusterSnapshotsOperations.cs
@@ -0,0 +1,1780 @@
+//
+// 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;
+
+ ///
+ /// ManagedClusterSnapshotsOperations operations.
+ ///
+ internal partial class ManagedClusterSnapshotsOperations : IServiceOperations, IManagedClusterSnapshotsOperations
+ {
+ ///
+ /// Initializes a new instance of the ManagedClusterSnapshotsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ManagedClusterSnapshotsOperations(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 managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ 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/managedclustersnapshots").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ 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("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;
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ 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/managedclustersnapshots").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ 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("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 managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(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.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ 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]$");
+ }
+ }
+ // 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("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/managedclustersnapshots/{resourceName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (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("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 managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The managed cluster snapshot to create or update.
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterSnapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (resourceName != null)
+ {
+ if (resourceName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63);
+ }
+ if (resourceName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$");
+ }
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ // 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("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", 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/managedclustersnapshots/{resourceName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (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("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)
+ {
+ 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);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ 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]$");
+ }
+ }
+ TagsObject parameters = new TagsObject();
+ if (tags != null)
+ {
+ parameters.Tags = tags;
+ }
+ // 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("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", 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/managedclustersnapshots/{resourceName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (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("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(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.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ 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]$");
+ }
+ }
+ // 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("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", 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/managedclustersnapshots/{resourceName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (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("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 != 200 && (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 managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// 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.
+ ///
+ 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;
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// 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.
+ ///
+ 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/ManagedClusterSnapshotsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClusterSnapshotsOperationsExtensions.cs
new file mode 100644
index 000000000000..b6341671b624
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClusterSnapshotsOperationsExtensions.cs
@@ -0,0 +1,330 @@
+//
+// 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;
+
+ ///
+ /// Extension methods for ManagedClusterSnapshotsOperations.
+ ///
+ public static partial class ManagedClusterSnapshotsOperationsExtensions
+ {
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage List(this IManagedClusterSnapshotsOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IManagedClusterSnapshotsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ public static IPage ListByResourceGroup(this IManagedClusterSnapshotsOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ public static ManagedClusterSnapshot Get(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName)
+ {
+ return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Creates or updates a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The managed cluster snapshot to create or update.
+ ///
+ public static ManagedClusterSnapshot CreateOrUpdate(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, ManagedClusterSnapshot parameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates or updates a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The managed cluster snapshot to create or update.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, ManagedClusterSnapshot parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ public static ManagedClusterSnapshot UpdateTags(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary))
+ {
+ return operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateTagsAsync(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ public static void Delete(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IManagedClusterSnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IManagedClusterSnapshotsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IManagedClusterSnapshotsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByResourceGroupNext(this IManagedClusterSnapshotsOperations operations, string nextPageLink)
+ {
+ return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource
+ /// group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupNextAsync(this IManagedClusterSnapshotsOperations 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/ManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
index 1d51d037c289..0e560662d53d 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs
@@ -54,7 +54,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Gets supported OS options in the specified subscription.
///
///
- /// The name of a supported Azure region.
+ /// The name of Azure region.
///
///
/// The resource type for which the OS options needs to be returned
@@ -86,14 +86,35 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (location == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
+ if (location != null)
+ {
+ if (location.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "location", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -275,10 +296,24 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -427,7 +462,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Lists managed clusters in the specified subscription and resource group.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Headers that will be added to request.
@@ -456,16 +491,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -621,7 +674,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Gets the upgrade profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -653,16 +706,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -846,7 +917,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// .
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -882,16 +953,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1074,7 +1163,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Lists the admin credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1109,16 +1198,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1300,7 +1407,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Lists the user credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1308,6 +1415,12 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// server fqdn type for credentials to be returned
///
+ ///
+ /// Only apply to AAD clusters, specifies the format of returned kubeconfig.
+ /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec'
+ /// will return exec format kubeconfig, which requires kubelogin binary in the
+ /// path. Possible values include: 'azure', 'exec'
+ ///
///
/// Headers that will be added to request.
///
@@ -1329,22 +1442,40 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1379,6 +1510,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
tracingParameters.Add("serverFqdn", serverFqdn);
+ tracingParameters.Add("format", format);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListClusterUserCredentials", tracingParameters);
}
@@ -1397,6 +1529,10 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
_queryParameters.Add(string.Format("server-fqdn={0}", System.Uri.EscapeDataString(serverFqdn)));
}
+ if (format != null)
+ {
+ _queryParameters.Add(string.Format("format={0}", System.Uri.EscapeDataString(format)));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -1526,7 +1662,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Lists the cluster monitoring user credentials of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1561,16 +1697,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1752,7 +1906,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Gets a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1784,16 +1938,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -1970,7 +2142,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Creates or updates a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1995,7 +2167,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Updates tags on a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2020,21 +2192,25 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Deletes a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -2046,7 +2222,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// principal
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2071,7 +2247,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Reset the AAD Profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2101,7 +2277,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// more details about rotating managed cluster certificates.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2119,6 +2295,28 @@ internal ManagedClustersOperations(ContainerServiceClient client)
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Stops a Managed Cluster
///
@@ -2131,7 +2329,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// details about stopping a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2158,7 +2356,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// details about starting a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2185,7 +2383,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2210,7 +2408,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Gets the results of a command which has been run on the Managed Cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2245,16 +2443,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -2443,7 +2659,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// properties of each egress endpoint.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2475,16 +2691,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -2661,7 +2895,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Creates or updates a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2696,16 +2930,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -2915,7 +3167,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Updates tags on a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -2950,16 +3202,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -3148,11 +3418,15 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Deletes a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// Headers that will be added to request.
///
@@ -3171,22 +3445,40 @@ internal ManagedClustersOperations(ContainerServiceClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -3220,6 +3512,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("ignorePodDisruptionBudget", ignorePodDisruptionBudget);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
@@ -3234,6 +3527,10 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
+ if (ignorePodDisruptionBudget != null)
+ {
+ _queryParameters.Add(string.Format("ignore-pod-disruption-budget={0}", System.Uri.EscapeDataString(ignorePodDisruptionBudget)));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -3349,7 +3646,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// principal
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -3381,16 +3678,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -3564,7 +3879,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Reset the AAD Profile of a managed cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -3596,16 +3911,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -3780,7 +4113,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// more details about rotating managed cluster certificates.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -3809,16 +4142,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -3973,6 +4324,221 @@ internal ManagedClustersOperations(ContainerServiceClient client)
return _result;
}
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(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.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ 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]$");
+ }
+ }
+ // 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("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginRotateServiceAccountSigningKeys", 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}/rotateServiceAccountSigningKeys").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ List _queryParameters = new List();
+ if (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 != 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;
+ }
+
///
/// Stops a Managed Cluster
///
@@ -3985,7 +4551,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// details about stopping a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -4014,16 +4580,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -4187,7 +4771,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// details about starting a cluster.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -4216,16 +4800,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
@@ -4389,7 +4991,7 @@ internal ManagedClustersOperations(ContainerServiceClient client)
/// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -4424,16 +5026,34 @@ internal ManagedClustersOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
index 5a64e1e4c822..5c9e01239986 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs
@@ -30,7 +30,7 @@ public static partial class ManagedClustersOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of a supported Azure region.
+ /// The name of Azure region.
///
///
/// The resource type for which the OS options needs to be returned
@@ -47,7 +47,7 @@ public static partial class ManagedClustersOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of a supported Azure region.
+ /// The name of Azure region.
///
///
/// The resource type for which the OS options needs to be returned
@@ -98,7 +98,7 @@ public static IPage List(this IManagedClustersOperations operati
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
public static IPage ListByResourceGroup(this IManagedClustersOperations operations, string resourceGroupName)
{
@@ -112,7 +112,7 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The cancellation token.
@@ -132,7 +132,7 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -149,7 +149,7 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -179,7 +179,7 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -207,7 +207,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -234,7 +234,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -254,7 +254,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -280,7 +280,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -288,9 +288,15 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
///
/// server fqdn type for credentials to be returned
///
- public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string))
+ ///
+ /// Only apply to AAD clusters, specifies the format of returned kubeconfig.
+ /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec'
+ /// will return exec format kubeconfig, which requires kubelogin binary in the
+ /// path. Possible values include: 'azure', 'exec'
+ ///
+ public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string))
{
- return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult();
+ return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn, format).GetAwaiter().GetResult();
}
///
@@ -300,7 +306,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -308,12 +314,18 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
///
/// server fqdn type for credentials to be returned
///
+ ///
+ /// Only apply to AAD clusters, specifies the format of returned kubeconfig.
+ /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec'
+ /// will return exec format kubeconfig, which requires kubelogin binary in the
+ /// path. Possible values include: 'azure', 'exec'
+ ///
///
/// The cancellation token.
///
- public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, format, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -326,7 +338,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -346,7 +358,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -372,7 +384,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -389,7 +401,7 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -412,7 +424,7 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -432,7 +444,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -458,7 +470,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -478,7 +490,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -504,14 +516,18 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
- public static void Delete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
+ public static void Delete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string))
{
- operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ operations.DeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).GetAwaiter().GetResult();
}
///
@@ -521,17 +537,21 @@ public static void Delete(this IManagedClustersOperations operations, string res
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The cancellation token.
///
- public static async Task DeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -545,7 +565,7 @@ public static void Delete(this IManagedClustersOperations operations, string res
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -569,7 +589,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -592,7 +612,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -612,7 +632,7 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -640,7 +660,7 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -662,7 +682,7 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -675,6 +695,43 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope
(await operations.RotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ public static void RotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.RotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Stops a Managed Cluster
///
@@ -690,7 +747,7 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -715,7 +772,7 @@ public static void Stop(this IManagedClustersOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -740,7 +797,7 @@ public static void Stop(this IManagedClustersOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -762,7 +819,7 @@ public static void Start(this IManagedClustersOperations operations, string reso
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -787,7 +844,7 @@ public static void Start(this IManagedClustersOperations operations, string reso
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -812,7 +869,7 @@ public static RunCommandResult RunCommand(this IManagedClustersOperations operat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -838,7 +895,7 @@ public static RunCommandResult RunCommand(this IManagedClustersOperations operat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -858,7 +915,7 @@ public static RunCommandResult GetCommandResult(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -890,7 +947,7 @@ public static RunCommandResult GetCommandResult(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -913,7 +970,7 @@ public static IPage ListOutboundNetworkDependencies
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -936,7 +993,7 @@ public static IPage ListOutboundNetworkDependencies
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -956,7 +1013,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -982,7 +1039,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1002,7 +1059,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1028,14 +1085,18 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
- public static void BeginDelete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
+ public static void BeginDelete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string))
{
- operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ operations.BeginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).GetAwaiter().GetResult();
}
///
@@ -1045,17 +1106,21 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
///
+ ///
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without
+ /// considering Pod Disruption Budget
+ ///
///
/// The cancellation token.
///
- public static async Task BeginDeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginDeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string ignorePodDisruptionBudget = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -1069,7 +1134,7 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1093,7 +1158,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1116,7 +1181,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1136,7 +1201,7 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1164,7 +1229,7 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1186,7 +1251,7 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1199,6 +1264,43 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation
(await operations.BeginRotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ public static void BeginRotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName)
+ {
+ operations.BeginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Rotates the service account signing keys of a managed cluster.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginRotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Stops a Managed Cluster
///
@@ -1214,7 +1316,7 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1239,7 +1341,7 @@ public static void BeginStop(this IManagedClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1264,7 +1366,7 @@ public static void BeginStop(this IManagedClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1286,7 +1388,7 @@ public static void BeginStart(this IManagedClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1311,7 +1413,7 @@ public static void BeginStart(this IManagedClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
@@ -1336,7 +1438,7 @@ public static RunCommandResult BeginRunCommand(this IManagedClustersOperations o
/// The operations group for this extension method.
///
///
- /// The name of the resource group.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the managed cluster resource.
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
index 490bb7791c19..059f903d3f95 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs
@@ -48,6 +48,10 @@ public AgentPool()
/// 'Ephemeral'
/// Possible values include: 'OS',
/// 'Temporary'
+ /// Possible values include:
+ /// 'OCIContainer', 'WasmWasi'
+ /// Message of the day for Linux nodes,
+ /// base64-encoded.
/// The ID of the subnet which agent pool
/// nodes and optionally pods will join on startup.
/// The ID of the subnet which pods will join
@@ -77,8 +81,8 @@ public AgentPool()
/// agentpool
/// The current deployment or
/// provisioning state.
- /// Describes whether the Agent Pool is
- /// Running or Stopped
+ /// Whether the Agent Pool is running or
+ /// stopped.
/// The list of Availability zones to
/// use for nodes. This can only be specified if the AgentPoolType
/// property is 'VirtualMachineScaleSets'.
@@ -114,7 +118,15 @@ public AgentPool()
/// GPUInstanceProfile to be used to
/// specify GPU MIG instance profile for supported GPU VM SKU. Possible
/// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g'
- public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string))
+ /// CreationData to be used to specify the
+ /// source Snapshot ID if the node pool will be created/upgraded using
+ /// a snapshot.
+ /// AKS will associate the
+ /// specified agent pool with the Capacity Reservation Group.
+ /// The fully qualified resource ID of the
+ /// Dedicated Host Group to provision virtual machines from, used only
+ /// in creation scenario and not allowed to changed once set.
+ public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string messageOfTheDay = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string capacityReservationGroupID = default(string), string hostGroupID = default(string))
: base(id, name, type)
{
Count = count;
@@ -122,6 +134,8 @@ public AgentPool()
OsDiskSizeGB = osDiskSizeGB;
OsDiskType = osDiskType;
KubeletDiskType = kubeletDiskType;
+ WorkloadRuntime = workloadRuntime;
+ MessageOfTheDay = messageOfTheDay;
VnetSubnetID = vnetSubnetID;
PodSubnetID = podSubnetID;
MaxPods = maxPods;
@@ -154,6 +168,9 @@ public AgentPool()
EnableUltraSSD = enableUltraSSD;
EnableFIPS = enableFIPS;
GpuInstanceProfile = gpuInstanceProfile;
+ CreationData = creationData;
+ CapacityReservationGroupID = capacityReservationGroupID;
+ HostGroupID = hostGroupID;
CustomInit();
}
@@ -200,6 +217,25 @@ public AgentPool()
[JsonProperty(PropertyName = "properties.kubeletDiskType")]
public string KubeletDiskType { get; set; }
+ ///
+ /// Gets or sets possible values include: 'OCIContainer', 'WasmWasi'
+ ///
+ [JsonProperty(PropertyName = "properties.workloadRuntime")]
+ public string WorkloadRuntime { get; set; }
+
+ ///
+ /// Gets or sets message of the day for Linux nodes, base64-encoded.
+ ///
+ ///
+ /// A base64-encoded string which will be written to /etc/motd after
+ /// decoding. This allows customization of the message of the day for
+ /// Linux nodes. It must not be specified for Windows nodes. It must be
+ /// a static string (i.e., will be printed raw and not be executed as a
+ /// script).
+ ///
+ [JsonProperty(PropertyName = "properties.messageOfTheDay")]
+ public string MessageOfTheDay { get; set; }
+
///
/// Gets or sets the ID of the subnet which agent pool nodes and
/// optionally pods will join on startup.
@@ -320,10 +356,17 @@ public AgentPool()
public string ProvisioningState { get; private set; }
///
- /// Gets describes whether the Agent Pool is Running or Stopped
+ /// Gets or sets whether the Agent Pool is running or stopped.
///
+ ///
+ /// When an Agent Pool is first created it is initially Running. The
+ /// Agent Pool can be stopped by setting this field to Stopped. A
+ /// stopped Agent Pool stops all of its VMs and does not accrue billing
+ /// charges. An Agent Pool can only be stopped if it is Running and
+ /// provisioning state is Succeeded
+ ///
[JsonProperty(PropertyName = "properties.powerState")]
- public PowerState PowerState { get; private set; }
+ public PowerState PowerState { get; set; }
///
/// Gets or sets the list of Availability zones to use for nodes. This
@@ -469,6 +512,34 @@ public AgentPool()
[JsonProperty(PropertyName = "properties.gpuInstanceProfile")]
public string GpuInstanceProfile { get; set; }
+ ///
+ /// Gets or sets creationData to be used to specify the source Snapshot
+ /// ID if the node pool will be created/upgraded using a snapshot.
+ ///
+ [JsonProperty(PropertyName = "properties.creationData")]
+ public CreationData CreationData { get; set; }
+
+ ///
+ /// Gets or sets AKS will associate the specified agent pool with the
+ /// Capacity Reservation Group.
+ ///
+ [JsonProperty(PropertyName = "properties.capacityReservationGroupID")]
+ public string CapacityReservationGroupID { get; set; }
+
+ ///
+ /// Gets or sets the fully qualified resource ID of the Dedicated Host
+ /// Group to provision virtual machines from, used only in creation
+ /// scenario and not allowed to changed once set.
+ ///
+ ///
+ /// This is of the form:
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
+ /// For more information see [Azure dedicated
+ /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
+ ///
+ [JsonProperty(PropertyName = "properties.hostGroupID")]
+ public string HostGroupID { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs
new file mode 100644
index 000000000000..6b8f401fe88f
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for UpgradeNodeImageVersion operation.
+ ///
+ public partial class AgentPoolsUpgradeNodeImageVersionHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// AgentPoolsUpgradeNodeImageVersionHeaders class.
+ ///
+ public AgentPoolsUpgradeNodeImageVersionHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// AgentPoolsUpgradeNodeImageVersionHeaders class.
+ ///
+ /// URL to query for status of the
+ /// operation.
+ public AgentPoolsUpgradeNodeImageVersionHeaders(string azureAsyncOperation = default(string))
+ {
+ AzureAsyncOperation = azureAsyncOperation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets URL to query for status of the operation.
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AzureKeyVaultKms.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AzureKeyVaultKms.cs
new file mode 100644
index 000000000000..27c90cf3d72d
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AzureKeyVaultKms.cs
@@ -0,0 +1,73 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Azure Key Vault key management service settings for the security
+ /// profile.
+ ///
+ public partial class AzureKeyVaultKms
+ {
+ ///
+ /// Initializes a new instance of the AzureKeyVaultKms class.
+ ///
+ public AzureKeyVaultKms()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureKeyVaultKms class.
+ ///
+ /// Whether to enable Azure Key Vault key
+ /// management service. The default is false.
+ /// Identifier of Azure Key Vault key. See [key
+ /// identifier
+ /// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name)
+ /// for more details. When Azure Key Vault key management service is
+ /// enabled, this field is required and must be a valid key identifier.
+ /// When Azure Key Vault key management service is disabled, leave the
+ /// field empty.
+ public AzureKeyVaultKms(bool? enabled = default(bool?), string keyId = default(string))
+ {
+ Enabled = enabled;
+ KeyId = keyId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets whether to enable Azure Key Vault key management
+ /// service. The default is false.
+ ///
+ [JsonProperty(PropertyName = "enabled")]
+ public bool? Enabled { get; set; }
+
+ ///
+ /// Gets or sets identifier of Azure Key Vault key. See [key identifier
+ /// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name)
+ /// for more details. When Azure Key Vault key management service is
+ /// enabled, this field is required and must be a valid key identifier.
+ /// When Azure Key Vault key management service is disabled, leave the
+ /// field empty.
+ ///
+ [JsonProperty(PropertyName = "keyId")]
+ public string KeyId { get; set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs
index 74371e2d92dd..108e7c801170 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs
@@ -12,6 +12,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -33,8 +35,8 @@ public ContainerServiceNetworkProfile()
/// class.
///
/// Network plugin used for building the
- /// Kubernetes network. Possible values include: 'azure',
- /// 'kubenet'
+ /// Kubernetes network. Possible values include: 'azure', 'kubenet',
+ /// 'none'
/// Network policy used for building the
/// Kubernetes network. Possible values include: 'calico',
/// 'azure'
@@ -59,7 +61,13 @@ public ContainerServiceNetworkProfile()
/// balancer.
/// Profile of the cluster NAT
/// gateway.
- public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string networkMode = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile))
+ /// The CIDR notation IP ranges from which to
+ /// assign pod IPs.
+ /// The CIDR notation IP ranges from which
+ /// to assign service cluster IPs.
+ /// The IP families used to specify IP
+ /// versions available to the cluster.
+ public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string networkMode = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile), IList podCidrs = default(IList), IList serviceCidrs = default(IList), IList ipFamilies = default(IList))
{
NetworkPlugin = networkPlugin;
NetworkPolicy = networkPolicy;
@@ -72,6 +80,9 @@ public ContainerServiceNetworkProfile()
LoadBalancerSku = loadBalancerSku;
LoadBalancerProfile = loadBalancerProfile;
NatGatewayProfile = natGatewayProfile;
+ PodCidrs = podCidrs;
+ ServiceCidrs = serviceCidrs;
+ IpFamilies = ipFamilies;
CustomInit();
}
@@ -82,7 +93,7 @@ public ContainerServiceNetworkProfile()
///
/// Gets or sets network plugin used for building the Kubernetes
- /// network. Possible values include: 'azure', 'kubenet'
+ /// network. Possible values include: 'azure', 'kubenet', 'none'
///
[JsonProperty(PropertyName = "networkPlugin")]
public string NetworkPlugin { get; set; }
@@ -171,6 +182,42 @@ public ContainerServiceNetworkProfile()
[JsonProperty(PropertyName = "natGatewayProfile")]
public ManagedClusterNATGatewayProfile NatGatewayProfile { get; set; }
+ ///
+ /// Gets or sets the CIDR notation IP ranges from which to assign pod
+ /// IPs.
+ ///
+ ///
+ /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs,
+ /// one for each IP family (IPv4/IPv6), is expected for dual-stack
+ /// networking.
+ ///
+ [JsonProperty(PropertyName = "podCidrs")]
+ public IList PodCidrs { get; set; }
+
+ ///
+ /// Gets or sets the CIDR notation IP ranges from which to assign
+ /// service cluster IPs.
+ ///
+ ///
+ /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs,
+ /// one for each IP family (IPv4/IPv6), is expected for dual-stack
+ /// networking. They must not overlap with any Subnet IP ranges.
+ ///
+ [JsonProperty(PropertyName = "serviceCidrs")]
+ public IList ServiceCidrs { get; set; }
+
+ ///
+ /// Gets or sets the IP families used to specify IP versions available
+ /// to the cluster.
+ ///
+ ///
+ /// IP families are used to determine single-stack or dual-stack
+ /// clusters. For single-stack, the expected value is IPv4. For
+ /// dual-stack, the expected values are IPv4 and IPv6.
+ ///
+ [JsonProperty(PropertyName = "ipFamilies")]
+ public IList IpFamilies { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs
new file mode 100644
index 000000000000..64cdf5b5fc75
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Data used when creating a target resource from a source resource.
+ ///
+ public partial class CreationData
+ {
+ ///
+ /// Initializes a new instance of the CreationData class.
+ ///
+ public CreationData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CreationData class.
+ ///
+ /// This is the ARM ID of the source
+ /// object to be used to create the target object.
+ public CreationData(string sourceResourceId = default(string))
+ {
+ SourceResourceId = sourceResourceId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets this is the ARM ID of the source object to be used to
+ /// create the target object.
+ ///
+ [JsonProperty(PropertyName = "sourceResourceId")]
+ public string SourceResourceId { get; set; }
+
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs
new file mode 100644
index 000000000000..d2550ac1df32
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+
+ ///
+ /// Defines values for Format.
+ ///
+ public static class Format
+ {
+ ///
+ /// Return azure auth-provider kubeconfig. This format is deprecated in
+ /// 1.22 and will be fully removed in 1.25.
+ ///
+ public const string Azure = "azure";
+ ///
+ /// Return exec format kubeconfig. This format requires kubelogin
+ /// binary in the path.
+ ///
+ public const string Exec = "exec";
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs
new file mode 100644
index 000000000000..965f8846c9c8
--- /dev/null
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerService.Models
+{
+
+ ///
+ /// Defines values for IpFamily.
+ ///
+ public static class IpFamily
+ {
+ public const string IPv4 = "IPv4";
+ public const string IPv6 = "IPv6";
+ }
+}
diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
index 459e63efc010..74bb93cf1186 100644
--- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
+++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs
@@ -35,9 +35,14 @@ public ManagedCluster()
/// Initializes a new instance of the ManagedCluster class.
///
/// Resource location
- /// Resource Id
- /// Resource name
- /// Resource type
+ /// Fully qualified resource ID for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
/// Resource tags
/// The managed cluster SKU.
/// The extended location of the Virtual
@@ -47,10 +52,15 @@ public ManagedCluster()
/// The current provisioning
/// state.
/// The Power State of the cluster.
+ /// CreationData to be used to specify the
+ /// source Snapshot ID if the cluster will be created/upgraded using a
+ /// snapshot.
/// The max number of agent pools for the
/// managed cluster.
/// The version of Kubernetes the
- /// Managed Cluster is running.
+ /// Managed Cluster is requested to run.
+ /// The version of Kubernetes
+ /// the Managed Cluster is running.
/// The DNS prefix of the Managed
/// Cluster.
/// The FQDN subdomain of the private
@@ -72,6 +82,8 @@ public ManagedCluster()
/// add-on.
/// The pod identity profile of the
/// Managed Cluster.
+ /// The OIDC issuer profile of the
+ /// Managed Cluster.
/// The name of the resource group
/// containing agent pool nodes.
/// Whether to enable Kubernetes Role-Based
@@ -80,6 +92,8 @@ public ManagedCluster()
/// enable Kubernetes pod security policy (preview). This feature is
/// set for removal on October 15th, 2020. Learn more at
/// aka.ms/aks/azpodpolicy.
+ /// Enable namespace as Azure
+ /// resource.
/// The network configuration
/// profile.
/// The Azure Active Directory
@@ -102,16 +116,20 @@ public ManagedCluster()
/// cluster with HTTP proxy servers.
/// Security profile for the managed
/// cluster.
- public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFQDN = default(string), string azurePortalFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), IList privateLinkResources = default(IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHTTPProxyConfig httpProxyConfig = default(ManagedClusterHTTPProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile))
- : base(location, id, name, type, tags)
+ /// PublicNetworkAccess of the
+ /// managedCluster
+ public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), string provisioningState = default(string), PowerState powerState = default(PowerState), CreationData creationData = default(CreationData), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string currentKubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFQDN = default(string), string azurePortalFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary