diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs index 4a5ecad46cda4..57e020a866783 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs @@ -53,10 +53,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// Gets a list of agent pools in the specified managed cluster. /// - /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. - /// /// /// The name of the resource group. /// @@ -86,6 +82,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -120,7 +120,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -128,7 +127,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -141,9 +139,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -251,7 +249,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -271,11 +269,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Gets the agent pool. + /// Gets the specified managed cluster agent pool. /// - /// - /// Gets the details of the agent pool by managed cluster and resource group. - /// /// /// The name of the resource group. /// @@ -308,6 +303,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -346,7 +345,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +352,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); @@ -369,9 +366,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -499,11 +496,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Creates or updates an agent pool. - /// - /// /// Creates or updates an agent pool in the specified managed cluster. - /// + /// /// /// The name of the resource group. /// @@ -514,7 +508,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// The name of the agent pool. /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// /// /// The headers that will be added to request. @@ -530,11 +524,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -558,12 +549,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Gets upgrade profile for an agent pool. + /// Gets the upgrade profile for an agent pool. /// - /// - /// Gets the details of the upgrade profile for an agent pool with a specified - /// resource group and managed cluster name. - /// /// /// The name of the resource group. /// @@ -596,6 +583,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -634,7 +625,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -642,7 +632,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); @@ -657,9 +646,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -787,10 +776,12 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Gets a list of supported versions for the specified agent pool. + /// Gets a list of supported Kubernetes versions for the specified agent pool. /// /// - /// Gets a list of supported versions for the specified agent pool. + /// See [supported Kubernetes + /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) + /// for more details about the version lifecycle. /// /// /// The name of the resource group. @@ -821,6 +812,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -855,7 +850,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -863,7 +857,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -876,9 +869,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1006,10 +999,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Creates or updates an agent pool. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Creates or updates an agent pool in the specified managed cluster. + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The name of the resource group. @@ -1020,8 +1016,33 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The name of the agent pool. /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// /// /// Headers that will be added to request. @@ -1046,6 +1067,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1088,7 +1113,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-07-01"; + if (parameters != null) + { + parameters.Validate(); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1096,7 +1124,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); @@ -1112,9 +1139,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1266,11 +1293,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -1300,6 +1324,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1338,7 +1366,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1346,7 +1373,6 @@ internal AgentPoolsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); @@ -1361,9 +1387,9 @@ internal AgentPoolsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1473,12 +1499,241 @@ internal AgentPoolsOperations(ContainerServiceClient client) } /// - /// Gets a list of agent pools in the specified managed cluster. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (agentPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("agentPoolName", agentPoolName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of agent pools in the specified managed cluster. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1630,7 +1885,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs index fac6394a3939e..e0c7263272e9d 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs @@ -24,10 +24,6 @@ public static partial class AgentPoolsOperationsExtensions /// /// Gets a list of agent pools in the specified managed cluster. /// - /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. - /// /// /// The operations group for this extension method. /// @@ -45,10 +41,6 @@ public static IPage List(this IAgentPoolsOperations operations, strin /// /// Gets a list of agent pools in the specified managed cluster. /// - /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. - /// /// /// The operations group for this extension method. /// @@ -70,11 +62,8 @@ public static IPage List(this IAgentPoolsOperations operations, strin } /// - /// Gets the agent pool. + /// Gets the specified managed cluster agent pool. /// - /// - /// Gets the details of the agent pool by managed cluster and resource group. - /// /// /// The operations group for this extension method. /// @@ -93,11 +82,8 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour } /// - /// Gets the agent pool. + /// Gets the specified managed cluster agent pool. /// - /// - /// Gets the details of the agent pool by managed cluster and resource group. - /// /// /// The operations group for this extension method. /// @@ -122,11 +108,8 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour } /// - /// Creates or updates an agent pool. - /// - /// /// Creates or updates an agent pool in the specified managed cluster. - /// + /// /// /// The operations group for this extension method. /// @@ -140,7 +123,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour /// The name of the agent pool. /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) { @@ -148,11 +131,8 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st } /// - /// Creates or updates an agent pool. - /// - /// /// Creates or updates an agent pool in the specified managed cluster. - /// + /// /// /// The operations group for this extension method. /// @@ -166,7 +146,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st /// The name of the agent pool. /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// /// /// The cancellation token. @@ -180,11 +160,8 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -203,11 +180,8 @@ public static void Delete(this IAgentPoolsOperations operations, string resource } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -229,12 +203,8 @@ public static void Delete(this IAgentPoolsOperations operations, string resource } /// - /// Gets upgrade profile for an agent pool. + /// Gets the upgrade profile for an agent pool. /// - /// - /// Gets the details of the upgrade profile for an agent pool with a specified - /// resource group and managed cluster name. - /// /// /// The operations group for this extension method. /// @@ -253,12 +223,8 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio } /// - /// Gets upgrade profile for an agent pool. + /// Gets the upgrade profile for an agent pool. /// - /// - /// Gets the details of the upgrade profile for an agent pool with a specified - /// resource group and managed cluster name. - /// /// /// The operations group for this extension method. /// @@ -283,10 +249,12 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio } /// - /// Gets a list of supported versions for the specified agent pool. + /// Gets a list of supported Kubernetes versions for the specified agent pool. /// /// - /// Gets a list of supported versions for the specified agent pool. + /// See [supported Kubernetes + /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) + /// for more details about the version lifecycle. /// /// /// The operations group for this extension method. @@ -303,10 +271,12 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge } /// - /// Gets a list of supported versions for the specified agent pool. + /// Gets a list of supported Kubernetes versions for the specified agent pool. /// /// - /// Gets a list of supported versions for the specified agent pool. + /// See [supported Kubernetes + /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) + /// for more details about the version lifecycle. /// /// /// The operations group for this extension method. @@ -329,10 +299,13 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge } /// - /// Creates or updates an agent pool. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Creates or updates an agent pool in the specified managed cluster. + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The operations group for this extension method. @@ -346,8 +319,60 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge /// /// The name of the agent pool. /// + public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return operations.UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } + + /// + /// Upgrades the node image version of an agent pool to the latest. + /// + /// + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async Task UpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) { @@ -355,11 +380,8 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation } /// - /// Creates or updates an agent pool. - /// - /// /// Creates or updates an agent pool in the specified managed cluster. - /// + /// /// /// The operations group for this extension method. /// @@ -373,7 +395,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation /// The name of the agent pool. /// /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// The agent pool to create or update. /// /// /// The cancellation token. @@ -387,11 +409,8 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -410,11 +429,8 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res } /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -436,15 +452,69 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res } /// - /// Gets a list of agent pools in the specified managed cluster. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The operations group for this extension method. /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return operations.BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } + + /// + /// Upgrades the node image version of an agent pool to the latest. + /// + /// + /// Upgrading the node image version of an agent pool applies the newest OS and + /// runtime updates to the nodes. AKS provides one new image per week with the + /// latest updates. For more details on node image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of agent pools in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -456,10 +526,6 @@ public static IPage ListNext(this IAgentPoolsOperations operations, s /// /// Gets a list of agent pools in the specified managed cluster. /// - /// - /// Gets a list of agent pools in the specified managed cluster. The operation - /// returns properties of each agent pool. - /// /// /// The operations group for this extension method. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs index b53e00facb1ec..8ec676a4cb842 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs @@ -53,6 +53,11 @@ public partial class ContainerServiceClient : ServiceClient public string SubscriptionId { get; set; } + /// + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + /// /// The preferred language for the response. /// @@ -71,16 +76,6 @@ public partial class ContainerServiceClient : ServiceClient public bool? GenerateClientRequestId { get; set; } - /// - /// Gets the IOpenShiftManagedClustersOperations. - /// - public virtual IOpenShiftManagedClustersOperations OpenShiftManagedClusters { get; private set; } - - /// - /// Gets the IContainerServicesOperations. - /// - public virtual IContainerServicesOperations ContainerServices { get; private set; } - /// /// Gets the IOperations. /// @@ -91,6 +86,11 @@ public partial class ContainerServiceClient : ServiceClient public virtual IManagedClustersOperations ManagedClusters { get; private set; } + /// + /// Gets the IMaintenanceConfigurationsOperations. + /// + public virtual IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; private set; } + /// /// Gets the IAgentPoolsOperations. /// @@ -101,6 +101,16 @@ public partial class ContainerServiceClient : ServiceClient public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } + /// + /// Gets the IPrivateLinkResourcesOperations. + /// + public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + + /// + /// Gets the IResolvePrivateLinkServiceIdOperations. + /// + public virtual IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; private set; } + /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -342,13 +352,15 @@ public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials crede /// private void Initialize() { - OpenShiftManagedClusters = new OpenShiftManagedClustersOperations(this); - ContainerServices = new ContainerServicesOperations(this); Operations = new Operations(this); ManagedClusters = new ManagedClustersOperations(this); + MaintenanceConfigurations = new MaintenanceConfigurationsOperations(this); AgentPools = new AgentPoolsOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); + PrivateLinkResources = new PrivateLinkResourcesOperations(this); + ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this); BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2021-05-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -378,8 +390,6 @@ private void Initialize() new Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs deleted file mode 100644 index 564aab6846208..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs +++ /dev/null @@ -1,1689 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ContainerServicesOperations operations. - /// - internal partial class ContainerServicesOperations : IServiceOperations, IContainerServicesOperations - { - /// - /// Initializes a new instance of the ContainerServicesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ContainerServicesOperations(ContainerServiceClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the ContainerServiceClient - /// - public ContainerServiceClient Client { get; private set; } - - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2017-07-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the specified container service. - /// - /// - /// Gets the properties of the specified container service in the specified - /// subscription and resource group. The operation returns the properties - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (containerServiceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2017-07-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("containerServiceName", containerServiceName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2017-07-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a list of supported orchestrators in the specified subscription. - /// - /// - /// Gets a list of supported orchestrators in the specified subscription. The - /// operation returns properties of each orchestrator including version, - /// available upgrades and whether that version or upgrades are in preview. - /// - /// - /// The name of a supported Azure region. - /// - /// - /// resource type for which the list of orchestrators needs to be returned - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListOrchestratorsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - string apiVersion = "2019-08-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("location", location); - tracingParameters.Add("resourceType", resourceType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOrchestrators", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (resourceType != null) - { - _queryParameters.Add(string.Format("resource-type={0}", System.Uri.EscapeDataString(resourceType))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (containerServiceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2017-07-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("containerServiceName", containerServiceName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (containerServiceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerServiceName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2017-07-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("containerServiceName", containerServiceName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerServiceName}", System.Uri.EscapeDataString(containerServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperationsExtensions.cs deleted file mode 100644 index bea8a4a2c4b8e..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperationsExtensions.cs +++ /dev/null @@ -1,547 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ContainerServicesOperations. - /// - public static partial class ContainerServicesOperationsExtensions - { - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// The operations group for this extension method. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static IPage List(this IContainerServicesOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task> ListAsync(this IContainerServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ContainerServiceModel CreateOrUpdate(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task CreateOrUpdateAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the properties of the specified container service. - /// - /// - /// Gets the properties of the specified container service in the specified - /// subscription and resource group. The operation returns the properties - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ContainerServiceModel Get(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName) - { - return operations.GetAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult(); - } - - /// - /// Gets the properties of the specified container service. - /// - /// - /// Gets the properties of the specified container service in the specified - /// subscription and resource group. The operation returns the properties - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task GetAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static void Delete(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName) - { - operations.DeleteAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task DeleteAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static IPage ListByResourceGroup(this IContainerServicesOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task> ListByResourceGroupAsync(this IContainerServicesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of supported orchestrators in the specified subscription. - /// - /// - /// Gets a list of supported orchestrators in the specified subscription. The - /// operation returns properties of each orchestrator including version, - /// available upgrades and whether that version or upgrades are in preview. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of a supported Azure region. - /// - /// - /// resource type for which the list of orchestrators needs to be returned - /// - public static OrchestratorVersionProfileListResult ListOrchestrators(this IContainerServicesOperations operations, string location, string resourceType = default(string)) - { - return operations.ListOrchestratorsAsync(location, resourceType).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of supported orchestrators in the specified subscription. - /// - /// - /// Gets a list of supported orchestrators in the specified subscription. The - /// operation returns properties of each orchestrator including version, - /// available upgrades and whether that version or upgrades are in preview. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of a supported Azure region. - /// - /// - /// resource type for which the list of orchestrators needs to be returned - /// - /// - /// The cancellation token. - /// - public static async Task ListOrchestratorsAsync(this IContainerServicesOperations operations, string location, string resourceType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOrchestratorsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ContainerServiceModel BeginCreateOrUpdate(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified configuration of - /// orchestrator, masters, and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service operation. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task BeginCreateOrUpdateAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static void BeginDelete(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName) - { - operations.BeginDeleteAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified subscription and - /// resource group. The operation does not delete other resources created as - /// part of creating a container service, including storage accounts, VMs, and - /// availability sets. All the other resources created with the container - /// service are part of the same resource group and can be deleted - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task BeginDeleteAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static IPage ListNext(this IContainerServicesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. The - /// operation returns properties of each container service including state, - /// orchestrator, number of masters and agents, and FQDNs of masters and - /// agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task> ListNextAsync(this IContainerServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static IPage ListByResourceGroupNext(this IContainerServicesOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and FQDNs of - /// masters and agents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task> ListByResourceGroupNextAsync(this IContainerServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs index 40bf792cb96bc..7bf6c26939600 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs @@ -26,10 +26,6 @@ public partial interface IAgentPoolsOperations /// /// Gets a list of agent pools in the specified managed cluster. /// - /// - /// Gets a list of agent pools in the specified managed cluster. The - /// operation returns properties of each agent pool. - /// /// /// The name of the resource group. /// @@ -53,12 +49,8 @@ public partial interface IAgentPoolsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the agent pool. + /// Gets the specified managed cluster agent pool. /// - /// - /// Gets the details of the agent pool by managed cluster and resource - /// group. - /// /// /// The name of the resource group. /// @@ -85,11 +77,8 @@ public partial interface IAgentPoolsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates an agent pool. - /// - /// /// Creates or updates an agent pool in the specified managed cluster. - /// + /// /// /// The name of the resource group. /// @@ -100,8 +89,7 @@ public partial interface IAgentPoolsOperations /// The name of the agent pool. /// /// - /// Parameters supplied to the Create or Update an agent pool - /// operation. + /// The agent pool to create or update. /// /// /// The headers that will be added to request. @@ -120,11 +108,8 @@ public partial interface IAgentPoolsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -148,12 +133,8 @@ public partial interface IAgentPoolsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets upgrade profile for an agent pool. + /// Gets the upgrade profile for an agent pool. /// - /// - /// Gets the details of the upgrade profile for an agent pool with a - /// specified resource group and managed cluster name. - /// /// /// The name of the resource group. /// @@ -180,10 +161,13 @@ public partial interface IAgentPoolsOperations /// Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a list of supported versions for the specified agent pool. + /// Gets a list of supported Kubernetes versions for the specified + /// agent pool. /// /// - /// Gets a list of supported versions for the specified agent pool. + /// See [supported Kubernetes + /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) + /// for more details about the version lifecycle. /// /// /// The name of the resource group. @@ -208,10 +192,14 @@ public partial interface IAgentPoolsOperations /// Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates an agent pool. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Creates or updates an agent pool in the specified managed cluster. + /// Upgrading the node image version of an agent pool applies the + /// newest OS and runtime updates to the nodes. AKS provides one new + /// image per week with the latest updates. For more details on node + /// image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The name of the resource group. @@ -222,9 +210,36 @@ public partial interface IAgentPoolsOperations /// /// The name of the agent pool. /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// /// - /// Parameters supplied to the Create or Update an agent pool - /// operation. + /// The agent pool to create or update. /// /// /// The headers that will be added to request. @@ -243,11 +258,8 @@ public partial interface IAgentPoolsOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes an agent pool. + /// Deletes an agent pool in the specified managed cluster. /// - /// - /// Deletes the agent pool in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -271,12 +283,43 @@ public partial interface IAgentPoolsOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a list of agent pools in the specified managed cluster. + /// Upgrades the node image version of an agent pool to the latest. /// /// - /// Gets a list of agent pools in the specified managed cluster. The - /// operation returns properties of each agent pool. + /// Upgrading the node image version of an agent pool applies the + /// newest OS and runtime updates to the nodes. AKS provides one new + /// image per week with the latest updates. For more details on node + /// image versions, see: + /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of agent pools in the specified managed cluster. + /// /// /// The NextLink from the previous successful call to List operation. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs index 8f78954b872fc..2b88f1d250124 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs @@ -47,6 +47,11 @@ public partial interface IContainerServiceClient : System.IDisposable /// string SubscriptionId { get; set; } + /// + /// Client Api Version. + /// + string ApiVersion { get; } + /// /// The preferred language for the response. /// @@ -66,16 +71,6 @@ public partial interface IContainerServiceClient : System.IDisposable bool? GenerateClientRequestId { get; set; } - /// - /// Gets the IOpenShiftManagedClustersOperations. - /// - IOpenShiftManagedClustersOperations OpenShiftManagedClusters { get; } - - /// - /// Gets the IContainerServicesOperations. - /// - IContainerServicesOperations ContainerServices { get; } - /// /// Gets the IOperations. /// @@ -86,6 +81,11 @@ public partial interface IContainerServiceClient : System.IDisposable /// IManagedClustersOperations ManagedClusters { get; } + /// + /// Gets the IMaintenanceConfigurationsOperations. + /// + IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; } + /// /// Gets the IAgentPoolsOperations. /// @@ -96,5 +96,15 @@ public partial interface IContainerServiceClient : System.IDisposable /// IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; } + /// + /// Gets the IPrivateLinkResourcesOperations. + /// + IPrivateLinkResourcesOperations PrivateLinkResources { get; } + + /// + /// Gets the IResolvePrivateLinkServiceIdOperations. + /// + IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServicesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServicesOperations.cs deleted file mode 100644 index a081424bad6c6..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServicesOperations.cs +++ /dev/null @@ -1,340 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ContainerServicesOperations operations. - /// - public partial interface IContainerServicesOperations - { - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. - /// The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and - /// FQDNs of masters and agents. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified - /// configuration of orchestrator, masters, and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the properties of the specified container service. - /// - /// - /// Gets the properties of the specified container service in the - /// specified subscription and resource group. The operation returns - /// the properties including state, orchestrator, number of masters and - /// agents, and FQDNs of masters and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> GetWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified - /// subscription and resource group. The operation does not delete - /// other resources created as part of creating a container service, - /// including storage accounts, VMs, and availability sets. All the - /// other resources created with the container service are part of the - /// same resource group and can be deleted individually. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container - /// service including state, orchestrator, number of masters and - /// agents, and FQDNs of masters and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of supported orchestrators in the specified - /// subscription. - /// - /// - /// Gets a list of supported orchestrators in the specified - /// subscription. The operation returns properties of each orchestrator - /// including version, available upgrades and whether that version or - /// upgrades are in preview. - /// - /// - /// The name of a supported Azure region. - /// - /// - /// resource type for which the list of orchestrators needs to be - /// returned - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListOrchestratorsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a container service. - /// - /// - /// Creates or updates a container service with the specified - /// configuration of orchestrator, masters, and agents. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// Parameters supplied to the Create or Update a Container Service - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the specified container service. - /// - /// - /// Deletes the specified container service in the specified - /// subscription and resource group. The operation does not delete - /// other resources created as part of creating a container service, - /// including storage accounts, VMs, and availability sets. All the - /// other resources created with the container service are part of the - /// same resource group and can be deleted individually. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the container service in the specified subscription and - /// resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string containerServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of container services in the specified subscription. - /// - /// - /// Gets a list of container services in the specified subscription. - /// The operation returns properties of each container service - /// including state, orchestrator, number of masters and agents, and - /// FQDNs of masters and agents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of container services in the specified resource group. - /// - /// - /// Gets a list of container services in the specified subscription and - /// resource group. The operation returns properties of each container - /// service including state, orchestrator, number of masters and - /// agents, and FQDNs of masters and agents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs new file mode 100644 index 0000000000000..8b6ea84dee6d5 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs @@ -0,0 +1,161 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// MaintenanceConfigurationsOperations operations. + /// + public partial interface IMaintenanceConfigurationsOperations + { + /// + /// Gets a list of maintenance configurations in the specified managed + /// cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a maintenance configuration in the specified + /// managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The maintenance configuration to create or update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a maintenance configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of maintenance configurations in the specified managed + /// cluster. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs index 7c90c0b4370a4..23d59d0baea05 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs @@ -23,13 +23,34 @@ namespace Microsoft.Azure.Management.ContainerService /// public partial interface IManagedClustersOperations { + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The headers that will be added to request. /// @@ -50,10 +71,6 @@ public partial interface IManagedClustersOperations /// Lists managed clusters in the specified subscription and resource /// group. /// - /// - /// Lists managed clusters in the specified subscription and resource - /// group. The operation returns properties of each managed cluster. - /// /// /// The name of the resource group. /// @@ -74,12 +91,8 @@ public partial interface IManagedClustersOperations /// Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets upgrade profile for a managed cluster. + /// Gets the upgrade profile of a managed cluster. /// - /// - /// Gets the details of the upgrade profile for a managed cluster with - /// a specified resource group and name. - /// /// /// The name of the resource group. /// @@ -106,12 +119,10 @@ public partial interface IManagedClustersOperations /// Gets an access profile of a managed cluster. /// /// - /// Gets the accessProfile for the specified role name of the managed - /// cluster with a specified resource group and name. **WARNING**: This - /// API will be deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// **WARNING**: This API will be deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) /// . /// /// @@ -141,18 +152,17 @@ public partial interface IManagedClustersOperations [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets cluster admin credential of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// - /// - /// Gets cluster admin credential of the managed cluster with a - /// specified resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The headers that will be added to request. /// @@ -168,20 +178,19 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets cluster user credential of a managed cluster. + /// Lists the user credentials of a managed cluster. /// - /// - /// Gets cluster user credential of the managed cluster with a - /// specified resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The headers that will be added to request. /// @@ -197,20 +206,19 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets cluster monitoring user credential of a managed cluster. + /// Lists the cluster monitoring user credentials of a managed cluster. /// - /// - /// Gets cluster monitoring user credential of the managed cluster with - /// a specified resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The headers that will be added to request. /// @@ -226,14 +234,10 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a managed cluster. /// - /// - /// Gets the details of the managed cluster with a specified resource - /// group and name. - /// /// /// The name of the resource group. /// @@ -259,10 +263,6 @@ public partial interface IManagedClustersOperations /// /// Creates or updates a managed cluster. /// - /// - /// Creates or updates a managed cluster with the specified - /// configuration for agents and Kubernetes version. - /// /// /// The name of the resource group. /// @@ -270,8 +270,7 @@ public partial interface IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster - /// operation. + /// The managed cluster to create or update. /// /// /// The headers that will be added to request. @@ -292,9 +291,6 @@ public partial interface IManagedClustersOperations /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The name of the resource group. /// @@ -323,10 +319,6 @@ public partial interface IManagedClustersOperations /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and - /// name. - /// /// /// The name of the resource group. /// @@ -347,10 +339,11 @@ public partial interface IManagedClustersOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a + /// service principal /// /// /// The name of the resource group. @@ -359,8 +352,7 @@ public partial interface IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile - /// operation for a Managed Cluster. + /// The service principal profile to set on the managed cluster. /// /// /// The headers that will be added to request. @@ -376,11 +368,8 @@ public partial interface IManagedClustersOperations /// Task ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The name of the resource group. /// @@ -388,8 +377,7 @@ public partial interface IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a - /// Managed Cluster. + /// The AAD profile to set on the Managed Cluster /// /// /// The headers that will be added to request. @@ -405,10 +393,12 @@ public partial interface IManagedClustersOperations /// Task ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) + /// for more details about rotating managed cluster certificates. /// /// /// The name of the resource group. @@ -430,10 +420,16 @@ public partial interface IManagedClustersOperations /// Task RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Upgrade node image version of an agent pool to the latest. + /// Stops a Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// This can only be performed on Azure Virtual Machine Scale set + /// backed clusters. Stopping a cluster stops the control plane and + /// agent nodes entirely, while maintaining all object and cluster + /// state. A cluster does not accrue charges while it is stopped. See + /// [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + /// for more details about stopping a cluster. /// /// /// The name of the resource group. @@ -441,8 +437,62 @@ public partial interface IManagedClustersOperations /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a previously stopped Managed Cluster + /// + /// + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + /// for more details about starting a cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Submits a command to run against the Managed Cluster. + /// + /// + /// AKS will create a pod to run the command. This is primarily useful + /// for private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The run command request /// /// /// The headers that will be added to request. @@ -459,13 +509,44 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates a managed cluster. + /// Gets the results of a command which has been run on the Managed + /// Cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. /// /// - /// Creates or updates a managed cluster with the specified - /// configuration for agents and Kubernetes version. + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation + /// returns properties of each egress endpoint. /// /// /// The name of the resource group. @@ -473,9 +554,33 @@ public partial interface IManagedClustersOperations /// /// The name of the managed cluster resource. /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// /// - /// Parameters supplied to the Create or Update a Managed Cluster - /// operation. + /// The managed cluster to create or update. /// /// /// The headers that will be added to request. @@ -496,9 +601,6 @@ public partial interface IManagedClustersOperations /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The name of the resource group. /// @@ -527,10 +629,6 @@ public partial interface IManagedClustersOperations /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and - /// name. - /// /// /// The name of the resource group. /// @@ -551,10 +649,11 @@ public partial interface IManagedClustersOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a + /// service principal /// /// /// The name of the resource group. @@ -563,8 +662,7 @@ public partial interface IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile - /// operation for a Managed Cluster. + /// The service principal profile to set on the managed cluster. /// /// /// The headers that will be added to request. @@ -580,11 +678,8 @@ public partial interface IManagedClustersOperations /// Task BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The name of the resource group. /// @@ -592,8 +687,7 @@ public partial interface IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a - /// Managed Cluster. + /// The AAD profile to set on the Managed Cluster /// /// /// The headers that will be added to request. @@ -609,10 +703,12 @@ public partial interface IManagedClustersOperations /// Task BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) + /// for more details about rotating managed cluster certificates. /// /// /// The name of the resource group. @@ -634,10 +730,43 @@ public partial interface IManagedClustersOperations /// Task BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Upgrade node image version of an agent pool to the latest. + /// Stops a Managed Cluster + /// + /// + /// This can only be performed on Azure Virtual Machine Scale set + /// backed clusters. Stopping a cluster stops the control plane and + /// agent nodes entirely, while maintaining all object and cluster + /// state. A cluster does not accrue charges while it is stopped. See + /// [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + /// for more details about stopping a cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a previously stopped Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + /// for more details about starting a cluster. /// /// /// The name of the resource group. @@ -645,8 +774,35 @@ public partial interface IManagedClustersOperations /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Submits a command to run against the Managed Cluster. + /// + /// + /// AKS will create a pod to run the command. This is primarily useful + /// for private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The run command request /// /// /// The headers that will be added to request. @@ -663,14 +819,10 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -694,9 +846,33 @@ public partial interface IManagedClustersOperations /// Lists managed clusters 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)); + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. + /// /// - /// Lists managed clusters in the specified subscription and resource - /// group. The operation returns properties of each managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation + /// returns properties of each egress endpoint. /// /// /// The NextLink from the previous successful call to List operation. @@ -716,6 +892,6 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOpenShiftManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOpenShiftManagedClustersOperations.cs deleted file mode 100644 index 50a414c1f49ab..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOpenShiftManagedClustersOperations.cs +++ /dev/null @@ -1,345 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// OpenShiftManagedClustersOperations operations. - /// - public partial interface IOpenShiftManagedClustersOperations - { - /// - /// Gets a list of OpenShift managed clusters in the specified - /// subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified - /// subscription. The operation returns properties of each OpenShift - /// managed cluster. - /// - /// - /// 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 OpenShift managed clusters in the specified subscription and - /// resource group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and - /// resource group. The operation returns properties of each OpenShift - /// managed cluster. - /// - /// - /// The name of the resource group. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a OpenShift managed cluster. - /// - /// - /// Gets the details of the managed OpenShift cluster with a specified - /// resource group and name. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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 an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed - /// Cluster 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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 an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource - /// group and name. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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)); - /// - /// Creates or updates an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed - /// Cluster 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource - /// group and name. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of OpenShift managed clusters in the specified - /// subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified - /// subscription. The operation returns properties of each OpenShift - /// managed cluster. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists OpenShift managed clusters in the specified subscription and - /// resource group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and - /// resource group. The operation returns properties of each OpenShift - /// managed cluster. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOperations.cs index bf33948457dca..b8bbbe9eb5c74 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.ContainerService public partial interface IOperations { /// - /// Gets a list of compute operations. + /// Gets a list of operations. /// /// /// The headers that will be added to request. 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 7040a2b527c4b..65c6818cb0755 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -28,9 +28,8 @@ public partial interface IPrivateEndpointConnectionsOperations /// managed cluster. /// /// - /// Gets a list of private endpoint connections in the specified - /// managed cluster. The operation returns properties of each private - /// endpoint connection. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. @@ -55,11 +54,11 @@ public partial interface IPrivateEndpointConnectionsOperations /// Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the private endpoint connection. + /// Gets the specified private endpoint connection. /// /// - /// Gets the details of the private endpoint connection by managed - /// cluster and resource group. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. @@ -89,10 +88,6 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Updates a private endpoint connection. /// - /// - /// Updates a private endpoint connection in the specified managed - /// cluster. - /// /// /// The name of the resource group. /// @@ -103,8 +98,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the private endpoint connection. /// /// - /// Parameters supplied to the Update a private endpoint connection - /// operation. + /// The updated private endpoint connection. /// /// /// The headers that will be added to request. @@ -125,10 +119,6 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed - /// cluster. - /// /// /// The name of the resource group. /// @@ -154,10 +144,6 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed - /// cluster. - /// /// /// The name of the resource group. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs new file mode 100644 index 0000000000000..cd758eb5d3747 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs @@ -0,0 +1,57 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkResourcesOperations operations. + /// + public partial interface IPrivateLinkResourcesOperations + { + /// + /// Gets a list of private link resources in the specified managed + /// cluster. + /// + /// + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs new file mode 100644 index 0000000000000..a8d2d4863090f --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ResolvePrivateLinkServiceIdOperations operations. + /// + public partial interface IResolvePrivateLinkServiceIdOperations + { + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Parameters required in order to resolve a private link service ID. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs similarity index 55% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperations.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs index 88ceffb58c7dc..07ee742f075dd 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.ContainerService using System.Threading.Tasks; /// - /// OpenShiftManagedClustersOperations operations. + /// MaintenanceConfigurationsOperations operations. /// - internal partial class OpenShiftManagedClustersOperations : IServiceOperations, IOpenShiftManagedClustersOperations + internal partial class MaintenanceConfigurationsOperations : IServiceOperations, IMaintenanceConfigurationsOperations { /// - /// Initializes a new instance of the OpenShiftManagedClustersOperations class. + /// Initializes a new instance of the MaintenanceConfigurationsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class OpenShiftManagedClustersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal OpenShiftManagedClustersOperations(ContainerServiceClient client) + internal MaintenanceConfigurationsOperations(ContainerServiceClient client) { if (client == null) { @@ -51,12 +51,14 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) public ContainerServiceClient Client { get; private set; } /// - /// Gets a list of OpenShift managed clusters in the specified subscription. + /// Gets a list of maintenance configurations in the specified managed cluster. /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// /// /// Headers that will be added to request. /// @@ -78,13 +80,46 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-30"; + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -92,18 +127,21 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByManagedCluster", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -198,7 +236,7 @@ internal OpenShiftManagedClustersOperations(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")) @@ -211,7 +249,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -231,16 +269,17 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) } /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. + /// Gets the specified maintenance configuration of a managed cluster. /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// /// /// The name of the resource group. /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// /// /// Headers that will be added to request. /// @@ -262,8 +301,12 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -279,7 +322,29 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2019-04-30"; + 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 (configName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configName"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -287,20 +352,23 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("configName", configName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + 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/openShiftManagedClusters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -395,7 +463,7 @@ internal OpenShiftManagedClustersOperations(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")) @@ -408,7 +476,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -428,17 +496,20 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets a OpenShift managed cluster. + /// Creates or updates a maintenance configuration in the specified managed + /// cluster. /// - /// - /// Gets the details of the managed OpenShift cluster with a specified resource - /// group and name. - /// /// /// The name of the resource group. /// /// - /// The name of the OpenShift managed cluster resource. + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The maintenance configuration to create or update. /// /// /// Headers that will be added to request. @@ -461,8 +532,12 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// 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)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -482,7 +557,29 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - string apiVersion = "2019-04-30"; + 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 (configName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -490,22 +587,24 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("configName", configName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + 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/openShiftManagedClusters/{resourceName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -514,7 +613,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -545,6 +644,12 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) // 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) { @@ -600,7 +705,7 @@ internal OpenShiftManagedClustersOperations(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")) @@ -613,7 +718,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -633,105 +738,16 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) } /// - /// Creates or updates an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// 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)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates or updates an OpenShift managed cluster. + /// Deletes a maintenance configuration. /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// /// /// The name of the resource group. /// /// - /// The name of the OpenShift managed cluster resource. + /// The name of the managed cluster resource. /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. + /// + /// The name of the maintenance configuration. /// /// /// Headers that will be added to request. @@ -742,9 +758,6 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -754,8 +767,12 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -775,15 +792,25 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (parameters == null) + if (resourceName != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + 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) + if (configName == null) { - parameters.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "configName"); } - string apiVersion = "2019-04-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -791,23 +818,23 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("configName", configName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + 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/openShiftManagedClusters/{resourceName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -816,7 +843,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -847,12 +874,6 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) // 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) { @@ -873,7 +894,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -908,629 +929,13 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 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 an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (resourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); - } - string apiVersion = "2019-04-30"; - 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("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", 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/openShiftManagedClusters/{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 (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (resourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); - } - string apiVersion = "2019-04-30"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{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 (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// - /// - /// 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); @@ -1539,13 +944,8 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) } /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. + /// Gets a list of maintenance configurations in the specified managed cluster. /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1570,7 +970,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1585,7 +985,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByManagedClusterNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1684,7 +1084,7 @@ internal OpenShiftManagedClustersOperations(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")) @@ -1697,7 +1097,7 @@ internal OpenShiftManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs new file mode 100644 index 0000000000000..638889d853587 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs @@ -0,0 +1,242 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for MaintenanceConfigurationsOperations. + /// + public static partial class MaintenanceConfigurationsOperationsExtensions + { + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static IPage ListByManagedCluster(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName) + { + return operations.ListByManagedClusterAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByManagedClusterAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByManagedClusterWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) + { + return operations.GetAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a maintenance configuration in the specified managed + /// cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The maintenance configuration to create or update. + /// + public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, configName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a maintenance configuration in the specified managed + /// cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The maintenance configuration to create or update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, configName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a maintenance configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + public static void Delete(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) + { + operations.DeleteAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a maintenance configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByManagedClusterNext(this IMaintenanceConfigurationsOperations operations, string nextPageLink) + { + return operations.ListByManagedClusterNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByManagedClusterNextAsync(this IMaintenanceConfigurationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByManagedClusterNextWithHttpMessagesAsync(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 a7a6108f31b6b..1d51d037c2899 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs @@ -50,13 +50,204 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// public ContainerServiceClient Client { get; private set; } + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + /// + /// 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> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("resourceType", resourceType); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetOSOptions", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (resourceType != null) + { + _queryParameters.Add(string.Format("resource-type={0}", System.Uri.EscapeDataString(resourceType))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// Headers that will be added to request. /// @@ -80,11 +271,14 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// 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.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -92,7 +286,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -101,9 +294,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -211,7 +404,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -233,10 +426,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. - /// /// /// The name of the resource group. /// @@ -263,6 +452,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// 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.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -278,7 +471,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -286,7 +478,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); @@ -297,9 +488,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -407,7 +598,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -427,12 +618,8 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets upgrade profile for a managed cluster. + /// Gets the upgrade profile of a managed cluster. /// - /// - /// Gets the details of the upgrade profile for a managed cluster with a - /// specified resource group and name. - /// /// /// The name of the resource group. /// @@ -462,6 +649,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -496,7 +687,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +694,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -517,9 +706,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -650,12 +839,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Gets an access profile of a managed cluster. /// /// - /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. **WARNING**: This API will be - /// deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// **WARNING**: This API will be deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) /// . /// /// @@ -691,6 +878,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] public async Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -729,7 +920,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "roleName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -737,7 +927,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("roleName", roleName); @@ -752,9 +941,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{roleName}", System.Uri.EscapeDataString(roleName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -882,18 +1071,17 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets cluster admin credential of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// - /// - /// Gets cluster admin credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// Headers that will be added to request. /// @@ -915,8 +1103,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -951,7 +1143,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -959,9 +1150,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("serverFqdn", serverFqdn); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListClusterAdminCredentials", tracingParameters); } @@ -972,9 +1163,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (serverFqdn != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("server-fqdn={0}", System.Uri.EscapeDataString(serverFqdn))); } if (_queryParameters.Count > 0) { @@ -1102,18 +1297,17 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets cluster user credential of a managed cluster. + /// Lists the user credentials of a managed cluster. /// - /// - /// Gets cluster user credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// Headers that will be added to request. /// @@ -1135,8 +1329,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1171,7 +1369,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1179,9 +1376,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("serverFqdn", serverFqdn); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListClusterUserCredentials", tracingParameters); } @@ -1192,9 +1389,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (serverFqdn != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("server-fqdn={0}", System.Uri.EscapeDataString(serverFqdn))); } if (_queryParameters.Count > 0) { @@ -1322,18 +1523,17 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets cluster monitoring user credential of a managed cluster. + /// Lists the cluster monitoring user credentials of a managed cluster. /// - /// - /// Gets cluster monitoring user credential of the managed cluster with a - /// specified resource group and name. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// Headers that will be added to request. /// @@ -1355,8 +1555,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1391,7 +1595,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1399,9 +1602,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("serverFqdn", serverFqdn); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListClusterMonitoringUserCredentials", tracingParameters); } @@ -1412,9 +1615,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (serverFqdn != null) + { + _queryParameters.Add(string.Format("server-fqdn={0}", System.Uri.EscapeDataString(serverFqdn))); } if (_queryParameters.Count > 0) { @@ -1544,10 +1751,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Gets a managed cluster. /// - /// - /// Gets the details of the managed cluster with a specified resource group and - /// name. - /// /// /// The name of the resource group. /// @@ -1577,6 +1780,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// 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.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1611,7 +1818,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1619,7 +1825,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -1632,9 +1837,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1764,10 +1969,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Creates or updates a managed cluster. /// - /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. - /// /// /// The name of the resource group. /// @@ -1775,7 +1976,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// The managed cluster to create or update. /// /// /// The headers that will be added to request. @@ -1793,9 +1994,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The name of the resource group. /// @@ -1821,9 +2019,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and name. - /// /// /// The name of the resource group. /// @@ -1844,10 +2039,11 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a service + /// principal /// /// /// The name of the resource group. @@ -1856,8 +2052,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. + /// The service principal profile to set on the managed cluster. /// /// /// The headers that will be added to request. @@ -1873,11 +2068,8 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The name of the resource group. /// @@ -1885,8 +2077,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. + /// The AAD profile to set on the Managed Cluster /// /// /// The headers that will be added to request. @@ -1902,10 +2093,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The name of the resource group. @@ -1927,10 +2120,15 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Upgrade node image version of an agent pool to the latest. + /// Stops a Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. /// /// /// The name of the resource group. @@ -1938,8 +2136,32 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Starts a previously stopped Managed Cluster + /// + /// + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. /// /// /// The headers that will be added to request. @@ -1947,19 +2169,20 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Creates or updates a managed cluster. + /// Submits a command to run against the Managed Cluster. /// /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// /// The name of the resource group. @@ -1967,32 +2190,1197 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The name of the managed cluster resource. /// - /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// + /// The run command request /// /// - /// Headers that will be added to request. + /// 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 - /// - /// + public async Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + /// + /// 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> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (commandId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "commandId"); + } + // 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("commandId", commandId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetCommandResult", 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}/commandResults/{commandId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{commandId}", System.Uri.EscapeDataString(commandId)); + 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 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. + /// + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. + /// + /// + /// The name of the resource group. + /// + /// + /// 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>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + // 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, "ListOutboundNetworkDependenciesEndpoints", 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}/outboundNetworkDependenciesEndpoints").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. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The managed cluster 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + 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, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{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. + /// + /// + /// The name of the resource group. + /// + /// + /// 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> BeginUpdateTagsWithHttpMessagesAsync(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.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + 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, "BeginUpdateTags", 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}").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. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// /// Thrown when a required parameter is null /// /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + // 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, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{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 != 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; + } + + /// + /// Reset the Service Principal Profile of a managed cluster. + /// + /// + /// This action cannot be performed on a cluster that is not using a service + /// principal + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The service principal profile to set on the managed cluster. + /// + /// + /// 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 BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2035,7 +3423,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2043,23 +3430,22 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginResetServicePrincipalProfile", 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2068,7 +3454,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2125,7 +3511,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2160,49 +3546,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 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); @@ -2211,19 +3561,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Updates tags on a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The name of the resource group. /// /// /// The name of the managed cluster resource. /// - /// - /// Resource tags. + /// + /// The AAD profile to set on the Managed Cluster /// /// /// Headers that will be added to request. @@ -2234,9 +3581,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -2246,8 +3590,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2282,11 +3630,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; - TagsObject parameters = new TagsObject(); - if (tags != null) + if (parameters == null) { - parameters.Tags = tags; + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2295,23 +3641,22 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginResetAADProfile", 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2320,7 +3665,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2377,7 +3722,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2412,31 +3757,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 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); @@ -2445,10 +3772,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Deletes a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Deletes the managed cluster with a specified resource group and name. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The name of the resource group. @@ -2474,8 +3803,12 @@ 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 BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2510,7 +3843,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2518,22 +3850,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRotateClusterCertificates", 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2542,7 +3873,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2643,10 +3974,15 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Reset Service Principal Profile of a managed cluster. + /// Stops a Managed Cluster /// /// - /// Update the service principal Profile for a managed cluster. + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. /// /// /// The name of the resource group. @@ -2654,10 +3990,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The name of the managed cluster resource. /// - /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. - /// /// /// Headers that will be added to request. /// @@ -2676,8 +4008,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2712,15 +4048,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2728,23 +4055,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResetServicePrincipalProfile", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2784,12 +4109,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) // 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) { @@ -2810,7 +4129,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2860,10 +4179,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Reset AAD Profile of a managed cluster. + /// Starts a previously stopped Managed Cluster /// /// - /// Update the AAD Profile for a managed cluster. + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. /// /// /// The name of the resource group. @@ -2871,10 +4192,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The name of the managed cluster resource. /// - /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. - /// /// /// Headers that will be added to request. /// @@ -2893,8 +4210,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2929,11 +4250,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2941,23 +4257,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResetAADProfile", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2997,12 +4311,6 @@ internal ManagedClustersOperations(ContainerServiceClient client) // 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) { @@ -3023,7 +4331,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3073,10 +4381,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Rotate certificates of a managed cluster. + /// Submits a command to run against the Managed Cluster. /// /// - /// Rotate certificates of a managed cluster. + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// /// The name of the resource group. @@ -3084,6 +4394,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The name of the managed cluster resource. /// + /// + /// The run command request + /// /// /// Headers that will be added to request. /// @@ -3093,6 +4406,9 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -3102,8 +4418,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -3138,7 +4458,14 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; + if (requestPayload == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "requestPayload"); + } + if (requestPayload != null) + { + requestPayload.Validate(); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3146,22 +4473,22 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("requestPayload", requestPayload); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRotateClusterCertificates", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRunCommand", 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}/rotateClusterCertificates").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -3201,6 +4528,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) // Serialize Request string _requestContent = null; + if(requestPayload != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(requestPayload, 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) { @@ -3221,7 +4554,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3256,13 +4589,31 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 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); @@ -3271,19 +4622,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Upgrade node image version of an agent pool to the latest. + /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Upgrade node image version of an agent pool to the latest. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -3306,47 +4648,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (resourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); - } - if (resourceName != null) - { - if (resourceName.Length > 63) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); - } - if (resourceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); - } - } - if (agentPoolName == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3354,25 +4661,14 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("agentPoolName", agentPoolName); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -3380,7 +4676,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -3431,7 +4727,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3466,7 +4762,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3474,12 +4770,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3499,12 +4795,8 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Gets a list of managed clusters in the specified subscription. + /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -3529,7 +4821,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -3544,7 +4836,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -3656,7 +4948,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3676,11 +4968,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) } /// - /// Lists managed clusters in the specified subscription and resource group. + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. /// /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. /// /// /// The NextLink from the previous successful call to List operation. @@ -3706,7 +5000,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -3721,7 +5015,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpointsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -3820,7 +5114,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3833,7 +5127,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs index a152a225467d8..5a64e1e4c822b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs @@ -23,13 +23,49 @@ namespace Microsoft.Azure.Management.ContainerService /// public static partial class ManagedClustersOperationsExtensions { + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + public static OSOptionProfile GetOSOptions(this IManagedClustersOperations operations, string location, string resourceType = default(string)) + { + return operations.GetOSOptionsAsync(location, resourceType).GetAwaiter().GetResult(); + } + + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + /// + /// The cancellation token. + /// + public static async Task GetOSOptionsAsync(this IManagedClustersOperations operations, string location, string resourceType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetOSOptionsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -41,10 +77,6 @@ public static IPage List(this IManagedClustersOperations operati /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -62,10 +94,6 @@ public static IPage List(this IManagedClustersOperations operati /// /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -80,10 +108,6 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe /// /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -102,12 +126,8 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe } /// - /// Gets upgrade profile for a managed cluster. + /// Gets the upgrade profile of a managed cluster. /// - /// - /// Gets the details of the upgrade profile for a managed cluster with a - /// specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -123,12 +143,8 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste } /// - /// Gets upgrade profile for a managed cluster. + /// Gets the upgrade profile of a managed cluster. /// - /// - /// Gets the details of the upgrade profile for a managed cluster with a - /// specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -153,12 +169,10 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste /// Gets an access profile of a managed cluster. /// /// - /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. **WARNING**: This API will be - /// deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// **WARNING**: This API will be deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) /// . /// /// @@ -183,12 +197,10 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// Gets an access profile of a managed cluster. /// /// - /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. **WARNING**: This API will be - /// deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// **WARNING**: This API will be deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) /// . /// /// @@ -216,12 +228,8 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters } /// - /// Gets cluster admin credential of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// - /// - /// Gets cluster admin credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The operations group for this extension method. /// @@ -231,18 +239,17 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// /// The name of the managed cluster resource. /// - public static CredentialResults ListClusterAdminCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + /// + /// server fqdn type for credentials to be returned + /// + public static CredentialResults ListClusterAdminCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) { - return operations.ListClusterAdminCredentialsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return operations.ListClusterAdminCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); } /// - /// Gets cluster admin credential of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// - /// - /// Gets cluster admin credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The operations group for this extension method. /// @@ -252,24 +259,23 @@ public static CredentialResults ListClusterAdminCredentials(this IManagedCluster /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The cancellation token. /// - public static async Task ListClusterAdminCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListClusterAdminCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListClusterAdminCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListClusterAdminCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets cluster user credential of a managed cluster. + /// Lists the user credentials of a managed cluster. /// - /// - /// Gets cluster user credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The operations group for this extension method. /// @@ -279,18 +285,17 @@ public static CredentialResults ListClusterAdminCredentials(this IManagedCluster /// /// The name of the managed cluster resource. /// - public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + /// + /// server fqdn type for credentials to be returned + /// + public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) { - return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); } /// - /// Gets cluster user credential of a managed cluster. + /// Lists the user credentials of a managed cluster. /// - /// - /// Gets cluster user credential of the managed cluster with a specified - /// resource group and name. - /// /// /// The operations group for this extension method. /// @@ -300,24 +305,23 @@ public static CredentialResults ListClusterUserCredentials(this IManagedClusters /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The cancellation token. /// - public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets cluster monitoring user credential of a managed cluster. + /// Lists the cluster monitoring user credentials of a managed cluster. /// - /// - /// Gets cluster monitoring user credential of the managed cluster with a - /// specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -327,18 +331,17 @@ public static CredentialResults ListClusterUserCredentials(this IManagedClusters /// /// The name of the managed cluster resource. /// - public static CredentialResults ListClusterMonitoringUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + /// + /// server fqdn type for credentials to be returned + /// + public static CredentialResults ListClusterMonitoringUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) { - return operations.ListClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return operations.ListClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); } /// - /// Gets cluster monitoring user credential of a managed cluster. + /// Lists the cluster monitoring user credentials of a managed cluster. /// - /// - /// Gets cluster monitoring user credential of the managed cluster with a - /// specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -348,12 +351,15 @@ public static CredentialResults ListClusterMonitoringUserCredentials(this IManag /// /// The name of the managed cluster resource. /// + /// + /// server fqdn type for credentials to be returned + /// /// /// The cancellation token. /// - public static async Task ListClusterMonitoringUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListClusterMonitoringUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -362,10 +368,6 @@ public static CredentialResults ListClusterMonitoringUserCredentials(this IManag /// /// Gets a managed cluster. /// - /// - /// Gets the details of the managed cluster with a specified resource group and - /// name. - /// /// /// The operations group for this extension method. /// @@ -383,10 +385,6 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str /// /// Gets a managed cluster. /// - /// - /// Gets the details of the managed cluster with a specified resource group and - /// name. - /// /// /// The operations group for this extension method. /// @@ -410,10 +408,6 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str /// /// Creates or updates a managed cluster. /// - /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. - /// /// /// The operations group for this extension method. /// @@ -424,7 +418,7 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// The managed cluster to create or update. /// public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) { @@ -434,10 +428,6 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// /// Creates or updates a managed cluster. /// - /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. - /// /// /// The operations group for this extension method. /// @@ -448,7 +438,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// The managed cluster to create or update. /// /// /// The cancellation token. @@ -464,9 +454,6 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The operations group for this extension method. /// @@ -487,9 +474,6 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The operations group for this extension method. /// @@ -516,9 +500,6 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -536,9 +517,6 @@ public static void Delete(this IManagedClustersOperations operations, string res /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -557,10 +535,11 @@ public static void Delete(this IManagedClustersOperations operations, string res } /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a service + /// principal /// /// /// The operations group for this extension method. @@ -572,8 +551,7 @@ public static void Delete(this IManagedClustersOperations operations, string res /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. + /// The service principal profile to set on the managed cluster. /// public static void ResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) { @@ -581,10 +559,11 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations } /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a service + /// principal /// /// /// The operations group for this extension method. @@ -596,8 +575,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. + /// The service principal profile to set on the managed cluster. /// /// /// The cancellation token. @@ -608,11 +586,8 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations } /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The operations group for this extension method. /// @@ -623,8 +598,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. + /// The AAD profile to set on the Managed Cluster /// public static void ResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) { @@ -632,11 +606,8 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s } /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The operations group for this extension method. /// @@ -647,8 +618,7 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. + /// The AAD profile to set on the Managed Cluster /// /// /// The cancellation token. @@ -659,10 +629,12 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s } /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The operations group for this extension method. @@ -679,10 +651,12 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope } /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The operations group for this extension method. @@ -702,10 +676,40 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope } /// - /// Upgrade node image version of an agent pool to the latest. + /// Stops a Managed Cluster + /// + /// + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static void Stop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + operations.StopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Stops a Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. /// /// /// The operations group for this extension method. @@ -716,19 +720,21 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The cancellation token. /// - public static AgentPool UpgradeNodeImageVersion(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + public static async Task StopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { - return operations.UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + (await operations.StopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Upgrade node image version of an agent pool to the latest. + /// Starts a previously stopped Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. /// /// /// The operations group for this extension method. @@ -739,26 +745,169 @@ public static AgentPool UpgradeNodeImageVersion(this IManagedClustersOperations /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + public static void Start(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + operations.StartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Starts a previously stopped Managed Cluster + /// + /// + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. /// /// /// The cancellation token. /// - public static async Task UpgradeNodeImageVersionAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task StartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Submits a command to run against the Managed Cluster. + /// + /// + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The run command request + /// + public static RunCommandResult RunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) { - using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + return operations.RunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); + } + + /// + /// Submits a command to run against the Managed Cluster. + /// + /// + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The run command request + /// + /// + /// The cancellation token. + /// + public static async Task RunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates or updates a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + public static RunCommandResult GetCommandResult(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId) + { + return operations.GetCommandResultAsync(resourceGroupName, resourceName, commandId).GetAwaiter().GetResult(); + } + + /// + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + /// + /// The cancellation token. + /// + public static async Task GetCommandResultAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetCommandResultWithHttpMessagesAsync(resourceGroupName, resourceName, commandId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. + /// + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static IPage ListOutboundNetworkDependenciesEndpoints(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return operations.ListOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. /// /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. /// /// /// The operations group for this extension method. @@ -769,8 +918,31 @@ public static AgentPool UpgradeNodeImageVersion(this IManagedClustersOperations /// /// The name of the managed cluster resource. /// + /// + /// The cancellation token. + /// + public static async Task> ListOutboundNetworkDependenciesEndpointsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// The managed cluster to create or update. /// public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) { @@ -780,10 +952,6 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// /// Creates or updates a managed cluster. /// - /// - /// Creates or updates a managed cluster with the specified configuration for - /// agents and Kubernetes version. - /// /// /// The operations group for this extension method. /// @@ -794,7 +962,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// The managed cluster to create or update. /// /// /// The cancellation token. @@ -810,9 +978,6 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The operations group for this extension method. /// @@ -833,9 +998,6 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// /// Updates tags on a managed cluster. /// - /// - /// Updates a managed cluster with the specified tags. - /// /// /// The operations group for this extension method. /// @@ -862,9 +1024,6 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -882,9 +1041,6 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin /// /// Deletes a managed cluster. /// - /// - /// Deletes the managed cluster with a specified resource group and name. - /// /// /// The operations group for this extension method. /// @@ -903,10 +1059,11 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin } /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a service + /// principal /// /// /// The operations group for this extension method. @@ -918,8 +1075,7 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. + /// The service principal profile to set on the managed cluster. /// public static void BeginResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) { @@ -927,10 +1083,11 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat } /// - /// Reset Service Principal Profile of a managed cluster. + /// Reset the Service Principal Profile of a managed cluster. /// /// - /// Update the service principal Profile for a managed cluster. + /// This action cannot be performed on a cluster that is not using a service + /// principal /// /// /// The operations group for this extension method. @@ -942,8 +1099,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset Service Principal Profile operation for a - /// Managed Cluster. + /// The service principal profile to set on the managed cluster. /// /// /// The cancellation token. @@ -954,11 +1110,8 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat } /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The operations group for this extension method. /// @@ -969,8 +1122,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. + /// The AAD profile to set on the Managed Cluster /// public static void BeginResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) { @@ -978,11 +1130,8 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio } /// - /// Reset AAD Profile of a managed cluster. + /// Reset the AAD Profile of a managed cluster. /// - /// - /// Update the AAD Profile for a managed cluster. - /// /// /// The operations group for this extension method. /// @@ -993,8 +1142,7 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio /// The name of the managed cluster resource. /// /// - /// Parameters supplied to the Reset AAD Profile operation for a Managed - /// Cluster. + /// The AAD profile to set on the Managed Cluster /// /// /// The cancellation token. @@ -1005,10 +1153,12 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio } /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The operations group for this extension method. @@ -1025,10 +1175,12 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation } /// - /// Rotate certificates of a managed cluster. + /// Rotates the certificates of a managed cluster. /// /// - /// Rotate certificates of a managed cluster. + /// See [Certificate + /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for + /// more details about rotating managed cluster certificates. /// /// /// The operations group for this extension method. @@ -1048,10 +1200,87 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation } /// - /// Upgrade node image version of an agent pool to the latest. + /// Stops a Managed Cluster + /// + /// + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static void BeginStop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + operations.BeginStopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Stops a Managed Cluster + /// + /// + /// This can only be performed on Azure Virtual Machine Scale set backed + /// clusters. Stopping a cluster stops the control plane and agent nodes + /// entirely, while maintaining all object and cluster state. A cluster does + /// not accrue charges while it is stopped. See [stopping a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Starts a previously stopped Managed Cluster + /// + /// + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static void BeginStart(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + operations.BeginStartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Starts a previously stopped Managed Cluster /// /// - /// Upgrade node image version of an agent pool to the latest. + /// See [starting a + /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more + /// details about starting a cluster. /// /// /// The operations group for this extension method. @@ -1062,19 +1291,21 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The cancellation token. /// - public static AgentPool BeginUpgradeNodeImageVersion(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + public static async Task BeginStartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { - return operations.BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Upgrade node image version of an agent pool to the latest. + /// Submits a command to run against the Managed Cluster. /// /// - /// Upgrade node image version of an agent pool to the latest. + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// /// The operations group for this extension method. @@ -1085,15 +1316,40 @@ public static AgentPool BeginUpgradeNodeImageVersion(this IManagedClustersOperat /// /// The name of the managed cluster resource. /// - /// - /// The name of the agent pool. + /// + /// The run command request + /// + public static RunCommandResult BeginRunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) + { + return operations.BeginRunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); + } + + /// + /// Submits a command to run against the Managed Cluster. + /// + /// + /// AKS will create a pod to run the command. This is primarily useful for + /// private clusters. For more information see [AKS Run + /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The run command request /// /// /// The cancellation token. /// - public static async Task BeginUpgradeNodeImageVersionAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginRunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -1102,10 +1358,6 @@ public static AgentPool BeginUpgradeNodeImageVersion(this IManagedClustersOperat /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -1120,10 +1372,6 @@ public static IPage ListNext(this IManagedClustersOperations ope /// /// Gets a list of managed clusters in the specified subscription. /// - /// - /// Gets a list of managed clusters in the specified subscription. The - /// operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -1144,10 +1392,6 @@ public static IPage ListNext(this IManagedClustersOperations ope /// /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -1162,10 +1406,6 @@ public static IPage ListByResourceGroupNext(this IManagedCluster /// /// Lists managed clusters in the specified subscription and resource group. /// - /// - /// Lists managed clusters in the specified subscription and resource group. - /// The operation returns properties of each managed cluster. - /// /// /// The operations group for this extension method. /// @@ -1183,5 +1423,51 @@ public static IPage ListByResourceGroupNext(this IManagedCluster } } + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. + /// + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListOutboundNetworkDependenciesEndpointsNext(this IManagedClustersOperations operations, string nextPageLink) + { + return operations.ListOutboundNetworkDependenciesEndpointsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. + /// + /// + /// Gets a list of egress endpoints (network endpoints of all outbound + /// dependencies) in the specified managed cluster. The operation returns + /// properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListOutboundNetworkDependenciesEndpointsNextAsync(this IManagedClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs index 6fa595e91f0c7..58fbd8379397a 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 @@ -40,124 +40,91 @@ public AgentPool() /// resource. /// Resource type /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 100 - /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) - /// for system pools. The default value is 1. - /// Size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - /// OS Disk Size in GB to be used to specify - /// the disk size for every machine in this master/agent pool. If you - /// specify 0, it will apply the default osDisk size according to the - /// vmSize specified. - /// VNet SubnetID specifies the VNet's - /// subnet identifier. - /// Maximum number of pods that can run on a + /// containers. Allowed values must be in the range of 0 to 1000 + /// (inclusive) for user pools and in the range of 1 to 1000 + /// (inclusive) for system pools. The default value is 1. + /// The size of the agent pool VMs. + /// Possible values include: 'Managed', + /// 'Ephemeral' + /// Possible values include: 'OS', + /// 'Temporary' + /// 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 + /// when launched. + /// The maximum number of pods that can run on a /// node. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Maximum number of nodes for + /// Possible values include: 'Linux', + /// 'Windows' + /// Possible values include: 'Ubuntu', + /// 'CBLMariner' + /// The maximum number of nodes for /// auto-scaling - /// Minimum number of nodes for + /// The minimum number of nodes for /// auto-scaling /// Whether to enable /// auto-scaler - /// AgentPoolType represents types of an - /// agent pool. Possible values include: 'VirtualMachineScaleSets', - /// 'AvailabilitySet' - /// AgentPoolMode represents mode of an agent pool. - /// Possible values include: 'System', 'User' - /// Version of orchestrator specified - /// when creating the managed cluster. - /// Version of node image + /// Possible values include: + /// 'VirtualMachineScaleSets', 'AvailabilitySet' + /// Possible values include: 'System', + /// 'User' + /// The version of Kubernetes running + /// on the Agent Pool. + /// The version of node image /// Settings for upgrading the /// agentpool /// The current deployment or - /// provisioning state, which only appears in the response. - /// Availability zones for nodes. Must - /// use VirtualMachineScaleSets AgentPoolType. - /// Enable public IP for nodes - /// ScaleSetPriority to be used to - /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Spot', 'Regular' - /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for Spot virtual machine scale set. - /// Default to Delete. Possible values include: 'Delete', - /// 'Deallocate' - /// SpotMaxPrice to be used to specify the - /// maximum price you are willing to pay in US Dollars. Possible values - /// are any decimal value greater than zero or -1 which indicates - /// default price to be up-to on-demand. - /// Agent pool tags to be persisted on the agent - /// pool virtual machine scale set. - /// Agent pool node labels to be persisted - /// across all nodes in agent pool. - /// Taints added to new nodes during node pool - /// create and scale. For example, key=value:NoSchedule. + /// provisioning state. + /// Describes 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'. + /// Whether each node is allocated its + /// own public IP. + /// The public IP prefix ID which VM + /// nodes should use IPs from. + /// The Virtual Machine Scale Set + /// priority. If not specified, the default is 'Regular'. Possible + /// values include: 'Spot', 'Regular' + /// The Virtual Machine Scale Set + /// eviction policy to use. + /// The max price (in US Dollars) you are + /// willing to pay for spot instances. Possible values are any decimal + /// value greater than zero or -1 which indicates default price to be + /// up-to on-demand. + /// The tags to be persisted on the agent pool + /// virtual machine scale set. + /// The node labels to be persisted across all + /// nodes in agent pool. + /// The taints added to new nodes during node + /// pool create and scale. For example, key=value:NoSchedule. /// The ID for Proximity /// Placement Group. - public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string)) + /// The Kubelet configuration on the agent + /// pool nodes. + /// The OS configuration of Linux agent + /// nodes. + /// Whether to enable host based + /// OS and data drive encryption. + /// Whether to enable UltraSSD + /// Whether to use a FIPS-enabled OS. + /// 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 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)) : base(id, name, type) { Count = count; VmSize = vmSize; OsDiskSizeGB = osDiskSizeGB; + OsDiskType = osDiskType; + KubeletDiskType = kubeletDiskType; VnetSubnetID = vnetSubnetID; + PodSubnetID = podSubnetID; MaxPods = maxPods; OsType = osType; + OsSKU = osSKU; MaxCount = maxCount; MinCount = minCount; EnableAutoScaling = enableAutoScaling; @@ -167,8 +134,10 @@ public AgentPool() NodeImageVersion = nodeImageVersion; UpgradeSettings = upgradeSettings; ProvisioningState = provisioningState; + PowerState = powerState; AvailabilityZones = availabilityZones; EnableNodePublicIP = enableNodePublicIP; + NodePublicIPPrefixID = nodePublicIPPrefixID; ScaleSetPriority = scaleSetPriority; ScaleSetEvictionPolicy = scaleSetEvictionPolicy; SpotMaxPrice = spotMaxPrice; @@ -176,6 +145,12 @@ public AgentPool() NodeLabels = nodeLabels; NodeTaints = nodeTaints; ProximityPlacementGroupID = proximityPlacementGroupID; + KubeletConfig = kubeletConfig; + LinuxOSConfig = linuxOSConfig; + EnableEncryptionAtHost = enableEncryptionAtHost; + EnableUltraSSD = enableUltraSSD; + EnableFIPS = enableFIPS; + GpuInstanceProfile = gpuInstanceProfile; CustomInit(); } @@ -186,110 +161,93 @@ public AgentPool() /// /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 0 to 100 (inclusive) for - /// user pools and in the range of 1 to 100 (inclusive) for system + /// Allowed values must be in the range of 0 to 1000 (inclusive) for + /// user pools and in the range of 1 to 1000 (inclusive) for system /// pools. The default value is 1. /// [JsonProperty(PropertyName = "properties.count")] public int? Count { get; set; } /// - /// Gets or sets size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + /// Gets or sets the size of the agent pool VMs. /// + /// + /// VM size availability varies by region. If a node contains + /// insufficient compute resources (memory, cpu, etc) pods might fail + /// to run correctly. For more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// [JsonProperty(PropertyName = "properties.vmSize")] public string VmSize { get; set; } /// - /// Gets or sets OS Disk Size in GB to be used to specify the disk size - /// for every machine in this master/agent pool. If you specify 0, it - /// will apply the default osDisk size according to the vmSize - /// specified. /// [JsonProperty(PropertyName = "properties.osDiskSizeGB")] public int? OsDiskSizeGB { get; set; } /// - /// Gets or sets vNet SubnetID specifies the VNet's subnet identifier. + /// Gets or sets possible values include: 'Managed', 'Ephemeral' /// + [JsonProperty(PropertyName = "properties.osDiskType")] + public string OsDiskType { get; set; } + + /// + /// Gets or sets possible values include: 'OS', 'Temporary' + /// + [JsonProperty(PropertyName = "properties.kubeletDiskType")] + public string KubeletDiskType { get; set; } + + /// + /// Gets or sets the ID of the subnet which agent pool nodes and + /// optionally pods will join on startup. + /// + /// + /// If this is not specified, a VNET and subnet will be generated and + /// used. If no podSubnetID is specified, this applies to nodes and + /// pods, otherwise it applies to just nodes. This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// [JsonProperty(PropertyName = "properties.vnetSubnetID")] public string VnetSubnetID { get; set; } /// - /// Gets or sets maximum number of pods that can run on a node. + /// Gets or sets the ID of the subnet which pods will join when + /// launched. + /// + /// + /// If omitted, pod IPs are statically assigned on the node subnet (see + /// vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + [JsonProperty(PropertyName = "properties.podSubnetID")] + public string PodSubnetID { get; set; } + + /// + /// Gets or sets the maximum number of pods that can run on a node. /// [JsonProperty(PropertyName = "properties.maxPods")] public int? MaxPods { get; set; } /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' + /// Gets or sets possible values include: 'Linux', 'Windows' /// [JsonProperty(PropertyName = "properties.osType")] public string OsType { get; set; } /// - /// Gets or sets maximum number of nodes for auto-scaling + /// Gets or sets possible values include: 'Ubuntu', 'CBLMariner' + /// + [JsonProperty(PropertyName = "properties.osSKU")] + public string OsSKU { get; set; } + + /// + /// Gets or sets the maximum number of nodes for auto-scaling /// [JsonProperty(PropertyName = "properties.maxCount")] public int? MaxCount { get; set; } /// - /// Gets or sets minimum number of nodes for auto-scaling + /// Gets or sets the minimum number of nodes for auto-scaling /// [JsonProperty(PropertyName = "properties.minCount")] public int? MinCount { get; set; } @@ -301,29 +259,35 @@ public AgentPool() public bool? EnableAutoScaling { get; set; } /// - /// Gets or sets agentPoolType represents types of an agent pool. - /// Possible values include: 'VirtualMachineScaleSets', + /// Gets or sets possible values include: 'VirtualMachineScaleSets', /// 'AvailabilitySet' /// [JsonProperty(PropertyName = "properties.type")] public string AgentPoolType { get; set; } /// - /// Gets or sets agentPoolMode represents mode of an agent pool. - /// Possible values include: 'System', 'User' + /// Gets or sets possible values include: 'System', 'User' /// [JsonProperty(PropertyName = "properties.mode")] public string Mode { get; set; } /// - /// Gets or sets version of orchestrator specified when creating the - /// managed cluster. + /// Gets or sets the version of Kubernetes running on the Agent Pool. /// + /// + /// As a best practice, you should upgrade all node pools in an AKS + /// cluster to the same Kubernetes version. The node pool version must + /// have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control + /// plane version. The node pool version cannot be greater than the + /// control plane version. For more information see [upgrading a node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// [JsonProperty(PropertyName = "properties.orchestratorVersion")] public string OrchestratorVersion { get; set; } /// - /// Gets version of node image + /// Gets the version of node image /// [JsonProperty(PropertyName = "properties.nodeImageVersion")] public string NodeImageVersion { get; private set; } @@ -335,67 +299,102 @@ public AgentPool() public AgentPoolUpgradeSettings UpgradeSettings { get; set; } /// - /// Gets the current deployment or provisioning state, which only - /// appears in the response. + /// Gets the current deployment or provisioning state. /// [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } /// - /// Gets or sets availability zones for nodes. Must use - /// VirtualMachineScaleSets AgentPoolType. + /// Gets describes whether the Agent Pool is Running or Stopped + /// + [JsonProperty(PropertyName = "properties.powerState")] + public PowerState PowerState { get; private set; } + + /// + /// Gets or sets the list of Availability zones to use for nodes. This + /// can only be specified if the AgentPoolType property is + /// 'VirtualMachineScaleSets'. /// [JsonProperty(PropertyName = "properties.availabilityZones")] public IList AvailabilityZones { get; set; } /// - /// Gets or sets enable public IP for nodes + /// Gets or sets whether each node is allocated its own public IP. /// + /// + /// Some scenarios may require nodes in a node pool to receive their + /// own dedicated public IP addresses. A common scenario is for gaming + /// workloads, where a console needs to make a direct connection to a + /// cloud virtual machine to minimize hops. For more information see + /// [assigning a public IP per + /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// The default is false. + /// [JsonProperty(PropertyName = "properties.enableNodePublicIP")] public bool? EnableNodePublicIP { get; set; } /// - /// Gets or sets scaleSetPriority to be used to specify virtual machine - /// scale set priority. Default to regular. Possible values include: + /// Gets or sets the public IP prefix ID which VM nodes should use IPs + /// from. + /// + /// + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + [JsonProperty(PropertyName = "properties.nodePublicIPPrefixID")] + public string NodePublicIPPrefixID { get; set; } + + /// + /// Gets or sets the Virtual Machine Scale Set priority. If not + /// specified, the default is 'Regular'. Possible values include: /// 'Spot', 'Regular' /// [JsonProperty(PropertyName = "properties.scaleSetPriority")] public string ScaleSetPriority { get; set; } /// - /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction - /// policy for Spot virtual machine scale set. Default to Delete. - /// Possible values include: 'Delete', 'Deallocate' + /// Gets or sets the Virtual Machine Scale Set eviction policy to use. /// + /// + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If + /// not specified, the default is 'Delete'. Possible values include: + /// 'Delete', 'Deallocate' + /// [JsonProperty(PropertyName = "properties.scaleSetEvictionPolicy")] public string ScaleSetEvictionPolicy { get; set; } /// - /// Gets or sets spotMaxPrice to be used to specify the maximum price - /// you are willing to pay in US Dollars. Possible values are any - /// decimal value greater than zero or -1 which indicates default price - /// to be up-to on-demand. + /// Gets or sets the max price (in US Dollars) you are willing to pay + /// for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to + /// on-demand. /// + /// + /// Possible values are any decimal value greater than zero or -1 which + /// indicates the willingness to pay any on-demand price. For more + /// details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// [JsonProperty(PropertyName = "properties.spotMaxPrice")] public double? SpotMaxPrice { get; set; } /// - /// Gets or sets agent pool tags to be persisted on the agent pool - /// virtual machine scale set. + /// Gets or sets the tags to be persisted on the agent pool virtual + /// machine scale set. /// [JsonProperty(PropertyName = "properties.tags")] public IDictionary Tags { get; set; } /// - /// Gets or sets agent pool node labels to be persisted across all - /// nodes in agent pool. + /// Gets or sets the node labels to be persisted across all nodes in + /// agent pool. /// [JsonProperty(PropertyName = "properties.nodeLabels")] public IDictionary NodeLabels { get; set; } /// - /// Gets or sets taints added to new nodes during node pool create and - /// scale. For example, key=value:NoSchedule. + /// Gets or sets the taints added to new nodes during node pool create + /// and scale. For example, key=value:NoSchedule. /// [JsonProperty(PropertyName = "properties.nodeTaints")] public IList NodeTaints { get; set; } @@ -406,5 +405,67 @@ public AgentPool() [JsonProperty(PropertyName = "properties.proximityPlacementGroupID")] public string ProximityPlacementGroupID { get; set; } + /// + /// Gets or sets the Kubelet configuration on the agent pool nodes. + /// + [JsonProperty(PropertyName = "properties.kubeletConfig")] + public KubeletConfig KubeletConfig { get; set; } + + /// + /// Gets or sets the OS configuration of Linux agent nodes. + /// + [JsonProperty(PropertyName = "properties.linuxOSConfig")] + public LinuxOSConfig LinuxOSConfig { get; set; } + + /// + /// Gets or sets whether to enable host based OS and data drive + /// encryption. + /// + /// + /// This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: + /// https://docs.microsoft.com/azure/aks/enable-host-encryption + /// + [JsonProperty(PropertyName = "properties.enableEncryptionAtHost")] + public bool? EnableEncryptionAtHost { get; set; } + + /// + /// Gets or sets whether to enable UltraSSD + /// + [JsonProperty(PropertyName = "properties.enableUltraSSD")] + public bool? EnableUltraSSD { get; set; } + + /// + /// Gets or sets whether to use a FIPS-enabled OS. + /// + /// + /// See [Add a FIPS-enabled node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// for more details. + /// + [JsonProperty(PropertyName = "properties.enableFIPS")] + public bool? EnableFIPS { get; set; } + + /// + /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG + /// instance profile for supported GPU VM SKU. Possible values include: + /// 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + /// + [JsonProperty(PropertyName = "properties.gpuInstanceProfile")] + public string GpuInstanceProfile { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (KubeletConfig != null) + { + KubeletConfig.Validate(); + } + } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs index aef0635745932..45b6877f4dbb9 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs @@ -34,11 +34,9 @@ public AgentPoolAvailableVersions() /// /// Initializes a new instance of the AgentPoolAvailableVersions class. /// - /// Id of the agent pool available versions. - /// Name of the agent pool available - /// versions. - /// Type of the agent pool available - /// versions. + /// The ID of the agent pool version list. + /// The name of the agent pool version list. + /// Type of the agent pool version list. /// List of versions available for /// agent pool. public AgentPoolAvailableVersions(string id = default(string), string name = default(string), string type = default(string), IList agentPoolVersions = default(IList)) @@ -56,19 +54,19 @@ public AgentPoolAvailableVersions() partial void CustomInit(); /// - /// Gets id of the agent pool available versions. + /// Gets the ID of the agent pool version list. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets name of the agent pool available versions. + /// Gets the name of the agent pool version list. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets type of the agent pool available versions. + /// Gets type of the agent pool version list. /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs index 8642c1dbda4cc..36db10a23d0b7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs @@ -30,8 +30,8 @@ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() /// /// Whether this version is the default /// agent pool version. - /// Kubernetes version (major, minor, - /// patch). + /// The Kubernetes version + /// (major.minor.patch). /// Whether Kubernetes version is currently in /// preview. public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? defaultProperty = default(bool?), string kubernetesVersion = default(string), bool? isPreview = default(bool?)) @@ -55,7 +55,7 @@ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() public bool? DefaultProperty { get; set; } /// - /// Gets or sets kubernetes version (major, minor, patch). + /// Gets or sets the Kubernetes version (major.minor.patch). /// [JsonProperty(PropertyName = "kubernetesVersion")] public string KubernetesVersion { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs index f54700de21675..184ed2de99a51 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs @@ -16,7 +16,16 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class AgentPoolMode { + /// + /// System agent pools are primarily for hosting critical system pods + /// such as CoreDNS and metrics-server. System agent pools osType must + /// be Linux. System agent pools VM SKU must have at least 2vCPUs and + /// 4GB of memory. + /// public const string System = "System"; + /// + /// User agent pools are primarily for hosting your application pods. + /// public const string User = "User"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolType.cs index 16442c9cdc8c3..254c206222fda 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolType.cs @@ -16,7 +16,13 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class AgentPoolType { + /// + /// Create an Agent Pool backed by a Virtual Machine Scale Set. + /// public const string VirtualMachineScaleSets = "VirtualMachineScaleSets"; + /// + /// Use of this is strongly discouraged. + /// public const string AvailabilitySet = "AvailabilitySet"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs index 7d56da23e895a..6eeb818182ee8 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs @@ -34,18 +34,19 @@ public AgentPoolUpgradeProfile() /// /// Initializes a new instance of the AgentPoolUpgradeProfile class. /// - /// Kubernetes version (major, minor, - /// patch). - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Id of the agent pool upgrade profile. - /// Name of the agent pool upgrade profile. - /// Type of the agent pool upgrade profile. + /// The Kubernetes version + /// (major.minor.patch). + /// Possible values include: 'Linux', + /// 'Windows' + /// The ID of the agent pool upgrade profile. + /// The name of the agent pool upgrade + /// profile. + /// The type of the agent pool upgrade + /// profile. /// List of orchestrator types and versions /// available for upgrade. - /// LatestNodeImageVersion is the - /// latest AKS supported node image version. + /// The latest AKS supported node + /// image version. public AgentPoolUpgradeProfile(string kubernetesVersion, string osType, string id = default(string), string name = default(string), string type = default(string), IList upgrades = default(IList), string latestNodeImageVersion = default(string)) { Id = id; @@ -64,33 +65,31 @@ public AgentPoolUpgradeProfile() partial void CustomInit(); /// - /// Gets id of the agent pool upgrade profile. + /// Gets the ID of the agent pool upgrade profile. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets name of the agent pool upgrade profile. + /// Gets the name of the agent pool upgrade profile. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets type of the agent pool upgrade profile. + /// Gets the type of the agent pool upgrade profile. /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } /// - /// Gets or sets kubernetes version (major, minor, patch). + /// Gets or sets the Kubernetes version (major.minor.patch). /// [JsonProperty(PropertyName = "properties.kubernetesVersion")] public string KubernetesVersion { get; set; } /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' + /// Gets or sets possible values include: 'Linux', 'Windows' /// [JsonProperty(PropertyName = "properties.osType")] public string OsType { get; set; } @@ -103,8 +102,7 @@ public AgentPoolUpgradeProfile() public IList Upgrades { get; set; } /// - /// Gets or sets latestNodeImageVersion is the latest AKS supported - /// node image version. + /// Gets or sets the latest AKS supported node image version. /// [JsonProperty(PropertyName = "properties.latestNodeImageVersion")] public string LatestNodeImageVersion { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs index e449e974e445a..7050cca7ee8bf 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -28,10 +28,10 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem() /// Initializes a new instance of the /// AgentPoolUpgradeProfilePropertiesUpgradesItem class. /// - /// Kubernetes version (major, minor, - /// patch). - /// Whether Kubernetes version is currently in - /// preview. + /// The Kubernetes version + /// (major.minor.patch). + /// Whether the Kubernetes version is currently + /// in preview. public AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = default(string), bool? isPreview = default(bool?)) { KubernetesVersion = kubernetesVersion; @@ -45,13 +45,14 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem() partial void CustomInit(); /// - /// Gets or sets kubernetes version (major, minor, patch). + /// Gets or sets the Kubernetes version (major.minor.patch). /// [JsonProperty(PropertyName = "kubernetesVersion")] public string KubernetesVersion { get; set; } /// - /// Gets or sets whether Kubernetes version is currently in preview. + /// Gets or sets whether the Kubernetes version is currently in + /// preview. /// [JsonProperty(PropertyName = "isPreview")] public bool? IsPreview { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs index 0327533c9485a..852c8ba1d2511 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs @@ -29,8 +29,8 @@ public AgentPoolUpgradeSettings() /// /// Initializes a new instance of the AgentPoolUpgradeSettings class. /// - /// Count or percentage of additional nodes to - /// be added during upgrade. If empty uses AKS default + /// The maximum number or percentage of nodes + /// that are surged during upgrade. public AgentPoolUpgradeSettings(string maxSurge = default(string)) { MaxSurge = maxSurge; @@ -43,9 +43,17 @@ public AgentPoolUpgradeSettings() partial void CustomInit(); /// - /// Gets or sets count or percentage of additional nodes to be added - /// during upgrade. If empty uses AKS default + /// Gets or sets the maximum number or percentage of nodes that are + /// surged during upgrade. /// + /// + /// This can either be set to an integer (e.g. '5') or a percentage + /// (e.g. '50%'). If a percentage is specified, it is the percentage of + /// the total agent pool size at the time of the upgrade. For + /// percentages, fractional nodes are rounded up. If not specified, the + /// default is 1. For more information, including best practices, see: + /// https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// [JsonProperty(PropertyName = "maxSurge")] public string MaxSurge { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorTypes.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs similarity index 56% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorTypes.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs index 5df4eeee76414..496ce3931d3c4 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorTypes.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Code.cs @@ -12,14 +12,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models { /// - /// Defines values for ContainerServiceOrchestratorTypes. + /// Defines values for Code. /// - public static class ContainerServiceOrchestratorTypes + public static class Code { - public const string Kubernetes = "Kubernetes"; - public const string Swarm = "Swarm"; - public const string DCOS = "DCOS"; - public const string DockerCE = "DockerCE"; - public const string Custom = "Custom"; + /// + /// The cluster is running. + /// + public const string Running = "Running"; + /// + /// The cluster is stopped. + /// + public const string Stopped = "Stopped"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceAgentPoolProfile.cs deleted file mode 100644 index 6374adafb497e..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceAgentPoolProfile.cs +++ /dev/null @@ -1,290 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Profile for the container service agent pool. - /// - public partial class ContainerServiceAgentPoolProfile - { - /// - /// Initializes a new instance of the ContainerServiceAgentPoolProfile - /// class. - /// - public ContainerServiceAgentPoolProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerServiceAgentPoolProfile - /// class. - /// - /// Unique name of the agent pool profile in the - /// context of the subscription and resource group. - /// Size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 1 to 100 - /// (inclusive). The default value is 1. - /// OS Disk Size in GB to be used to specify - /// the disk size for every machine in this master/agent pool. If you - /// specify 0, it will apply the default osDisk size according to the - /// vmSize specified. - /// DNS prefix to be used to create the FQDN - /// for the agent pool. - /// FQDN for the agent pool. - /// Ports number array used to expose on this agent - /// pool. The default opened ports are different based on your choice - /// of orchestrator. - /// Storage profile specifies what kind of - /// storage used. Choose from StorageAccount and ManagedDisks. Leave it - /// empty, we will choose for you based on the orchestrator choice. - /// Possible values include: 'StorageAccount', 'ManagedDisks' - /// VNet SubnetID specifies the VNet's - /// subnet identifier. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - public ContainerServiceAgentPoolProfile(string name, string vmSize, int? count = default(int?), int? osDiskSizeGB = default(int?), string dnsPrefix = default(string), string fqdn = default(string), IList ports = default(IList), string storageProfile = default(string), string vnetSubnetID = default(string), string osType = default(string)) - { - Name = name; - Count = count; - VmSize = vmSize; - OsDiskSizeGB = osDiskSizeGB; - DnsPrefix = dnsPrefix; - Fqdn = fqdn; - Ports = ports; - StorageProfile = storageProfile; - VnetSubnetID = vnetSubnetID; - OsType = osType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique name of the agent pool profile in the context - /// of the subscription and resource group. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 1 to 100 (inclusive). The - /// default value is 1. - /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - - /// - /// Gets or sets size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - /// - [JsonProperty(PropertyName = "vmSize")] - public string VmSize { get; set; } - - /// - /// Gets or sets OS Disk Size in GB to be used to specify the disk size - /// for every machine in this master/agent pool. If you specify 0, it - /// will apply the default osDisk size according to the vmSize - /// specified. - /// - [JsonProperty(PropertyName = "osDiskSizeGB")] - public int? OsDiskSizeGB { get; set; } - - /// - /// Gets or sets DNS prefix to be used to create the FQDN for the agent - /// pool. - /// - [JsonProperty(PropertyName = "dnsPrefix")] - public string DnsPrefix { get; set; } - - /// - /// Gets FQDN for the agent pool. - /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } - - /// - /// Gets or sets ports number array used to expose on this agent pool. - /// The default opened ports are different based on your choice of - /// orchestrator. - /// - [JsonProperty(PropertyName = "ports")] - public IList Ports { get; set; } - - /// - /// Gets or sets storage profile specifies what kind of storage used. - /// Choose from StorageAccount and ManagedDisks. Leave it empty, we - /// will choose for you based on the orchestrator choice. Possible - /// values include: 'StorageAccount', 'ManagedDisks' - /// - [JsonProperty(PropertyName = "storageProfile")] - public string StorageProfile { get; set; } - - /// - /// Gets or sets vNet SubnetID specifies the VNet's subnet identifier. - /// - [JsonProperty(PropertyName = "vnetSubnetID")] - public string VnetSubnetID { get; set; } - - /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (VmSize == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VmSize"); - } - if (Count > 100) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Count", 100); - } - if (Count < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 1); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs index 131dfa7b2eb0b..a8e8f73252b27 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs @@ -34,8 +34,8 @@ public ContainerServiceLinuxProfile() /// /// The administrator username to use for /// Linux VMs. - /// SSH configuration for Linux-based VMs running on - /// Azure. + /// The SSH configuration for Linux-based VMs running + /// on Azure. public ContainerServiceLinuxProfile(string adminUsername, ContainerServiceSshConfiguration ssh) { AdminUsername = adminUsername; @@ -55,7 +55,7 @@ public ContainerServiceLinuxProfile(string adminUsername, ContainerServiceSshCon public string AdminUsername { get; set; } /// - /// Gets or sets SSH configuration for Linux-based VMs running on + /// Gets or sets the SSH configuration for Linux-based VMs running on /// Azure. /// [JsonProperty(PropertyName = "ssh")] diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceModel.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceModel.cs deleted file mode 100644 index b3a03246ab979..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceModel.cs +++ /dev/null @@ -1,204 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container service. - /// - [Rest.Serialization.JsonTransformation] - public partial class ContainerServiceModel : Resource - { - /// - /// Initializes a new instance of the ContainerServiceModel class. - /// - public ContainerServiceModel() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerServiceModel class. - /// - /// Resource location - /// Profile for the container service - /// orchestrator. - /// Profile for the container service - /// master. - /// Profile for Linux VMs in the container - /// service cluster. - /// Resource Id - /// Resource name - /// Resource type - /// Resource tags - /// The current deployment or - /// provisioning state, which only appears in the response. - /// Properties to configure a custom - /// container service cluster. - /// Information about a service - /// principal identity for the cluster to use for manipulating Azure - /// APIs. Exact one of secret or keyVaultSecretRef need to be - /// specified. - /// Properties of the agent - /// pool. - /// Profile for Windows VMs in the - /// container service cluster. - /// Profile for diagnostics in the - /// container service cluster. - public ContainerServiceModel(string location, ContainerServiceOrchestratorProfile orchestratorProfile, ContainerServiceMasterProfile masterProfile, ContainerServiceLinuxProfile linuxProfile, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), ContainerServiceCustomProfile customProfile = default(ContainerServiceCustomProfile), ContainerServiceServicePrincipalProfile servicePrincipalProfile = default(ContainerServiceServicePrincipalProfile), IList agentPoolProfiles = default(IList), ContainerServiceWindowsProfile windowsProfile = default(ContainerServiceWindowsProfile), ContainerServiceDiagnosticsProfile diagnosticsProfile = default(ContainerServiceDiagnosticsProfile)) - : base(location, id, name, type, tags) - { - ProvisioningState = provisioningState; - OrchestratorProfile = orchestratorProfile; - CustomProfile = customProfile; - ServicePrincipalProfile = servicePrincipalProfile; - MasterProfile = masterProfile; - AgentPoolProfiles = agentPoolProfiles; - WindowsProfile = windowsProfile; - LinuxProfile = linuxProfile; - DiagnosticsProfile = diagnosticsProfile; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the current deployment or provisioning state, which only - /// appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets profile for the container service orchestrator. - /// - [JsonProperty(PropertyName = "properties.orchestratorProfile")] - public ContainerServiceOrchestratorProfile OrchestratorProfile { get; set; } - - /// - /// Gets or sets properties to configure a custom container service - /// cluster. - /// - [JsonProperty(PropertyName = "properties.customProfile")] - public ContainerServiceCustomProfile CustomProfile { get; set; } - - /// - /// Gets or sets information about a service principal identity for the - /// cluster to use for manipulating Azure APIs. Exact one of secret or - /// keyVaultSecretRef need to be specified. - /// - [JsonProperty(PropertyName = "properties.servicePrincipalProfile")] - public ContainerServiceServicePrincipalProfile ServicePrincipalProfile { get; set; } - - /// - /// Gets or sets profile for the container service master. - /// - [JsonProperty(PropertyName = "properties.masterProfile")] - public ContainerServiceMasterProfile MasterProfile { get; set; } - - /// - /// Gets or sets properties of the agent pool. - /// - [JsonProperty(PropertyName = "properties.agentPoolProfiles")] - public IList AgentPoolProfiles { get; set; } - - /// - /// Gets or sets profile for Windows VMs in the container service - /// cluster. - /// - [JsonProperty(PropertyName = "properties.windowsProfile")] - public ContainerServiceWindowsProfile WindowsProfile { get; set; } - - /// - /// Gets or sets profile for Linux VMs in the container service - /// cluster. - /// - [JsonProperty(PropertyName = "properties.linuxProfile")] - public ContainerServiceLinuxProfile LinuxProfile { get; set; } - - /// - /// Gets or sets profile for diagnostics in the container service - /// cluster. - /// - [JsonProperty(PropertyName = "properties.diagnosticsProfile")] - public ContainerServiceDiagnosticsProfile DiagnosticsProfile { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (OrchestratorProfile == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorProfile"); - } - if (MasterProfile == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "MasterProfile"); - } - if (LinuxProfile == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "LinuxProfile"); - } - if (OrchestratorProfile != null) - { - OrchestratorProfile.Validate(); - } - if (CustomProfile != null) - { - CustomProfile.Validate(); - } - if (ServicePrincipalProfile != null) - { - ServicePrincipalProfile.Validate(); - } - if (MasterProfile != null) - { - MasterProfile.Validate(); - } - if (AgentPoolProfiles != null) - { - foreach (var element in AgentPoolProfiles) - { - if (element != null) - { - element.Validate(); - } - } - } - if (WindowsProfile != null) - { - WindowsProfile.Validate(); - } - if (LinuxProfile != null) - { - LinuxProfile.Validate(); - } - if (DiagnosticsProfile != null) - { - DiagnosticsProfile.Validate(); - } - } - } -} 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 bb8dc8ebc5e63..d15f24633a1bc 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 @@ -32,14 +32,14 @@ public ContainerServiceNetworkProfile() /// Initializes a new instance of the ContainerServiceNetworkProfile /// class. /// - /// Network plugin used for building + /// Network plugin used for building the /// Kubernetes network. Possible values include: 'azure', /// 'kubenet' - /// Network policy used for building + /// Network policy used for building the /// Kubernetes network. Possible values include: 'calico', /// 'azure' - /// Network mode used for building Kubernetes - /// network. Possible values include: 'transparent', 'bridge' + /// The network mode Azure CNI is configured + /// with. /// A CIDR notation IP range from which to assign /// pod IPs when kubenet is used. /// A CIDR notation IP range from which to @@ -51,11 +51,10 @@ public ContainerServiceNetworkProfile() /// A CIDR notation IP range assigned to /// the Docker bridge network. It must not overlap with any Subnet IP /// ranges or the Kubernetes service address range. - /// The outbound (egress) routing method. - /// Possible values include: 'loadBalancer', - /// 'userDefinedRouting' + /// The outbound (egress) routing + /// method. /// The load balancer sku for the managed - /// cluster. Possible values include: 'standard', 'basic' + /// cluster. /// Profile of the cluster load /// balancer. 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)) @@ -79,23 +78,26 @@ public ContainerServiceNetworkProfile() partial void CustomInit(); /// - /// Gets or sets network plugin used for building Kubernetes network. - /// Possible values include: 'azure', 'kubenet' + /// Gets or sets network plugin used for building the Kubernetes + /// network. Possible values include: 'azure', 'kubenet' /// [JsonProperty(PropertyName = "networkPlugin")] public string NetworkPlugin { get; set; } /// - /// Gets or sets network policy used for building Kubernetes network. - /// Possible values include: 'calico', 'azure' + /// Gets or sets network policy used for building the Kubernetes + /// network. Possible values include: 'calico', 'azure' /// [JsonProperty(PropertyName = "networkPolicy")] public string NetworkPolicy { get; set; } /// - /// Gets or sets network mode used for building Kubernetes network. - /// Possible values include: 'transparent', 'bridge' + /// Gets or sets the network mode Azure CNI is configured with. /// + /// + /// This cannot be specified if networkPlugin is anything other than + /// 'azure'. Possible values include: 'transparent', 'bridge' + /// [JsonProperty(PropertyName = "networkMode")] public string NetworkMode { get; set; } @@ -130,16 +132,26 @@ public ContainerServiceNetworkProfile() public string DockerBridgeCidr { get; set; } /// - /// Gets or sets the outbound (egress) routing method. Possible values - /// include: 'loadBalancer', 'userDefinedRouting' + /// Gets or sets the outbound (egress) routing method. /// + /// + /// This can only be set at cluster creation time and cannot be changed + /// later. For more information see [egress outbound + /// type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + /// Possible values include: 'loadBalancer', 'userDefinedRouting' + /// [JsonProperty(PropertyName = "outboundType")] public string OutboundType { get; set; } /// /// Gets or sets the load balancer sku for the managed cluster. - /// Possible values include: 'standard', 'basic' /// + /// + /// The default is 'standard'. See [Azure Load Balancer + /// SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more + /// information about the differences between load balancer SKUs. + /// Possible values include: 'standard', 'basic' + /// [JsonProperty(PropertyName = "loadBalancerSku")] public string LoadBalancerSku { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorProfile.cs deleted file mode 100644 index 92e081c319aad..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceOrchestratorProfile.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Profile for the container service orchestrator. - /// - public partial class ContainerServiceOrchestratorProfile - { - /// - /// Initializes a new instance of the - /// ContainerServiceOrchestratorProfile class. - /// - public ContainerServiceOrchestratorProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ContainerServiceOrchestratorProfile class. - /// - /// The orchestrator to use to manage - /// container service cluster resources. Valid values are Kubernetes, - /// Swarm, DCOS, DockerCE and Custom. Possible values include: - /// 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' - /// The version of the orchestrator - /// to use. You can specify the major.minor.patch part of the actual - /// version.For example, you can specify version as "1.6.11". - public ContainerServiceOrchestratorProfile(string orchestratorType, string orchestratorVersion = default(string)) - { - OrchestratorType = orchestratorType; - OrchestratorVersion = orchestratorVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the orchestrator to use to manage container service - /// cluster resources. Valid values are Kubernetes, Swarm, DCOS, - /// DockerCE and Custom. Possible values include: 'Kubernetes', - /// 'Swarm', 'DCOS', 'DockerCE', 'Custom' - /// - [JsonProperty(PropertyName = "orchestratorType")] - public string OrchestratorType { get; set; } - - /// - /// Gets or sets the version of the orchestrator to use. You can - /// specify the major.minor.patch part of the actual version.For - /// example, you can specify version as "1.6.11". - /// - [JsonProperty(PropertyName = "orchestratorVersion")] - public string OrchestratorVersion { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (OrchestratorType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorType"); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceServicePrincipalProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceServicePrincipalProfile.cs deleted file mode 100644 index 51aca5b4915c7..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceServicePrincipalProfile.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information about a service principal identity for the cluster to use - /// for manipulating Azure APIs. Either secret or keyVaultSecretRef must be - /// specified. - /// - public partial class ContainerServiceServicePrincipalProfile - { - /// - /// Initializes a new instance of the - /// ContainerServiceServicePrincipalProfile class. - /// - public ContainerServiceServicePrincipalProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ContainerServiceServicePrincipalProfile class. - /// - /// The ID for the service principal. - /// The secret password associated with the - /// service principal in plain text. - /// Reference to a secret stored in - /// Azure Key Vault. - public ContainerServiceServicePrincipalProfile(string clientId, string secret = default(string), KeyVaultSecretRef keyVaultSecretRef = default(KeyVaultSecretRef)) - { - ClientId = clientId; - Secret = secret; - KeyVaultSecretRef = keyVaultSecretRef; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the ID for the service principal. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the secret password associated with the service - /// principal in plain text. - /// - [JsonProperty(PropertyName = "secret")] - public string Secret { get; set; } - - /// - /// Gets or sets reference to a secret stored in Azure Key Vault. - /// - [JsonProperty(PropertyName = "keyVaultSecretRef")] - public KeyVaultSecretRef KeyVaultSecretRef { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ClientId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); - } - if (KeyVaultSecretRef != null) - { - KeyVaultSecretRef.Validate(); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.cs index 82f79dc60f9a8..ef57103574d25 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.cs @@ -35,7 +35,7 @@ public ContainerServiceSshConfiguration() /// class. /// /// The list of SSH public keys used to - /// authenticate with Linux-based VMs. Only expect one key + /// authenticate with Linux-based VMs. A maximum of 1 key may be /// specified. public ContainerServiceSshConfiguration(IList publicKeys) { @@ -50,7 +50,7 @@ public ContainerServiceSshConfiguration(IList publ /// /// Gets or sets the list of SSH public keys used to authenticate with - /// Linux-based VMs. Only expect one key specified. + /// Linux-based VMs. A maximum of 1 key may be specified. /// [JsonProperty(PropertyName = "publicKeys")] public IList PublicKeys { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs deleted file mode 100644 index 6ac80c9f17ad2..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Profile for Windows VMs in the container service cluster. - /// - public partial class ContainerServiceWindowsProfile - { - /// - /// Initializes a new instance of the ContainerServiceWindowsProfile - /// class. - /// - public ContainerServiceWindowsProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerServiceWindowsProfile - /// class. - /// - /// The administrator username to use for - /// Windows VMs. - /// The administrator password to use for - /// Windows VMs. - public ContainerServiceWindowsProfile(string adminUsername, string adminPassword) - { - AdminUsername = adminUsername; - AdminPassword = adminPassword; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the administrator username to use for Windows VMs. - /// - [JsonProperty(PropertyName = "adminUsername")] - public string AdminUsername { get; set; } - - /// - /// Gets or sets the administrator password to use for Windows VMs. - /// - [JsonProperty(PropertyName = "adminPassword")] - public string AdminPassword { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AdminUsername == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername"); - } - if (AdminPassword == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AdminPassword"); - } - if (AdminUsername != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$")) - { - throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$"); - } - } - if (AdminPassword != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(AdminPassword, "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$")) - { - throw new ValidationException(ValidationRules.Pattern, "AdminPassword", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$"); - } - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreatedByType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreatedByType.cs new file mode 100644 index 0000000000000..640ae38ab17ea --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,24 @@ +// +// 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 CreatedByType. + /// + public static class CreatedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CredentialResults.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CredentialResults.cs index 3a6dda5ff5a6d..509c9e2961683 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CredentialResults.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CredentialResults.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// The list of credential result response. + /// The list credential result response. /// public partial class CredentialResults { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDependency.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDependency.cs new file mode 100644 index 0000000000000..9671184faefdd --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDependency.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A domain name that AKS agent nodes are reaching at. + /// + public partial class EndpointDependency + { + /// + /// Initializes a new instance of the EndpointDependency class. + /// + public EndpointDependency() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EndpointDependency class. + /// + /// The domain name of the dependency. + /// The Ports and Protocols used when + /// connecting to domainName. + public EndpointDependency(string domainName = default(string), IList endpointDetails = default(IList)) + { + DomainName = domainName; + EndpointDetails = endpointDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the domain name of the dependency. + /// + [JsonProperty(PropertyName = "domainName")] + public string DomainName { get; set; } + + /// + /// Gets or sets the Ports and Protocols used when connecting to + /// domainName. + /// + [JsonProperty(PropertyName = "endpointDetails")] + public IList EndpointDetails { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDetail.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDetail.cs new file mode 100644 index 0000000000000..0af07b5d2feb9 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/EndpointDetail.cs @@ -0,0 +1,76 @@ +// +// 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; + + /// + /// connect information from the AKS agent nodes to a single endpoint. + /// + public partial class EndpointDetail + { + /// + /// Initializes a new instance of the EndpointDetail class. + /// + public EndpointDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EndpointDetail class. + /// + /// An IP Address that Domain Name currently + /// resolves to. + /// The port an endpoint is connected to. + /// The protocol used for connection + /// Description of the detail + public EndpointDetail(string ipAddress = default(string), int? port = default(int?), string protocol = default(string), string description = default(string)) + { + IpAddress = ipAddress; + Port = port; + Protocol = protocol; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an IP Address that Domain Name currently resolves to. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the port an endpoint is connected to. + /// + [JsonProperty(PropertyName = "port")] + public int? Port { get; set; } + + /// + /// Gets or sets the protocol used for connection + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or sets description of the detail + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs new file mode 100644 index 0000000000000..c18a808e183f2 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Expander.cs @@ -0,0 +1,47 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for Expander. + /// + public static class Expander + { + /// + /// Selects the node group that will have the least idle CPU (if tied, + /// unused memory) after scale-up. This is useful when you have + /// different classes of nodes, for example, high CPU or high memory + /// nodes, and only want to expand those when there are pending pods + /// that need a lot of those resources. + /// + public const string LeastWaste = "least-waste"; + /// + /// Selects the node group that would be able to schedule the most pods + /// when scaling up. This is useful when you are using nodeSelector to + /// make sure certain pods land on certain nodes. Note that this won't + /// cause the autoscaler to select bigger nodes vs. smaller, as it can + /// add multiple smaller nodes at once. + /// + public const string MostPods = "most-pods"; + /// + /// Selects the node group that has the highest priority assigned by + /// the user. It's configuration is described in more details + /// [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). + /// + public const string Priority = "priority"; + /// + /// Used when you don't have a particular need for the node groups to + /// scale differently. + /// + public const string Random = "random"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterIdentityProvider.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocation.cs similarity index 51% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterIdentityProvider.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocation.cs index de17e44dd57ca..e07ba84fad18a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterIdentityProvider.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocation.cs @@ -14,30 +14,28 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Defines the configuration of the identity providers to be used in the - /// OpenShift cluster. + /// The complex type of the extended location. /// - public partial class OpenShiftManagedClusterIdentityProvider + public partial class ExtendedLocation { /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterIdentityProvider class. + /// Initializes a new instance of the ExtendedLocation class. /// - public OpenShiftManagedClusterIdentityProvider() + public ExtendedLocation() { CustomInit(); } /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterIdentityProvider class. + /// Initializes a new instance of the ExtendedLocation class. /// - /// Name of the provider. - /// Configuration of the provider. - public OpenShiftManagedClusterIdentityProvider(string name = default(string), OpenShiftManagedClusterBaseIdentityProvider provider = default(OpenShiftManagedClusterBaseIdentityProvider)) + /// The name of the extended location. + /// The type of the extended location. Possible + /// values include: 'EdgeZone' + public ExtendedLocation(string name = default(string), string type = default(string)) { Name = name; - Provider = provider; + Type = type; CustomInit(); } @@ -47,16 +45,17 @@ public OpenShiftManagedClusterIdentityProvider() partial void CustomInit(); /// - /// Gets or sets name of the provider. + /// Gets or sets the name of the extended location. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// - /// Gets or sets configuration of the provider. + /// Gets or sets the type of the extended location. Possible values + /// include: 'EdgeZone' /// - [JsonProperty(PropertyName = "provider")] - public OpenShiftManagedClusterBaseIdentityProvider Provider { get; set; } + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftAgentPoolProfileRole.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocationTypes.cs similarity index 69% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftAgentPoolProfileRole.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocationTypes.cs index 574ca4f71add4..e46ac4f66b97b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftAgentPoolProfileRole.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ExtendedLocationTypes.cs @@ -12,11 +12,10 @@ namespace Microsoft.Azure.Management.ContainerService.Models { /// - /// Defines values for OpenShiftAgentPoolProfileRole. + /// Defines values for ExtendedLocationTypes. /// - public static class OpenShiftAgentPoolProfileRole + public static class ExtendedLocationTypes { - public const string Compute = "compute"; - public const string Infra = "infra"; + public const string EdgeZone = "EdgeZone"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/GPUInstanceProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/GPUInstanceProfile.cs new file mode 100644 index 0000000000000..1b9f50bdc5f08 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/GPUInstanceProfile.cs @@ -0,0 +1,25 @@ +// +// 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 GPUInstanceProfile. + /// + public static class GPUInstanceProfile + { + public const string MIG1g = "MIG1g"; + public const string MIG2g = "MIG2g"; + public const string MIG3g = "MIG3g"; + public const string MIG4g = "MIG4g"; + public const string MIG7g = "MIG7g"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletConfig.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletConfig.cs new file mode 100644 index 0000000000000..931d23d5bccae --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletConfig.cs @@ -0,0 +1,198 @@ +// +// 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 Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Kubelet configurations of agent nodes. + /// + /// + /// See [AKS custom node + /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. + /// + public partial class KubeletConfig + { + /// + /// Initializes a new instance of the KubeletConfig class. + /// + public KubeletConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeletConfig class. + /// + /// The CPU Manager policy to + /// use. + /// If CPU CFS quota enforcement is enabled + /// for containers that specify CPU limits. + /// The CPU CFS quota period + /// value. + /// The percent of disk usage after + /// which image garbage collection is always run. + /// The percent of disk usage before + /// which image garbage collection is never run. + /// The Topology Manager policy to + /// use. + /// Allowed list of unsafe sysctls + /// or unsafe sysctl patterns (ending in `*`). + /// If set to true it will make the Kubelet + /// fail to start if swap is enabled on the node. + /// The maximum size (e.g. 10Mi) of + /// container log file before it is rotated. + /// The maximum number of container + /// log files that can be present for a container. The number must be ≥ + /// 2. + /// The maximum number of processes per + /// pod. + public KubeletConfig(string cpuManagerPolicy = default(string), bool? cpuCfsQuota = default(bool?), string cpuCfsQuotaPeriod = default(string), int? imageGcHighThreshold = default(int?), int? imageGcLowThreshold = default(int?), string topologyManagerPolicy = default(string), IList allowedUnsafeSysctls = default(IList), bool? failSwapOn = default(bool?), int? containerLogMaxSizeMB = default(int?), int? containerLogMaxFiles = default(int?), int? podMaxPids = default(int?)) + { + CpuManagerPolicy = cpuManagerPolicy; + CpuCfsQuota = cpuCfsQuota; + CpuCfsQuotaPeriod = cpuCfsQuotaPeriod; + ImageGcHighThreshold = imageGcHighThreshold; + ImageGcLowThreshold = imageGcLowThreshold; + TopologyManagerPolicy = topologyManagerPolicy; + AllowedUnsafeSysctls = allowedUnsafeSysctls; + FailSwapOn = failSwapOn; + ContainerLogMaxSizeMB = containerLogMaxSizeMB; + ContainerLogMaxFiles = containerLogMaxFiles; + PodMaxPids = podMaxPids; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the CPU Manager policy to use. + /// + /// + /// The default is 'none'. See [Kubernetes CPU management + /// policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// for more information. Allowed values are 'none' and 'static'. + /// + [JsonProperty(PropertyName = "cpuManagerPolicy")] + public string CpuManagerPolicy { get; set; } + + /// + /// Gets or sets if CPU CFS quota enforcement is enabled for containers + /// that specify CPU limits. + /// + /// + /// The default is true. + /// + [JsonProperty(PropertyName = "cpuCfsQuota")] + public bool? CpuCfsQuota { get; set; } + + /// + /// Gets or sets the CPU CFS quota period value. + /// + /// + /// The default is '100ms.' Valid values are a sequence of decimal + /// numbers with an optional fraction and a unit suffix. For example: + /// '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', + /// and 'h'. + /// + [JsonProperty(PropertyName = "cpuCfsQuotaPeriod")] + public string CpuCfsQuotaPeriod { get; set; } + + /// + /// Gets or sets the percent of disk usage after which image garbage + /// collection is always run. + /// + /// + /// To disable image garbage collection, set to 100. The default is 85% + /// + [JsonProperty(PropertyName = "imageGcHighThreshold")] + public int? ImageGcHighThreshold { get; set; } + + /// + /// Gets or sets the percent of disk usage before which image garbage + /// collection is never run. + /// + /// + /// This cannot be set higher than imageGcHighThreshold. The default is + /// 80% + /// + [JsonProperty(PropertyName = "imageGcLowThreshold")] + public int? ImageGcLowThreshold { get; set; } + + /// + /// Gets or sets the Topology Manager policy to use. + /// + /// + /// For more information see [Kubernetes Topology + /// Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The default is 'none'. Allowed values are 'none', 'best-effort', + /// 'restricted', and 'single-numa-node'. + /// + [JsonProperty(PropertyName = "topologyManagerPolicy")] + public string TopologyManagerPolicy { get; set; } + + /// + /// Gets or sets allowed list of unsafe sysctls or unsafe sysctl + /// patterns (ending in `*`). + /// + [JsonProperty(PropertyName = "allowedUnsafeSysctls")] + public IList AllowedUnsafeSysctls { get; set; } + + /// + /// Gets or sets if set to true it will make the Kubelet fail to start + /// if swap is enabled on the node. + /// + [JsonProperty(PropertyName = "failSwapOn")] + public bool? FailSwapOn { get; set; } + + /// + /// Gets or sets the maximum size (e.g. 10Mi) of container log file + /// before it is rotated. + /// + [JsonProperty(PropertyName = "containerLogMaxSizeMB")] + public int? ContainerLogMaxSizeMB { get; set; } + + /// + /// Gets or sets the maximum number of container log files that can be + /// present for a container. The number must be ≥ 2. + /// + [JsonProperty(PropertyName = "containerLogMaxFiles")] + public int? ContainerLogMaxFiles { get; set; } + + /// + /// Gets or sets the maximum number of processes per pod. + /// + [JsonProperty(PropertyName = "podMaxPids")] + public int? PodMaxPids { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ContainerLogMaxFiles < 2) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ContainerLogMaxFiles", 2); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterBaseIdentityProvider.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletDiskType.cs similarity index 53% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterBaseIdentityProvider.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletDiskType.cs index b552dc1ca60cf..a7694b2b7d59a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterBaseIdentityProvider.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KubeletDiskType.cs @@ -10,27 +10,19 @@ namespace Microsoft.Azure.Management.ContainerService.Models { - using System.Linq; /// - /// Structure for any Identity provider. + /// Defines values for KubeletDiskType. /// - public partial class OpenShiftManagedClusterBaseIdentityProvider + public static class KubeletDiskType { /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterBaseIdentityProvider class. + /// Kubelet will use the OS disk for its data. /// - public OpenShiftManagedClusterBaseIdentityProvider() - { - CustomInit(); - } - - + public const string OS = "OS"; /// - /// An initialization method that performs custom operations like setting defaults + /// Kubelet will use the temporary disk for its data. /// - partial void CustomInit(); - + public const string Temporary = "Temporary"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LicenseType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LicenseType.cs index 19365b9e5ed5e..ec97c30d364dc 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LicenseType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LicenseType.cs @@ -16,7 +16,13 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class LicenseType { + /// + /// No additional licensing is applied. + /// public const string None = "None"; + /// + /// Enables Azure Hybrid User Benefits for Windows VMs. + /// public const string WindowsServer = "Windows_Server"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LinuxOSConfig.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LinuxOSConfig.cs new file mode 100644 index 0000000000000..ddc19bb9e9b5c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LinuxOSConfig.cs @@ -0,0 +1,98 @@ +// +// 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; + + /// + /// OS configurations of Linux agent nodes. + /// + /// + /// See [AKS custom node + /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. + /// + public partial class LinuxOSConfig + { + /// + /// Initializes a new instance of the LinuxOSConfig class. + /// + public LinuxOSConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinuxOSConfig class. + /// + /// Sysctl settings for Linux agent + /// nodes. + /// Whether transparent + /// hugepages are enabled. + /// Whether the kernel should + /// make aggressive use of memory compaction to make more hugepages + /// available. + /// The size in MB of a swap file that + /// will be created on each node. + public LinuxOSConfig(SysctlConfig sysctls = default(SysctlConfig), string transparentHugePageEnabled = default(string), string transparentHugePageDefrag = default(string), int? swapFileSizeMB = default(int?)) + { + Sysctls = sysctls; + TransparentHugePageEnabled = transparentHugePageEnabled; + TransparentHugePageDefrag = transparentHugePageDefrag; + SwapFileSizeMB = swapFileSizeMB; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets sysctl settings for Linux agent nodes. + /// + [JsonProperty(PropertyName = "sysctls")] + public SysctlConfig Sysctls { get; set; } + + /// + /// Gets or sets whether transparent hugepages are enabled. + /// + /// + /// Valid values are 'always', 'madvise', and 'never'. The default is + /// 'always'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// + [JsonProperty(PropertyName = "transparentHugePageEnabled")] + public string TransparentHugePageEnabled { get; set; } + + /// + /// Gets or sets whether the kernel should make aggressive use of + /// memory compaction to make more hugepages available. + /// + /// + /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and + /// 'never'. The default is 'madvise'. For more information see + /// [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// + [JsonProperty(PropertyName = "transparentHugePageDefrag")] + public string TransparentHugePageDefrag { get; set; } + + /// + /// Gets or sets the size in MB of a swap file that will be created on + /// each node. + /// + [JsonProperty(PropertyName = "swapFileSizeMB")] + public int? SwapFileSizeMB { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LoadBalancerSku.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LoadBalancerSku.cs index 4a6d775a9418c..704f3f6235942 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LoadBalancerSku.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/LoadBalancerSku.cs @@ -16,7 +16,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class LoadBalancerSku { + /// + /// Use a a standard Load Balancer. This is the recommended Load + /// Balancer SKU. For more information about on working with the load + /// balancer in the managed cluster, see the [standard Load + /// Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) + /// article. + /// public const string Standard = "standard"; + /// + /// Use a basic Load Balancer with limited functionality. + /// public const string Basic = "basic"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/MaintenanceConfiguration.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/MaintenanceConfiguration.cs new file mode 100644 index 0000000000000..a87ab504084a2 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/MaintenanceConfiguration.cs @@ -0,0 +1,92 @@ +// +// 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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Planned maintenance configuration, used to configure when updates can + /// be deployed to a Managed Cluster. + /// + /// + /// See [planned + /// maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) + /// for more information about planned maintenance. + /// + [Rest.Serialization.JsonTransformation] + public partial class MaintenanceConfiguration : SubResource + { + /// + /// Initializes a new instance of the MaintenanceConfiguration class. + /// + public MaintenanceConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceConfiguration class. + /// + /// Resource ID. + /// The name of the resource that is unique within a + /// resource group. This name can be used to access the + /// resource. + /// Resource type + /// The system metadata relating to this + /// resource. + /// Time slots during the week when planned + /// maintenance is allowed to proceed. + /// Time slots on which upgrade is not + /// allowed. + public MaintenanceConfiguration(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IList timeInWeek = default(IList), IList notAllowedTime = default(IList)) + : base(id, name, type) + { + SystemData = systemData; + TimeInWeek = timeInWeek; + NotAllowedTime = notAllowedTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the system metadata relating to this resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + + /// + /// Gets or sets time slots during the week when planned maintenance is + /// allowed to proceed. + /// + /// + /// If two array entries specify the same day of the week, the applied + /// configuration is the union of times in both entries. + /// + [JsonProperty(PropertyName = "properties.timeInWeek")] + public IList TimeInWeek { get; set; } + + /// + /// Gets or sets time slots on which upgrade is not allowed. + /// + [JsonProperty(PropertyName = "properties.notAllowedTime")] + public IList NotAllowedTime { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs index 09c0a914bfa84..17ae58b44a5cc 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 @@ -39,28 +39,35 @@ public ManagedCluster() /// Resource name /// Resource type /// Resource tags - /// The current deployment or - /// provisioning state, which only appears in the response. + /// The current provisioning + /// state. + /// The Power State of the cluster. /// The max number of agent pools for the /// managed cluster. - /// Version of Kubernetes specified - /// when creating the managed cluster. - /// DNS prefix specified when creating the - /// managed cluster. - /// FQDN for the master pool. - /// FQDN of private cluster. - /// Properties of the agent - /// pool. - /// Profile for Linux VMs in the container - /// service cluster. - /// Profile for Windows VMs in the - /// container service cluster. + /// The version of Kubernetes the + /// Managed Cluster is running. + /// The DNS prefix of the Managed + /// Cluster. + /// The FQDN subdomain of the private + /// cluster with custom private dns zone. + /// The FQDN of the master pool. + /// The FQDN of private cluster. + /// The special FQDN used by the Azure + /// Portal to access the Managed Cluster. This FQDN is for use only by + /// the Azure Portal and should not be used by other clients. + /// The agent pool properties. + /// The profile for Linux VMs in the Managed + /// Cluster. + /// The profile for Windows VMs in the + /// Managed Cluster. /// Information about a service /// principal identity for the cluster to use for manipulating Azure /// APIs. - /// Profile of managed cluster + /// The profile of managed cluster /// add-on. - /// Name of the resource group + /// The pod identity profile of the + /// Managed Cluster. + /// The name of the resource group /// containing agent pool nodes. /// Whether to enable Kubernetes Role-Based /// Access Control. @@ -68,46 +75,65 @@ 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. - /// Profile of network + /// The network configuration + /// profile. + /// The Azure Active Directory /// configuration. - /// Profile of Azure Active Directory + /// The auto upgrade /// configuration. /// Parameters to be applied to the /// cluster-autoscaler when enabled - /// Access profile for managed + /// The access profile for managed /// cluster API server. - /// ResourceId of the disk encryption - /// set to use for enabling encryption at rest. + /// The Resource ID of the disk + /// encryption set to use for enabling encryption at rest. /// Identities associated with the /// cluster. + /// Private link resources + /// associated with the cluster. + /// If local accounts should be + /// disabled on the Managed Cluster. + /// Configurations for provisioning the + /// cluster with HTTP proxy servers. /// The identity of the managed cluster, if /// configured. /// The managed cluster SKU. - public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), string privateFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), ManagedClusterIdentity identity = default(ManagedClusterIdentity), ManagedClusterSKU sku = default(ManagedClusterSKU)) + /// The extended location of the Virtual + /// Machine. + public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string 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), ManagedClusterIdentity identity = default(ManagedClusterIdentity), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, type, tags) { ProvisioningState = provisioningState; + PowerState = powerState; MaxAgentPools = maxAgentPools; KubernetesVersion = kubernetesVersion; DnsPrefix = dnsPrefix; + FqdnSubdomain = fqdnSubdomain; Fqdn = fqdn; PrivateFQDN = privateFQDN; + AzurePortalFQDN = azurePortalFQDN; AgentPoolProfiles = agentPoolProfiles; LinuxProfile = linuxProfile; WindowsProfile = windowsProfile; ServicePrincipalProfile = servicePrincipalProfile; AddonProfiles = addonProfiles; + PodIdentityProfile = podIdentityProfile; NodeResourceGroup = nodeResourceGroup; EnableRBAC = enableRBAC; EnablePodSecurityPolicy = enablePodSecurityPolicy; NetworkProfile = networkProfile; AadProfile = aadProfile; + AutoUpgradeProfile = autoUpgradeProfile; AutoScalerProfile = autoScalerProfile; ApiServerAccessProfile = apiServerAccessProfile; DiskEncryptionSetID = diskEncryptionSetID; IdentityProfile = identityProfile; + PrivateLinkResources = privateLinkResources; + DisableLocalAccounts = disableLocalAccounts; + HttpProxyConfig = httpProxyConfig; Identity = identity; Sku = sku; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -117,12 +143,17 @@ public ManagedCluster() partial void CustomInit(); /// - /// Gets the current deployment or provisioning state, which only - /// appears in the response. + /// Gets the current provisioning state. /// [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// Gets the Power State of the cluster. + /// + [JsonProperty(PropertyName = "properties.powerState")] + public PowerState PowerState { get; private set; } + /// /// Gets the max number of agent pools for the managed cluster. /// @@ -130,47 +161,80 @@ public ManagedCluster() public int? MaxAgentPools { get; private set; } /// - /// Gets or sets version of Kubernetes specified when creating the - /// managed cluster. + /// Gets or sets the version of Kubernetes the Managed Cluster is + /// running. /// + /// + /// When you upgrade a supported AKS cluster, Kubernetes minor versions + /// cannot be skipped. All upgrades must be performed sequentially by + /// major version number. For example, upgrades between 1.14.x -> + /// 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + /// not allowed. See [upgrading an AKS + /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for + /// more details. + /// [JsonProperty(PropertyName = "properties.kubernetesVersion")] public string KubernetesVersion { get; set; } /// - /// Gets or sets DNS prefix specified when creating the managed - /// cluster. + /// Gets or sets the DNS prefix of the Managed Cluster. /// + /// + /// This cannot be updated once the Managed Cluster has been created. + /// [JsonProperty(PropertyName = "properties.dnsPrefix")] public string DnsPrefix { get; set; } /// - /// Gets FQDN for the master pool. + /// Gets or sets the FQDN subdomain of the private cluster with custom + /// private dns zone. + /// + /// + /// This cannot be updated once the Managed Cluster has been created. + /// + [JsonProperty(PropertyName = "properties.fqdnSubdomain")] + public string FqdnSubdomain { get; set; } + + /// + /// Gets the FQDN of the master pool. /// [JsonProperty(PropertyName = "properties.fqdn")] public string Fqdn { get; private set; } /// - /// Gets FQDN of private cluster. + /// Gets the FQDN of private cluster. /// [JsonProperty(PropertyName = "properties.privateFQDN")] public string PrivateFQDN { get; private set; } /// - /// Gets or sets properties of the agent pool. + /// Gets the special FQDN used by the Azure Portal to access the + /// Managed Cluster. This FQDN is for use only by the Azure Portal and + /// should not be used by other clients. + /// + /// + /// The Azure Portal requires certain Cross-Origin Resource Sharing + /// (CORS) headers to be sent in some responses, which Kubernetes + /// APIServer doesn't handle by default. This special FQDN supports + /// CORS, allowing the Azure Portal to function properly. + /// + [JsonProperty(PropertyName = "properties.azurePortalFQDN")] + public string AzurePortalFQDN { get; private set; } + + /// + /// Gets or sets the agent pool properties. /// [JsonProperty(PropertyName = "properties.agentPoolProfiles")] public IList AgentPoolProfiles { get; set; } /// - /// Gets or sets profile for Linux VMs in the container service - /// cluster. + /// Gets or sets the profile for Linux VMs in the Managed Cluster. /// [JsonProperty(PropertyName = "properties.linuxProfile")] public ContainerServiceLinuxProfile LinuxProfile { get; set; } /// - /// Gets or sets profile for Windows VMs in the container service - /// cluster. + /// Gets or sets the profile for Windows VMs in the Managed Cluster. /// [JsonProperty(PropertyName = "properties.windowsProfile")] public ManagedClusterWindowsProfile WindowsProfile { get; set; } @@ -183,13 +247,24 @@ public ManagedCluster() public ManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } /// - /// Gets or sets profile of managed cluster add-on. + /// Gets or sets the profile of managed cluster add-on. /// [JsonProperty(PropertyName = "properties.addonProfiles")] public IDictionary AddonProfiles { get; set; } /// - /// Gets or sets name of the resource group containing agent pool + /// Gets or sets the pod identity profile of the Managed Cluster. + /// + /// + /// See [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. + /// + [JsonProperty(PropertyName = "properties.podIdentityProfile")] + public ManagedClusterPodIdentityProfile PodIdentityProfile { get; set; } + + /// + /// Gets or sets the name of the resource group containing agent pool /// nodes. /// [JsonProperty(PropertyName = "properties.nodeResourceGroup")] @@ -211,17 +286,23 @@ public ManagedCluster() public bool? EnablePodSecurityPolicy { get; set; } /// - /// Gets or sets profile of network configuration. + /// Gets or sets the network configuration profile. /// [JsonProperty(PropertyName = "properties.networkProfile")] public ContainerServiceNetworkProfile NetworkProfile { get; set; } /// - /// Gets or sets profile of Azure Active Directory configuration. + /// Gets or sets the Azure Active Directory configuration. /// [JsonProperty(PropertyName = "properties.aadProfile")] public ManagedClusterAADProfile AadProfile { get; set; } + /// + /// Gets or sets the auto upgrade configuration. + /// + [JsonProperty(PropertyName = "properties.autoUpgradeProfile")] + public ManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get; set; } + /// /// Gets or sets parameters to be applied to the cluster-autoscaler /// when enabled @@ -230,15 +311,19 @@ public ManagedCluster() public ManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } /// - /// Gets or sets access profile for managed cluster API server. + /// Gets or sets the access profile for managed cluster API server. /// [JsonProperty(PropertyName = "properties.apiServerAccessProfile")] public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile { get; set; } /// - /// Gets or sets resourceId of the disk encryption set to use for + /// Gets or sets the Resource ID of the disk encryption set to use for /// enabling encryption at rest. /// + /// + /// This is of the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// [JsonProperty(PropertyName = "properties.diskEncryptionSetID")] public string DiskEncryptionSetID { get; set; } @@ -248,6 +333,32 @@ public ManagedCluster() [JsonProperty(PropertyName = "properties.identityProfile")] public IDictionary IdentityProfile { get; set; } + /// + /// Gets or sets private link resources associated with the cluster. + /// + [JsonProperty(PropertyName = "properties.privateLinkResources")] + public IList PrivateLinkResources { get; set; } + + /// + /// Gets or sets if local accounts should be disabled on the Managed + /// Cluster. + /// + /// + /// If set to true, getting static credentials will be disabled for + /// this cluster. This must only be used on Managed Clusters that are + /// AAD enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// + [JsonProperty(PropertyName = "properties.disableLocalAccounts")] + public bool? DisableLocalAccounts { get; set; } + + /// + /// Gets or sets configurations for provisioning the cluster with HTTP + /// proxy servers. + /// + [JsonProperty(PropertyName = "properties.httpProxyConfig")] + public ManagedClusterHTTPProxyConfig HttpProxyConfig { get; set; } + /// /// Gets or sets the identity of the managed cluster, if configured. /// @@ -260,6 +371,12 @@ public ManagedCluster() [JsonProperty(PropertyName = "sku")] public ManagedClusterSKU Sku { get; set; } + /// + /// Gets or sets the extended location of the Virtual Machine. + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs index 0424342b59acb..deba713c992dd 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs @@ -18,6 +18,10 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// AADProfile specifies attributes for Azure Active Directory integration. /// + /// + /// For more details see [managed AAD on + /// AKS](https://docs.microsoft.com/azure/aks/managed-aad). + /// public partial class ManagedClusterAADProfile { /// @@ -34,8 +38,8 @@ public ManagedClusterAADProfile() /// Whether to enable managed AAD. /// Whether to enable Azure RBAC for /// Kubernetes authorization. - /// AAD group object IDs that will - /// have admin role of the cluster. + /// The list of AAD group object IDs + /// that will have admin role of the cluster. /// The client AAD application ID. /// The server AAD application ID. /// The server AAD application @@ -74,8 +78,8 @@ public ManagedClusterAADProfile() public bool? EnableAzureRBAC { get; set; } /// - /// Gets or sets AAD group object IDs that will have admin role of the - /// cluster. + /// Gets or sets the list of AAD group object IDs that will have admin + /// role of the cluster. /// [JsonProperty(PropertyName = "adminGroupObjectIDs")] public IList AdminGroupObjectIDs { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs index a950f33365d19..25d25ef2cdfe8 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs @@ -33,14 +33,20 @@ public ManagedClusterAPIServerAccessProfile() /// Initializes a new instance of the /// ManagedClusterAPIServerAccessProfile class. /// - /// Authorized IP Ranges to kubernetes - /// API server. + /// The IP ranges authorized to access + /// the Kubernetes API server. /// Whether to create the cluster as /// a private cluster or not. - public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?)) + /// The private DNS zone mode for the + /// cluster. + /// Whether to create + /// additional public FQDN for private cluster or not. + public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?), string privateDNSZone = default(string), bool? enablePrivateClusterPublicFQDN = default(bool?)) { AuthorizedIPRanges = authorizedIPRanges; EnablePrivateCluster = enablePrivateCluster; + PrivateDNSZone = privateDNSZone; + EnablePrivateClusterPublicFQDN = enablePrivateClusterPublicFQDN; CustomInit(); } @@ -50,8 +56,16 @@ public ManagedClusterAPIServerAccessProfile() partial void CustomInit(); /// - /// Gets or sets authorized IP Ranges to kubernetes API server. + /// Gets or sets the IP ranges authorized to access the Kubernetes API + /// server. /// + /// + /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + /// This feature is not compatible with clusters that use Public IP Per + /// Node, or clusters that are using a Basic Load Balancer. For more + /// information see [API server authorized IP + /// ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// [JsonProperty(PropertyName = "authorizedIPRanges")] public IList AuthorizedIPRanges { get; set; } @@ -59,8 +73,30 @@ public ManagedClusterAPIServerAccessProfile() /// Gets or sets whether to create the cluster as a private cluster or /// not. /// + /// + /// For more details, see [Creating a private AKS + /// cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// [JsonProperty(PropertyName = "enablePrivateCluster")] public bool? EnablePrivateCluster { get; set; } + /// + /// Gets or sets the private DNS zone mode for the cluster. + /// + /// + /// The default is System. For more details see [configure private DNS + /// zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Allowed values are 'system' and 'none'. + /// + [JsonProperty(PropertyName = "privateDNSZone")] + public string PrivateDNSZone { get; set; } + + /// + /// Gets or sets whether to create additional public FQDN for private + /// cluster or not. + /// + [JsonProperty(PropertyName = "enablePrivateClusterPublicFQDN")] + public bool? EnablePrivateClusterPublicFQDN { get; set; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs index 61ad97f955046..6f3b064100774 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs @@ -30,11 +30,11 @@ public ManagedClusterAddonProfileIdentity() /// Initializes a new instance of the /// ManagedClusterAddonProfileIdentity class. /// - /// The resource id of the user assigned + /// The resource ID of the user assigned /// identity. - /// The client id of the user assigned + /// The client ID of the user assigned /// identity. - /// The object id of the user assigned + /// The object ID of the user assigned /// identity. public ManagedClusterAddonProfileIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) : base(resourceId, clientId, objectId) diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index fe1f89d386bc8..2117fcb3f9471 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -37,117 +37,80 @@ public ManagedClusterAgentPoolProfile() /// Unique name of the agent pool profile in the /// context of the subscription and resource group. /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 100 - /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) - /// for system pools. The default value is 1. - /// Size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - /// OS Disk Size in GB to be used to specify - /// the disk size for every machine in this master/agent pool. If you - /// specify 0, it will apply the default osDisk size according to the - /// vmSize specified. - /// VNet SubnetID specifies the VNet's - /// subnet identifier. - /// Maximum number of pods that can run on a + /// containers. Allowed values must be in the range of 0 to 1000 + /// (inclusive) for user pools and in the range of 1 to 1000 + /// (inclusive) for system pools. The default value is 1. + /// The size of the agent pool VMs. + /// Possible values include: 'Managed', + /// 'Ephemeral' + /// Possible values include: 'OS', + /// 'Temporary' + /// 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 + /// when launched. + /// The maximum number of pods that can run on a /// node. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Maximum number of nodes for + /// Possible values include: 'Linux', + /// 'Windows' + /// Possible values include: 'Ubuntu', + /// 'CBLMariner' + /// The maximum number of nodes for /// auto-scaling - /// Minimum number of nodes for + /// The minimum number of nodes for /// auto-scaling /// Whether to enable /// auto-scaler - /// AgentPoolType represents types of an agent pool. - /// Possible values include: 'VirtualMachineScaleSets', - /// 'AvailabilitySet' - /// AgentPoolMode represents mode of an agent pool. - /// Possible values include: 'System', 'User' - /// Version of orchestrator specified - /// when creating the managed cluster. - /// Version of node image + /// Possible values include: + /// 'VirtualMachineScaleSets', 'AvailabilitySet' + /// Possible values include: 'System', + /// 'User' + /// The version of Kubernetes running + /// on the Agent Pool. + /// The version of node image /// Settings for upgrading the /// agentpool /// The current deployment or - /// provisioning state, which only appears in the response. - /// Availability zones for nodes. Must - /// use VirtualMachineScaleSets AgentPoolType. - /// Enable public IP for nodes - /// ScaleSetPriority to be used to - /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Spot', 'Regular' - /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for Spot virtual machine scale set. - /// Default to Delete. Possible values include: 'Delete', - /// 'Deallocate' - /// SpotMaxPrice to be used to specify the - /// maximum price you are willing to pay in US Dollars. Possible values - /// are any decimal value greater than zero or -1 which indicates - /// default price to be up-to on-demand. - /// Agent pool tags to be persisted on the agent - /// pool virtual machine scale set. - /// Agent pool node labels to be persisted - /// across all nodes in agent pool. - /// Taints added to new nodes during node pool - /// create and scale. For example, key=value:NoSchedule. + /// provisioning state. + /// Describes 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'. + /// Whether each node is allocated its + /// own public IP. + /// The public IP prefix ID which VM + /// nodes should use IPs from. + /// The Virtual Machine Scale Set + /// priority. If not specified, the default is 'Regular'. Possible + /// values include: 'Spot', 'Regular' + /// The Virtual Machine Scale Set + /// eviction policy to use. + /// The max price (in US Dollars) you are + /// willing to pay for spot instances. Possible values are any decimal + /// value greater than zero or -1 which indicates default price to be + /// up-to on-demand. + /// The tags to be persisted on the agent pool + /// virtual machine scale set. + /// The node labels to be persisted across all + /// nodes in agent pool. + /// The taints added to new nodes during node + /// pool create and scale. For example, key=value:NoSchedule. /// The ID for Proximity /// Placement Group. - public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string)) - : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID) + /// The Kubelet configuration on the agent + /// pool nodes. + /// The OS configuration of Linux agent + /// nodes. + /// Whether to enable host based + /// OS and data drive encryption. + /// Whether to enable UltraSSD + /// Whether to use a FIPS-enabled OS. + /// GPUInstanceProfile to be used to + /// specify GPU MIG instance profile for supported GPU VM SKU. Possible + /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + public ManagedClusterAgentPoolProfile(string name, 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 type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string 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)) + : base(count, vmSize, osDiskSizeGB, osDiskType, kubeletDiskType, vnetSubnetID, podSubnetID, maxPods, osType, osSKU, maxCount, minCount, enableAutoScaling, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixID, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSSD, enableFIPS, gpuInstanceProfile) { Name = name; CustomInit(); @@ -162,6 +125,9 @@ public ManagedClusterAgentPoolProfile() /// Gets or sets unique name of the agent pool profile in the context /// of the subscription and resource group. /// + /// + /// Windows agent pool names must be 6 characters or less. + /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -171,8 +137,9 @@ public ManagedClusterAgentPoolProfile() /// /// Thrown if validation fails /// - public virtual void Validate() + public override void Validate() { + base.Validate(); if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index f2b7ff21fa52a..d971cebc282f7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -34,123 +34,90 @@ public ManagedClusterAgentPoolProfileProperties() /// ManagedClusterAgentPoolProfileProperties class. /// /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 100 - /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) - /// for system pools. The default value is 1. - /// Size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - /// OS Disk Size in GB to be used to specify - /// the disk size for every machine in this master/agent pool. If you - /// specify 0, it will apply the default osDisk size according to the - /// vmSize specified. - /// VNet SubnetID specifies the VNet's - /// subnet identifier. - /// Maximum number of pods that can run on a + /// containers. Allowed values must be in the range of 0 to 1000 + /// (inclusive) for user pools and in the range of 1 to 1000 + /// (inclusive) for system pools. The default value is 1. + /// The size of the agent pool VMs. + /// Possible values include: 'Managed', + /// 'Ephemeral' + /// Possible values include: 'OS', + /// 'Temporary' + /// 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 + /// when launched. + /// The maximum number of pods that can run on a /// node. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Maximum number of nodes for + /// Possible values include: 'Linux', + /// 'Windows' + /// Possible values include: 'Ubuntu', + /// 'CBLMariner' + /// The maximum number of nodes for /// auto-scaling - /// Minimum number of nodes for + /// The minimum number of nodes for /// auto-scaling /// Whether to enable /// auto-scaler - /// AgentPoolType represents types of an agent pool. - /// Possible values include: 'VirtualMachineScaleSets', - /// 'AvailabilitySet' - /// AgentPoolMode represents mode of an agent pool. - /// Possible values include: 'System', 'User' - /// Version of orchestrator specified - /// when creating the managed cluster. - /// Version of node image + /// Possible values include: + /// 'VirtualMachineScaleSets', 'AvailabilitySet' + /// Possible values include: 'System', + /// 'User' + /// The version of Kubernetes running + /// on the Agent Pool. + /// The version of node image /// Settings for upgrading the /// agentpool /// The current deployment or - /// provisioning state, which only appears in the response. - /// Availability zones for nodes. Must - /// use VirtualMachineScaleSets AgentPoolType. - /// Enable public IP for nodes - /// ScaleSetPriority to be used to - /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Spot', 'Regular' - /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for Spot virtual machine scale set. - /// Default to Delete. Possible values include: 'Delete', - /// 'Deallocate' - /// SpotMaxPrice to be used to specify the - /// maximum price you are willing to pay in US Dollars. Possible values - /// are any decimal value greater than zero or -1 which indicates - /// default price to be up-to on-demand. - /// Agent pool tags to be persisted on the agent - /// pool virtual machine scale set. - /// Agent pool node labels to be persisted - /// across all nodes in agent pool. - /// Taints added to new nodes during node pool - /// create and scale. For example, key=value:NoSchedule. + /// provisioning state. + /// Describes 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'. + /// Whether each node is allocated its + /// own public IP. + /// The public IP prefix ID which VM + /// nodes should use IPs from. + /// The Virtual Machine Scale Set + /// priority. If not specified, the default is 'Regular'. Possible + /// values include: 'Spot', 'Regular' + /// The Virtual Machine Scale Set + /// eviction policy to use. + /// The max price (in US Dollars) you are + /// willing to pay for spot instances. Possible values are any decimal + /// value greater than zero or -1 which indicates default price to be + /// up-to on-demand. + /// The tags to be persisted on the agent pool + /// virtual machine scale set. + /// The node labels to be persisted across all + /// nodes in agent pool. + /// The taints added to new nodes during node + /// pool create and scale. For example, key=value:NoSchedule. /// The ID for Proximity /// Placement Group. - public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string)) + /// The Kubelet configuration on the agent + /// pool nodes. + /// The OS configuration of Linux agent + /// nodes. + /// Whether to enable host based + /// OS and data drive encryption. + /// Whether to enable UltraSSD + /// Whether to use a FIPS-enabled OS. + /// GPUInstanceProfile to be used to + /// specify GPU MIG instance profile for supported GPU VM SKU. Possible + /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + public ManagedClusterAgentPoolProfileProperties(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 type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string 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)) { Count = count; VmSize = vmSize; OsDiskSizeGB = osDiskSizeGB; + OsDiskType = osDiskType; + KubeletDiskType = kubeletDiskType; VnetSubnetID = vnetSubnetID; + PodSubnetID = podSubnetID; MaxPods = maxPods; OsType = osType; + OsSKU = osSKU; MaxCount = maxCount; MinCount = minCount; EnableAutoScaling = enableAutoScaling; @@ -160,8 +127,10 @@ public ManagedClusterAgentPoolProfileProperties() NodeImageVersion = nodeImageVersion; UpgradeSettings = upgradeSettings; ProvisioningState = provisioningState; + PowerState = powerState; AvailabilityZones = availabilityZones; EnableNodePublicIP = enableNodePublicIP; + NodePublicIPPrefixID = nodePublicIPPrefixID; ScaleSetPriority = scaleSetPriority; ScaleSetEvictionPolicy = scaleSetEvictionPolicy; SpotMaxPrice = spotMaxPrice; @@ -169,6 +138,12 @@ public ManagedClusterAgentPoolProfileProperties() NodeLabels = nodeLabels; NodeTaints = nodeTaints; ProximityPlacementGroupID = proximityPlacementGroupID; + KubeletConfig = kubeletConfig; + LinuxOSConfig = linuxOSConfig; + EnableEncryptionAtHost = enableEncryptionAtHost; + EnableUltraSSD = enableUltraSSD; + EnableFIPS = enableFIPS; + GpuInstanceProfile = gpuInstanceProfile; CustomInit(); } @@ -179,110 +154,93 @@ public ManagedClusterAgentPoolProfileProperties() /// /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 0 to 100 (inclusive) for - /// user pools and in the range of 1 to 100 (inclusive) for system + /// Allowed values must be in the range of 0 to 1000 (inclusive) for + /// user pools and in the range of 1 to 1000 (inclusive) for system /// pools. The default value is 1. /// [JsonProperty(PropertyName = "count")] public int? Count { get; set; } /// - /// Gets or sets size of agent VMs. Possible values include: - /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - /// 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - /// 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - /// 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - /// 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - /// 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - /// 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - /// 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - /// 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', - /// 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', - /// 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', - /// 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - /// 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - /// 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - /// 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - /// 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', - /// 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - /// 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - /// 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', - /// 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', - /// 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', - /// 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', - /// 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', - /// 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', - /// 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', - /// 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', - /// 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', - /// 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', - /// 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', - /// 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', - /// 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - /// 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - /// 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', - /// 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - /// 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', - /// 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', - /// 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', - /// 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', - /// 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - /// 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', - /// 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', - /// 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', - /// 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', - /// 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', - /// 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', - /// 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', - /// 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', - /// 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', - /// 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', - /// 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + /// Gets or sets the size of the agent pool VMs. /// + /// + /// VM size availability varies by region. If a node contains + /// insufficient compute resources (memory, cpu, etc) pods might fail + /// to run correctly. For more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// [JsonProperty(PropertyName = "vmSize")] public string VmSize { get; set; } /// - /// Gets or sets OS Disk Size in GB to be used to specify the disk size - /// for every machine in this master/agent pool. If you specify 0, it - /// will apply the default osDisk size according to the vmSize - /// specified. /// [JsonProperty(PropertyName = "osDiskSizeGB")] public int? OsDiskSizeGB { get; set; } /// - /// Gets or sets vNet SubnetID specifies the VNet's subnet identifier. + /// Gets or sets possible values include: 'Managed', 'Ephemeral' /// + [JsonProperty(PropertyName = "osDiskType")] + public string OsDiskType { get; set; } + + /// + /// Gets or sets possible values include: 'OS', 'Temporary' + /// + [JsonProperty(PropertyName = "kubeletDiskType")] + public string KubeletDiskType { get; set; } + + /// + /// Gets or sets the ID of the subnet which agent pool nodes and + /// optionally pods will join on startup. + /// + /// + /// If this is not specified, a VNET and subnet will be generated and + /// used. If no podSubnetID is specified, this applies to nodes and + /// pods, otherwise it applies to just nodes. This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// [JsonProperty(PropertyName = "vnetSubnetID")] public string VnetSubnetID { get; set; } /// - /// Gets or sets maximum number of pods that can run on a node. + /// Gets or sets the ID of the subnet which pods will join when + /// launched. + /// + /// + /// If omitted, pod IPs are statically assigned on the node subnet (see + /// vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + [JsonProperty(PropertyName = "podSubnetID")] + public string PodSubnetID { get; set; } + + /// + /// Gets or sets the maximum number of pods that can run on a node. /// [JsonProperty(PropertyName = "maxPods")] public int? MaxPods { get; set; } /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' + /// Gets or sets possible values include: 'Linux', 'Windows' /// [JsonProperty(PropertyName = "osType")] public string OsType { get; set; } /// - /// Gets or sets maximum number of nodes for auto-scaling + /// Gets or sets possible values include: 'Ubuntu', 'CBLMariner' + /// + [JsonProperty(PropertyName = "osSKU")] + public string OsSKU { get; set; } + + /// + /// Gets or sets the maximum number of nodes for auto-scaling /// [JsonProperty(PropertyName = "maxCount")] public int? MaxCount { get; set; } /// - /// Gets or sets minimum number of nodes for auto-scaling + /// Gets or sets the minimum number of nodes for auto-scaling /// [JsonProperty(PropertyName = "minCount")] public int? MinCount { get; set; } @@ -294,29 +252,35 @@ public ManagedClusterAgentPoolProfileProperties() public bool? EnableAutoScaling { get; set; } /// - /// Gets or sets agentPoolType represents types of an agent pool. - /// Possible values include: 'VirtualMachineScaleSets', + /// Gets or sets possible values include: 'VirtualMachineScaleSets', /// 'AvailabilitySet' /// [JsonProperty(PropertyName = "type")] public string Type { get; set; } /// - /// Gets or sets agentPoolMode represents mode of an agent pool. - /// Possible values include: 'System', 'User' + /// Gets or sets possible values include: 'System', 'User' /// [JsonProperty(PropertyName = "mode")] public string Mode { get; set; } /// - /// Gets or sets version of orchestrator specified when creating the - /// managed cluster. + /// Gets or sets the version of Kubernetes running on the Agent Pool. /// + /// + /// As a best practice, you should upgrade all node pools in an AKS + /// cluster to the same Kubernetes version. The node pool version must + /// have the same major version as the control plane. The node pool + /// minor version must be within two minor versions of the control + /// plane version. The node pool version cannot be greater than the + /// control plane version. For more information see [upgrading a node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// [JsonProperty(PropertyName = "orchestratorVersion")] public string OrchestratorVersion { get; set; } /// - /// Gets version of node image + /// Gets the version of node image /// [JsonProperty(PropertyName = "nodeImageVersion")] public string NodeImageVersion { get; private set; } @@ -328,67 +292,102 @@ public ManagedClusterAgentPoolProfileProperties() public AgentPoolUpgradeSettings UpgradeSettings { get; set; } /// - /// Gets the current deployment or provisioning state, which only - /// appears in the response. + /// Gets the current deployment or provisioning state. /// [JsonProperty(PropertyName = "provisioningState")] public string ProvisioningState { get; private set; } /// - /// Gets or sets availability zones for nodes. Must use - /// VirtualMachineScaleSets AgentPoolType. + /// Gets describes whether the Agent Pool is Running or Stopped + /// + [JsonProperty(PropertyName = "powerState")] + public PowerState PowerState { get; private set; } + + /// + /// Gets or sets the list of Availability zones to use for nodes. This + /// can only be specified if the AgentPoolType property is + /// 'VirtualMachineScaleSets'. /// [JsonProperty(PropertyName = "availabilityZones")] public IList AvailabilityZones { get; set; } /// - /// Gets or sets enable public IP for nodes + /// Gets or sets whether each node is allocated its own public IP. /// + /// + /// Some scenarios may require nodes in a node pool to receive their + /// own dedicated public IP addresses. A common scenario is for gaming + /// workloads, where a console needs to make a direct connection to a + /// cloud virtual machine to minimize hops. For more information see + /// [assigning a public IP per + /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// The default is false. + /// [JsonProperty(PropertyName = "enableNodePublicIP")] public bool? EnableNodePublicIP { get; set; } /// - /// Gets or sets scaleSetPriority to be used to specify virtual machine - /// scale set priority. Default to regular. Possible values include: + /// Gets or sets the public IP prefix ID which VM nodes should use IPs + /// from. + /// + /// + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + [JsonProperty(PropertyName = "nodePublicIPPrefixID")] + public string NodePublicIPPrefixID { get; set; } + + /// + /// Gets or sets the Virtual Machine Scale Set priority. If not + /// specified, the default is 'Regular'. Possible values include: /// 'Spot', 'Regular' /// [JsonProperty(PropertyName = "scaleSetPriority")] public string ScaleSetPriority { get; set; } /// - /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction - /// policy for Spot virtual machine scale set. Default to Delete. - /// Possible values include: 'Delete', 'Deallocate' + /// Gets or sets the Virtual Machine Scale Set eviction policy to use. /// + /// + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If + /// not specified, the default is 'Delete'. Possible values include: + /// 'Delete', 'Deallocate' + /// [JsonProperty(PropertyName = "scaleSetEvictionPolicy")] public string ScaleSetEvictionPolicy { get; set; } /// - /// Gets or sets spotMaxPrice to be used to specify the maximum price - /// you are willing to pay in US Dollars. Possible values are any - /// decimal value greater than zero or -1 which indicates default price - /// to be up-to on-demand. + /// Gets or sets the max price (in US Dollars) you are willing to pay + /// for spot instances. Possible values are any decimal value greater + /// than zero or -1 which indicates default price to be up-to + /// on-demand. /// + /// + /// Possible values are any decimal value greater than zero or -1 which + /// indicates the willingness to pay any on-demand price. For more + /// details on spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// [JsonProperty(PropertyName = "spotMaxPrice")] public double? SpotMaxPrice { get; set; } /// - /// Gets or sets agent pool tags to be persisted on the agent pool - /// virtual machine scale set. + /// Gets or sets the tags to be persisted on the agent pool virtual + /// machine scale set. /// [JsonProperty(PropertyName = "tags")] public IDictionary Tags { get; set; } /// - /// Gets or sets agent pool node labels to be persisted across all - /// nodes in agent pool. + /// Gets or sets the node labels to be persisted across all nodes in + /// agent pool. /// [JsonProperty(PropertyName = "nodeLabels")] public IDictionary NodeLabels { get; set; } /// - /// Gets or sets taints added to new nodes during node pool create and - /// scale. For example, key=value:NoSchedule. + /// Gets or sets the taints added to new nodes during node pool create + /// and scale. For example, key=value:NoSchedule. /// [JsonProperty(PropertyName = "nodeTaints")] public IList NodeTaints { get; set; } @@ -399,5 +398,67 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "proximityPlacementGroupID")] public string ProximityPlacementGroupID { get; set; } + /// + /// Gets or sets the Kubelet configuration on the agent pool nodes. + /// + [JsonProperty(PropertyName = "kubeletConfig")] + public KubeletConfig KubeletConfig { get; set; } + + /// + /// Gets or sets the OS configuration of Linux agent nodes. + /// + [JsonProperty(PropertyName = "linuxOSConfig")] + public LinuxOSConfig LinuxOSConfig { get; set; } + + /// + /// Gets or sets whether to enable host based OS and data drive + /// encryption. + /// + /// + /// This is only supported on certain VM sizes and in certain Azure + /// regions. For more information, see: + /// https://docs.microsoft.com/azure/aks/enable-host-encryption + /// + [JsonProperty(PropertyName = "enableEncryptionAtHost")] + public bool? EnableEncryptionAtHost { get; set; } + + /// + /// Gets or sets whether to enable UltraSSD + /// + [JsonProperty(PropertyName = "enableUltraSSD")] + public bool? EnableUltraSSD { get; set; } + + /// + /// Gets or sets whether to use a FIPS-enabled OS. + /// + /// + /// See [Add a FIPS-enabled node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// for more details. + /// + [JsonProperty(PropertyName = "enableFIPS")] + public bool? EnableFIPS { get; set; } + + /// + /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG + /// instance profile for supported GPU VM SKU. Possible values include: + /// 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + /// + [JsonProperty(PropertyName = "gpuInstanceProfile")] + public string GpuInstanceProfile { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (KubeletConfig != null) + { + KubeletConfig.Validate(); + } + } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs new file mode 100644 index 0000000000000..81fd39229db5c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs @@ -0,0 +1,61 @@ +// +// 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; + + /// + /// Auto upgrade profile for a managed cluster. + /// + public partial class ManagedClusterAutoUpgradeProfile + { + /// + /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile + /// class. + /// + public ManagedClusterAutoUpgradeProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile + /// class. + /// + /// The upgrade channel for auto upgrade. + /// The default is 'none'. + public ManagedClusterAutoUpgradeProfile(string upgradeChannel = default(string)) + { + UpgradeChannel = upgradeChannel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the upgrade channel for auto upgrade. The default is + /// 'none'. + /// + /// + /// For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Possible values include: 'rapid', 'stable', 'patch', 'node-image', + /// 'none' + /// + [JsonProperty(PropertyName = "upgradeChannel")] + public string UpgradeChannel { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterHTTPProxyConfig.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterHTTPProxyConfig.cs new file mode 100644 index 0000000000000..ae383cb864ec3 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterHTTPProxyConfig.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Cluster HTTP proxy configuration. + /// + public partial class ManagedClusterHTTPProxyConfig + { + /// + /// Initializes a new instance of the ManagedClusterHTTPProxyConfig + /// class. + /// + public ManagedClusterHTTPProxyConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterHTTPProxyConfig + /// class. + /// + /// The HTTP proxy server endpoint to + /// use. + /// The HTTPS proxy server endpoint to + /// use. + /// The endpoints that should not go through + /// proxy. + /// Alternative CA cert to use for connecting + /// to proxy servers. + public ManagedClusterHTTPProxyConfig(string httpProxy = default(string), string httpsProxy = default(string), IList noProxy = default(IList), string trustedCa = default(string)) + { + HttpProxy = httpProxy; + HttpsProxy = httpsProxy; + NoProxy = noProxy; + TrustedCa = trustedCa; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the HTTP proxy server endpoint to use. + /// + [JsonProperty(PropertyName = "httpProxy")] + public string HttpProxy { get; set; } + + /// + /// Gets or sets the HTTPS proxy server endpoint to use. + /// + [JsonProperty(PropertyName = "httpsProxy")] + public string HttpsProxy { get; set; } + + /// + /// Gets or sets the endpoints that should not go through proxy. + /// + [JsonProperty(PropertyName = "noProxy")] + public IList NoProxy { get; set; } + + /// + /// Gets or sets alternative CA cert to use for connecting to proxy + /// servers. + /// + [JsonProperty(PropertyName = "trustedCa")] + public string TrustedCa { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs index 94cf9efd55884..7bae746a9246d 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs @@ -36,18 +36,10 @@ public ManagedClusterIdentity() /// The tenant id of the system assigned /// identity which is used by master components. /// The type of identity used for the managed - /// cluster. Type 'SystemAssigned' will use an implicitly created - /// identity in master components and an auto-created user assigned - /// identity in MC_ resource group in agent nodes. Type 'None' will not - /// use MSI for the managed cluster, service principal will be used - /// instead. Possible values include: 'SystemAssigned', 'UserAssigned', - /// 'None' + /// cluster. /// The user identity associated /// with the managed cluster. This identity will be used in control - /// plane and only one user assigned identity is allowed. The user - /// identity dictionary key references will be ARM resource ids in the - /// form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// plane. Only one user assigned identity is allowed. public ManagedClusterIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary)) { PrincipalId = principalId; @@ -78,22 +70,24 @@ public ManagedClusterIdentity() /// /// Gets or sets the type of identity used for the managed cluster. - /// Type 'SystemAssigned' will use an implicitly created identity in - /// master components and an auto-created user assigned identity in MC_ - /// resource group in agent nodes. Type 'None' will not use MSI for the - /// managed cluster, service principal will be used instead. Possible - /// values include: 'SystemAssigned', 'UserAssigned', 'None' /// + /// + /// For more information see [use managed identities in + /// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// Possible values include: 'SystemAssigned', 'UserAssigned', 'None' + /// [JsonProperty(PropertyName = "type")] public ResourceIdentityType? Type { get; set; } /// /// Gets or sets the user identity associated with the managed cluster. - /// This identity will be used in control plane and only one user - /// assigned identity is allowed. The user identity dictionary key - /// references will be ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// This identity will be used in control plane. Only one user assigned + /// identity is allowed. /// + /// + /// The keys must be ARM resource IDs in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// [JsonProperty(PropertyName = "userAssignedIdentities")] public IDictionary UserAssignedIdentities { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs index e3a2c4740ceaa..fb6782d4bb34c 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs @@ -42,12 +42,12 @@ public ManagedClusterLoadBalancerProfile() /// cluster load balancer. /// The effective outbound IP /// resources of the cluster load balancer. - /// Desired number of allocated - /// SNAT ports per VM. Allowed values must be in the range of 0 to - /// 64000 (inclusive). The default value is 0 which results in Azure + /// The desired number of + /// allocated SNAT ports per VM. Allowed values are in the range of 0 + /// to 64000 (inclusive). The default value is 0 which results in Azure /// dynamically allocating ports. /// Desired outbound flow idle - /// timeout in minutes. Allowed values must be in the range of 4 to 120 + /// timeout in minutes. Allowed values are in the range of 4 to 120 /// (inclusive). The default value is 30 minutes. public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList), int? allocatedOutboundPorts = default(int?), int? idleTimeoutInMinutes = default(int?)) { @@ -94,17 +94,18 @@ public ManagedClusterLoadBalancerProfile() public IList EffectiveOutboundIPs { get; set; } /// - /// Gets or sets desired number of allocated SNAT ports per VM. Allowed - /// values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. + /// Gets or sets the desired number of allocated SNAT ports per VM. + /// Allowed values are in the range of 0 to 64000 (inclusive). The + /// default value is 0 which results in Azure dynamically allocating + /// ports. /// [JsonProperty(PropertyName = "allocatedOutboundPorts")] public int? AllocatedOutboundPorts { get; set; } /// /// Gets or sets desired outbound flow idle timeout in minutes. Allowed - /// values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. + /// values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. /// [JsonProperty(PropertyName = "idleTimeoutInMinutes")] public int? IdleTimeoutInMinutes { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs index d72f7f793e37c..6e60275cc1551 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -32,9 +32,10 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() /// Initializes a new instance of the /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. /// - /// Desired number of outbound IP created/managed - /// by Azure for the cluster load balancer. Allowed values must be in - /// the range of 1 to 100 (inclusive). The default value is 1. + /// The desired number of outbound IPs + /// created/managed by Azure for the cluster load balancer. Allowed + /// values must be in the range of 1 to 100 (inclusive). The default + /// value is 1. public ManagedClusterLoadBalancerProfileManagedOutboundIPs(int? count = default(int?)) { Count = count; @@ -47,9 +48,9 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() partial void CustomInit(); /// - /// Gets or sets desired number of outbound IP created/managed by Azure - /// for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. + /// Gets or sets the desired number of outbound IPs created/managed by + /// Azure for the cluster load balancer. Allowed values must be in the + /// range of 1 to 100 (inclusive). The default value is 1. /// [JsonProperty(PropertyName = "count")] public int? Count { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs new file mode 100644 index 0000000000000..05f1b35b94f57 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs @@ -0,0 +1,117 @@ +// +// 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 Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Details about the pod identity assigned to the Managed Cluster. + /// + public partial class ManagedClusterPodIdentity + { + /// + /// Initializes a new instance of the ManagedClusterPodIdentity class. + /// + public ManagedClusterPodIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterPodIdentity class. + /// + /// The name of the pod identity. + /// The namespace of the pod + /// identity. + /// The user assigned identity details. + /// The binding selector to use for the + /// AzureIdentityBinding resource. + /// The current provisioning state of + /// the pod identity. Possible values include: 'Assigned', 'Updating', + /// 'Deleting', 'Failed' + public ManagedClusterPodIdentity(string name, string namespaceProperty, UserAssignedIdentity identity, string bindingSelector = default(string), string provisioningState = default(string), ManagedClusterPodIdentityProvisioningInfo provisioningInfo = default(ManagedClusterPodIdentityProvisioningInfo)) + { + Name = name; + NamespaceProperty = namespaceProperty; + BindingSelector = bindingSelector; + Identity = identity; + ProvisioningState = provisioningState; + ProvisioningInfo = provisioningInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the pod identity. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the namespace of the pod identity. + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets the binding selector to use for the + /// AzureIdentityBinding resource. + /// + [JsonProperty(PropertyName = "bindingSelector")] + public string BindingSelector { get; set; } + + /// + /// Gets or sets the user assigned identity details. + /// + [JsonProperty(PropertyName = "identity")] + public UserAssignedIdentity Identity { get; set; } + + /// + /// Gets the current provisioning state of the pod identity. Possible + /// values include: 'Assigned', 'Updating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "provisioningInfo")] + public ManagedClusterPodIdentityProvisioningInfo ProvisioningInfo { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (NamespaceProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "NamespaceProperty"); + } + if (Identity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Identity"); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs new file mode 100644 index 0000000000000..7aff319f93b75 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs @@ -0,0 +1,101 @@ +// +// 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 Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A pod identity exception, which allows pods with certain labels to + /// access the Azure Instance Metadata Service (IMDS) endpoint without + /// being intercepted by the node-managed identity (NMI) server. + /// + /// + /// See [disable AAD Pod Identity for a specific + /// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// for more details. + /// + public partial class ManagedClusterPodIdentityException + { + /// + /// Initializes a new instance of the + /// ManagedClusterPodIdentityException class. + /// + public ManagedClusterPodIdentityException() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterPodIdentityException class. + /// + /// The name of the pod identity exception. + /// The namespace of the pod identity + /// exception. + /// The pod labels to match. + public ManagedClusterPodIdentityException(string name, string namespaceProperty, IDictionary podLabels) + { + Name = name; + NamespaceProperty = namespaceProperty; + PodLabels = podLabels; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the pod identity exception. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the namespace of the pod identity exception. + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets the pod labels to match. + /// + [JsonProperty(PropertyName = "podLabels")] + public IDictionary PodLabels { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (NamespaceProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "NamespaceProperty"); + } + if (PodLabels == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PodLabels"); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs new file mode 100644 index 0000000000000..a2439ec7389c3 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The pod identity profile of the Managed Cluster. + /// + /// + /// See [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. + /// + public partial class ManagedClusterPodIdentityProfile + { + /// + /// Initializes a new instance of the ManagedClusterPodIdentityProfile + /// class. + /// + public ManagedClusterPodIdentityProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterPodIdentityProfile + /// class. + /// + /// Whether the pod identity addon is + /// enabled. + /// Whether pod identity is + /// allowed to run on clusters with Kubenet networking. + /// The pod identities to use in + /// the cluster. + /// The pod identity + /// exceptions to allow. + public ManagedClusterPodIdentityProfile(bool? enabled = default(bool?), bool? allowNetworkPluginKubenet = default(bool?), IList userAssignedIdentities = default(IList), IList userAssignedIdentityExceptions = default(IList)) + { + Enabled = enabled; + AllowNetworkPluginKubenet = allowNetworkPluginKubenet; + UserAssignedIdentities = userAssignedIdentities; + UserAssignedIdentityExceptions = userAssignedIdentityExceptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether the pod identity addon is enabled. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets whether pod identity is allowed to run on clusters + /// with Kubenet networking. + /// + /// + /// Running in Kubenet is disabled by default due to the security + /// related nature of AAD Pod Identity and the risks of IP spoofing. + /// See [using Kubenet network plugin with AAD Pod + /// Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// for more information. + /// + [JsonProperty(PropertyName = "allowNetworkPluginKubenet")] + public bool? AllowNetworkPluginKubenet { get; set; } + + /// + /// Gets or sets the pod identities to use in the cluster. + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IList UserAssignedIdentities { get; set; } + + /// + /// Gets or sets the pod identity exceptions to allow. + /// + [JsonProperty(PropertyName = "userAssignedIdentityExceptions")] + public IList UserAssignedIdentityExceptions { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs new file mode 100644 index 0000000000000..ef8c4e6081991 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs @@ -0,0 +1,50 @@ +// +// 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; + + public partial class ManagedClusterPodIdentityProvisioningInfo + { + /// + /// Initializes a new instance of the + /// ManagedClusterPodIdentityProvisioningInfo class. + /// + public ManagedClusterPodIdentityProvisioningInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterPodIdentityProvisioningInfo class. + /// + /// Pod identity assignment error (if any). + public ManagedClusterPodIdentityProvisioningInfo(CloudError error = default(CloudError)) + { + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pod identity assignment error (if any). + /// + [JsonProperty(PropertyName = "error")] + public CloudError Error { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs new file mode 100644 index 0000000000000..fce2cbf097061 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs @@ -0,0 +1,24 @@ +// +// 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 ManagedClusterPodIdentityProvisioningState. + /// + public static class ManagedClusterPodIdentityProvisioningState + { + public const string Assigned = "Assigned"; + public const string Updating = "Updating"; + public const string Deleting = "Deleting"; + public const string Failed = "Failed"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs index 37f5ed3dc2e91..fa395bb79744b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs @@ -34,12 +34,11 @@ public ManagedClusterPoolUpgradeProfile() /// Initializes a new instance of the ManagedClusterPoolUpgradeProfile /// class. /// - /// Kubernetes version (major, minor, - /// patch). - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Pool name. + /// The Kubernetes version + /// (major.minor.patch). + /// Possible values include: 'Linux', + /// 'Windows' + /// The Agent Pool name. /// List of orchestrator types and versions /// available for upgrade. public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string osType, string name = default(string), IList upgrades = default(IList)) @@ -57,21 +56,19 @@ public ManagedClusterPoolUpgradeProfile() partial void CustomInit(); /// - /// Gets or sets kubernetes version (major, minor, patch). + /// Gets or sets the Kubernetes version (major.minor.patch). /// [JsonProperty(PropertyName = "kubernetesVersion")] public string KubernetesVersion { get; set; } /// - /// Gets or sets pool name. + /// Gets or sets the Agent Pool name. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' + /// Gets or sets possible values include: 'Linux', 'Windows' /// [JsonProperty(PropertyName = "osType")] public string OsType { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs index 789f8d7226871..303ee0f5c66eb 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs @@ -28,10 +28,10 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem() /// Initializes a new instance of the /// ManagedClusterPoolUpgradeProfileUpgradesItem class. /// - /// Kubernetes version (major, minor, - /// patch). - /// Whether Kubernetes version is currently in - /// preview. + /// The Kubernetes version + /// (major.minor.patch). + /// Whether the Kubernetes version is currently + /// in preview. public ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = default(string), bool? isPreview = default(bool?)) { KubernetesVersion = kubernetesVersion; @@ -45,13 +45,14 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem() partial void CustomInit(); /// - /// Gets or sets kubernetes version (major, minor, patch). + /// Gets or sets the Kubernetes version (major.minor.patch). /// [JsonProperty(PropertyName = "kubernetesVersion")] public string KubernetesVersion { get; set; } /// - /// Gets or sets whether Kubernetes version is currently in preview. + /// Gets or sets whether the Kubernetes version is currently in + /// preview. /// [JsonProperty(PropertyName = "isPreview")] public bool? IsPreview { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs index a379f5ed844f5..69dc0f79aadfa 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs @@ -31,9 +31,55 @@ public ManagedClusterPropertiesAutoScalerProfile() /// Initializes a new instance of the /// ManagedClusterPropertiesAutoScalerProfile class. /// - public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string maxGracefulTerminationSec = default(string)) + /// Detects similar node pools + /// and balances the number of nodes between them. + /// The expander to use when scaling up + /// The maximum number of empty nodes + /// that can be deleted at the same time. This must be a positive + /// integer. + /// The maximum number of + /// seconds the cluster autoscaler waits for pod termination when + /// trying to scale down a node. + /// The maximum time the autoscaler + /// waits for a node to be provisioned. + /// The maximum percentage of + /// unready nodes in the cluster. After this percentage is exceeded, + /// cluster autoscaler halts operations. + /// Ignore unscheduled pods before + /// they're a certain age. + /// The number of allowed unready + /// nodes, irrespective of max-total-unready-percentage. + /// How often cluster is reevaluated for + /// scale up or down. + /// How long after scale up that + /// scale down evaluation resumes + /// How long after node + /// deletion that scale down evaluation resumes. + /// How long after scale down + /// failure that scale down evaluation resumes. + /// How long a node should be + /// unneeded before it is eligible for scale down. + /// How long an unready node should + /// be unneeded before it is eligible for scale down + /// Node utilization level, + /// defined as sum of requested resources divided by capacity, below + /// which a node can be considered for scale down. + /// If cluster autoscaler will + /// skip deleting nodes with pods with local storage, for example, + /// EmptyDir or HostPath. + /// If cluster autoscaler will + /// skip deleting nodes with pods from kube-system (except for + /// DaemonSet or mirror pods) + public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string expander = default(string), string maxEmptyBulkDelete = default(string), string maxGracefulTerminationSec = default(string), string maxNodeProvisionTime = default(string), string maxTotalUnreadyPercentage = default(string), string newPodScaleUpDelay = default(string), string okTotalUnreadyCount = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string skipNodesWithLocalStorage = default(string), string skipNodesWithSystemPods = default(string)) { BalanceSimilarNodeGroups = balanceSimilarNodeGroups; + Expander = expander; + MaxEmptyBulkDelete = maxEmptyBulkDelete; + MaxGracefulTerminationSec = maxGracefulTerminationSec; + MaxNodeProvisionTime = maxNodeProvisionTime; + MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage; + NewPodScaleUpDelay = newPodScaleUpDelay; + OkTotalUnreadyCount = okTotalUnreadyCount; ScanInterval = scanInterval; ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; @@ -41,7 +87,8 @@ public ManagedClusterPropertiesAutoScalerProfile() ScaleDownUnneededTime = scaleDownUnneededTime; ScaleDownUnreadyTime = scaleDownUnreadyTime; ScaleDownUtilizationThreshold = scaleDownUtilizationThreshold; - MaxGracefulTerminationSec = maxGracefulTerminationSec; + SkipNodesWithLocalStorage = skipNodesWithLocalStorage; + SkipNodesWithSystemPods = skipNodesWithSystemPods; CustomInit(); } @@ -51,49 +98,187 @@ public ManagedClusterPropertiesAutoScalerProfile() partial void CustomInit(); /// + /// Gets or sets detects similar node pools and balances the number of + /// nodes between them. /// + /// + /// Valid values are 'true' and 'false' + /// [JsonProperty(PropertyName = "balance-similar-node-groups")] public string BalanceSimilarNodeGroups { get; set; } /// + /// Gets or sets the expander to use when scaling up + /// + /// + /// If not specified, the default is 'random'. See + /// [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// for more information. Possible values include: 'least-waste', + /// 'most-pods', 'priority', 'random' + /// + [JsonProperty(PropertyName = "expander")] + public string Expander { get; set; } + + /// + /// Gets or sets the maximum number of empty nodes that can be deleted + /// at the same time. This must be a positive integer. + /// + /// + /// The default is 10. + /// + [JsonProperty(PropertyName = "max-empty-bulk-delete")] + public string MaxEmptyBulkDelete { get; set; } + + /// + /// Gets or sets the maximum number of seconds the cluster autoscaler + /// waits for pod termination when trying to scale down a node. + /// + /// + /// The default is 600. + /// + [JsonProperty(PropertyName = "max-graceful-termination-sec")] + public string MaxGracefulTerminationSec { get; set; } + + /// + /// Gets or sets the maximum time the autoscaler waits for a node to be + /// provisioned. + /// + /// + /// The default is '15m'. Values must be an integer followed by an 'm'. + /// No unit of time other than minutes (m) is supported. + /// + [JsonProperty(PropertyName = "max-node-provision-time")] + public string MaxNodeProvisionTime { get; set; } + + /// + /// Gets or sets the maximum percentage of unready nodes in the + /// cluster. After this percentage is exceeded, cluster autoscaler + /// halts operations. + /// + /// + /// The default is 45. The maximum is 100 and the minimum is 0. + /// + [JsonProperty(PropertyName = "max-total-unready-percentage")] + public string MaxTotalUnreadyPercentage { get; set; } + + /// + /// Gets or sets ignore unscheduled pods before they're a certain age. /// + /// + /// For scenarios like burst/batch scale where you don't want CA to act + /// before the kubernetes scheduler could schedule all the pods, you + /// can tell CA to ignore unscheduled pods before they're a certain + /// age. The default is '0s'. Values must be an integer followed by a + /// unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + /// + [JsonProperty(PropertyName = "new-pod-scale-up-delay")] + public string NewPodScaleUpDelay { get; set; } + + /// + /// Gets or sets the number of allowed unready nodes, irrespective of + /// max-total-unready-percentage. + /// + /// + /// This must be an integer. The default is 3. + /// + [JsonProperty(PropertyName = "ok-total-unready-count")] + public string OkTotalUnreadyCount { get; set; } + + /// + /// Gets or sets how often cluster is reevaluated for scale up or down. + /// + /// + /// The default is '10'. Values must be an integer number of seconds. + /// [JsonProperty(PropertyName = "scan-interval")] public string ScanInterval { get; set; } /// + /// Gets or sets how long after scale up that scale down evaluation + /// resumes /// + /// + /// The default is '10m'. Values must be an integer followed by an 'm'. + /// No unit of time other than minutes (m) is supported. + /// [JsonProperty(PropertyName = "scale-down-delay-after-add")] public string ScaleDownDelayAfterAdd { get; set; } /// + /// Gets or sets how long after node deletion that scale down + /// evaluation resumes. /// + /// + /// The default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is + /// supported. + /// [JsonProperty(PropertyName = "scale-down-delay-after-delete")] public string ScaleDownDelayAfterDelete { get; set; } /// + /// Gets or sets how long after scale down failure that scale down + /// evaluation resumes. /// + /// + /// The default is '3m'. Values must be an integer followed by an 'm'. + /// No unit of time other than minutes (m) is supported. + /// [JsonProperty(PropertyName = "scale-down-delay-after-failure")] public string ScaleDownDelayAfterFailure { get; set; } /// + /// Gets or sets how long a node should be unneeded before it is + /// eligible for scale down. /// + /// + /// The default is '10m'. Values must be an integer followed by an 'm'. + /// No unit of time other than minutes (m) is supported. + /// [JsonProperty(PropertyName = "scale-down-unneeded-time")] public string ScaleDownUnneededTime { get; set; } /// + /// Gets or sets how long an unready node should be unneeded before it + /// is eligible for scale down /// + /// + /// The default is '20m'. Values must be an integer followed by an 'm'. + /// No unit of time other than minutes (m) is supported. + /// [JsonProperty(PropertyName = "scale-down-unready-time")] public string ScaleDownUnreadyTime { get; set; } /// + /// Gets or sets node utilization level, defined as sum of requested + /// resources divided by capacity, below which a node can be considered + /// for scale down. /// + /// + /// The default is '0.5'. + /// [JsonProperty(PropertyName = "scale-down-utilization-threshold")] public string ScaleDownUtilizationThreshold { get; set; } /// + /// Gets or sets if cluster autoscaler will skip deleting nodes with + /// pods with local storage, for example, EmptyDir or HostPath. /// - [JsonProperty(PropertyName = "max-graceful-termination-sec")] - public string MaxGracefulTerminationSec { get; set; } + /// + /// The default is true. + /// + [JsonProperty(PropertyName = "skip-nodes-with-local-storage")] + public string SkipNodesWithLocalStorage { get; set; } + + /// + /// Gets or sets if cluster autoscaler will skip deleting nodes with + /// pods from kube-system (except for DaemonSet or mirror pods) + /// + /// + /// The default is true. + /// + [JsonProperty(PropertyName = "skip-nodes-with-system-pods")] + public string SkipNodesWithSystemPods { get; set; } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs index 54d95601f6070..6cbaf38bdcc8b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs @@ -27,11 +27,11 @@ public ManagedClusterPropertiesIdentityProfileValue() /// Initializes a new instance of the /// ManagedClusterPropertiesIdentityProfileValue class. /// - /// The resource id of the user assigned + /// The resource ID of the user assigned /// identity. - /// The client id of the user assigned + /// The client ID of the user assigned /// identity. - /// The object id of the user assigned + /// The object ID of the user assigned /// identity. public ManagedClusterPropertiesIdentityProfileValue(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) : base(resourceId, clientId, objectId) diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs index d65bbe1e5ee84..974770d75803b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs @@ -13,6 +13,9 @@ namespace Microsoft.Azure.Management.ContainerService.Models using Newtonsoft.Json; using System.Linq; + /// + /// The SKU of a Managed Cluster. + /// public partial class ManagedClusterSKU { /// @@ -26,10 +29,9 @@ public ManagedClusterSKU() /// /// Initializes a new instance of the ManagedClusterSKU class. /// - /// Name of a managed cluster SKU. Possible values - /// include: 'Basic' - /// Tier of a managed cluster SKU. Possible values - /// include: 'Paid', 'Free' + /// The name of a managed cluster SKU. Possible + /// values include: 'Basic' + /// The tier of a managed cluster SKU. public ManagedClusterSKU(string name = default(string), string tier = default(string)) { Name = name; @@ -43,16 +45,20 @@ public ManagedClusterSKU() partial void CustomInit(); /// - /// Gets or sets name of a managed cluster SKU. Possible values + /// Gets or sets the name of a managed cluster SKU. Possible values /// include: 'Basic' /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// - /// Gets or sets tier of a managed cluster SKU. Possible values - /// include: 'Paid', 'Free' + /// Gets or sets the tier of a managed cluster SKU. /// + /// + /// If not specified, the default is 'Free'. See [uptime + /// SLA](https://docs.microsoft.com/azure/aks/uptime-sla) for more + /// details. Possible values include: 'Paid', 'Free' + /// [JsonProperty(PropertyName = "tier")] public string Tier { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs index e16fb8555fee6..fe00c59316b93 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs @@ -16,7 +16,16 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class ManagedClusterSKUTier { + /// + /// Guarantees 99.95% availability of the Kubernetes API server + /// endpoint for clusters that use Availability Zones and 99.9% of + /// availability for clusters that don't use Availability Zones. + /// public const string Paid = "Paid"; + /// + /// No guaranteed SLA, no additional charges. Free tier clusters have + /// an SLO of 99.5%. + /// public const string Free = "Free"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterUpgradeProfile.cs index b818758d7268b..1125c142e9ef0 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterUpgradeProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterUpgradeProfile.cs @@ -40,9 +40,9 @@ public ManagedClusterUpgradeProfile() /// versions for the control plane. /// The list of available upgrade /// versions for agent pools. - /// Id of upgrade profile. - /// Name of upgrade profile. - /// Type of upgrade profile. + /// The ID of the upgrade profile. + /// The name of the upgrade profile. + /// The type of the upgrade profile. public ManagedClusterUpgradeProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IList agentPoolProfiles, string id = default(string), string name = default(string), string type = default(string)) { Id = id; @@ -59,19 +59,19 @@ public ManagedClusterUpgradeProfile() partial void CustomInit(); /// - /// Gets id of upgrade profile. + /// Gets the ID of the upgrade profile. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets name of upgrade profile. + /// Gets the name of the upgrade profile. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets type of upgrade profile. + /// Gets the type of the upgrade profile. /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs index 9855f66a76830..6ea892e90faad 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Profile for Windows VMs in the container service cluster. + /// Profile for Windows VMs in the managed cluster. /// public partial class ManagedClusterWindowsProfile { @@ -32,19 +32,38 @@ public ManagedClusterWindowsProfile() /// Initializes a new instance of the ManagedClusterWindowsProfile /// class. /// - /// The administrator username to use for - /// Windows VMs. - /// The administrator password to use for - /// Windows VMs. - /// The licenseType to use for Windows VMs. - /// Windows_Server is used to enable Azure Hybrid User Benefits for - /// Windows VMs. Possible values include: 'None', + /// Specifies the name of the administrator + /// account. <br><br> **Restriction:** Cannot end in "." + /// <br><br> **Disallowed values:** "administrator", + /// "admin", "user", "user1", "test", "user2", "test1", "user3", + /// "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", + /// "backup", "console", "david", "guest", "john", "owner", "root", + /// "server", "sql", "support", "support_388945a0", "sys", "test2", + /// "test3", "user4", "user5". <br><br> **Minimum-length:** + /// 1 character <br><br> **Max-length:** 20 + /// characters + /// Specifies the password of the + /// administrator account. <br><br> **Minimum-length:** 8 + /// characters <br><br> **Max-length:** 123 characters + /// <br><br> **Complexity requirements:** 3 out of 4 + /// conditions below need to be fulfilled <br> Has lower + /// characters <br>Has upper characters <br> Has a digit + /// <br> Has a special character (Regex match [\W_]) + /// <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", + /// "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", + /// "Password1", "Password22", "iloveyou!" + /// The license type to use for Windows VMs. + /// See [Azure Hybrid User + /// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. Possible values include: 'None', /// 'Windows_Server' - public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string)) + /// Whether to enable CSI proxy. + public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string), bool? enableCSIProxy = default(bool?)) { AdminUsername = adminUsername; AdminPassword = adminPassword; LicenseType = licenseType; + EnableCSIProxy = enableCSIProxy; CustomInit(); } @@ -54,25 +73,56 @@ public ManagedClusterWindowsProfile() partial void CustomInit(); /// - /// Gets or sets the administrator username to use for Windows VMs. + /// Gets or sets specifies the name of the administrator account. + /// &lt;br&gt;&lt;br&gt; **Restriction:** Cannot end in + /// "." &lt;br&gt;&lt;br&gt; **Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", + /// "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", + /// "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5". + /// &lt;br&gt;&lt;br&gt; **Minimum-length:** 1 + /// character &lt;br&gt;&lt;br&gt; **Max-length:** 20 + /// characters /// [JsonProperty(PropertyName = "adminUsername")] public string AdminUsername { get; set; } /// - /// Gets or sets the administrator password to use for Windows VMs. + /// Gets or sets specifies the password of the administrator account. + /// &lt;br&gt;&lt;br&gt; **Minimum-length:** 8 + /// characters &lt;br&gt;&lt;br&gt; **Max-length:** 123 + /// characters &lt;br&gt;&lt;br&gt; **Complexity + /// requirements:** 3 out of 4 conditions below need to be fulfilled + /// &lt;br&gt; Has lower characters &lt;br&gt;Has upper + /// characters &lt;br&gt; Has a digit &lt;br&gt; Has a + /// special character (Regex match [\W_]) + /// &lt;br&gt;&lt;br&gt; **Disallowed values:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", + /// "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" /// [JsonProperty(PropertyName = "adminPassword")] public string AdminPassword { get; set; } /// - /// Gets or sets the licenseType to use for Windows VMs. Windows_Server - /// is used to enable Azure Hybrid User Benefits for Windows VMs. - /// Possible values include: 'None', 'Windows_Server' + /// Gets or sets the license type to use for Windows VMs. See [Azure + /// Hybrid User + /// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. Possible values include: 'None', 'Windows_Server' /// [JsonProperty(PropertyName = "licenseType")] public string LicenseType { get; set; } + /// + /// Gets or sets whether to enable CSI proxy. + /// + /// + /// For more details on CSI proxy, see the [CSI proxy GitHub + /// repo](https://github.com/kubernetes-csi/csi-proxy). + /// + [JsonProperty(PropertyName = "enableCSIProxy")] + public bool? EnableCSIProxy { get; set; } + /// /// Validate the object. /// @@ -85,20 +135,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername"); } - if (AdminUsername != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$")) - { - throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$"); - } - } - if (AdminPassword != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(AdminPassword, "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$")) - { - throw new ValidationException(ValidationRules.Pattern, "AdminPassword", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$"); - } - } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs index 10b074c11ffce..0aae0378dfa48 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs @@ -16,7 +16,16 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class NetworkMode { + /// + /// No bridge is created. Intra-VM Pod to Pod communication is through + /// IP routes created by Azure CNI. See [Transparent + /// Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode) + /// for more information. + /// public const string Transparent = "transparent"; + /// + /// This is no longer supported + /// public const string Bridge = "bridge"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPlugin.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPlugin.cs index aa4ebd53108d7..199686c7fcf02 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPlugin.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPlugin.cs @@ -16,7 +16,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class NetworkPlugin { + /// + /// Use the Azure CNI network plugin. See [Azure CNI (advanced) + /// networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) + /// for more information. + /// public const string Azure = "azure"; + /// + /// Use the Kubenet network plugin. See [Kubenet (basic) + /// networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) + /// for more information. + /// public const string Kubenet = "kubenet"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPolicy.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPolicy.cs index d6e012403aea6..784b1103b4a15 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPolicy.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkPolicy.cs @@ -16,7 +16,19 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class NetworkPolicy { + /// + /// Use Calico network policies. See [differences between Azure and + /// Calico + /// policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + /// for more information. + /// public const string Calico = "calico"; + /// + /// Use Azure network policies. See [differences between Azure and + /// Calico + /// policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + /// for more information. + /// public const string Azure = "azure"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkProfile.cs deleted file mode 100644 index b6048318edc13..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkProfile.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents the OpenShift networking configuration - /// - public partial class NetworkProfile - { - /// - /// Initializes a new instance of the NetworkProfile class. - /// - public NetworkProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NetworkProfile class. - /// - /// CIDR for the OpenShift Vnet. - /// CIDR of the Vnet to peer. - /// ID of the Vnet created for OSA - /// cluster. - public NetworkProfile(string vnetCidr = default(string), string peerVnetId = default(string), string vnetId = default(string)) - { - VnetCidr = vnetCidr; - PeerVnetId = peerVnetId; - VnetId = vnetId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets CIDR for the OpenShift Vnet. - /// - [JsonProperty(PropertyName = "vnetCidr")] - public string VnetCidr { get; set; } - - /// - /// Gets or sets CIDR of the Vnet to peer. - /// - [JsonProperty(PropertyName = "peerVnetId")] - public string PeerVnetId { get; set; } - - /// - /// Gets or sets ID of the Vnet created for OSA cluster. - /// - [JsonProperty(PropertyName = "vnetId")] - public string VnetId { get; set; } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs new file mode 100644 index 0000000000000..7777d8ceafb2c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSDiskType.cs @@ -0,0 +1,35 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for OSDiskType. + /// + public static class OSDiskType + { + /// + /// Azure replicates the operating system disk for a virtual machine to + /// Azure storage to avoid data loss should the VM need to be relocated + /// to another host. Since containers aren't designed to have local + /// state persisted, this behavior offers limited value while providing + /// some drawbacks, including slower node provisioning and higher + /// read/write latency. + /// + public const string Managed = "Managed"; + /// + /// Ephemeral OS disks are stored only on the host machine, just like a + /// temporary disk. This provides lower read/write latency, along with + /// faster node scaling and cluster upgrades. + /// + public const string Ephemeral = "Ephemeral"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfileListResult.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProfile.cs similarity index 56% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfileListResult.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProfile.cs index 1b6b79cb525c4..b0883409d3b80 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfileListResult.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProfile.cs @@ -18,38 +18,32 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// The list of versions for supported orchestrators. + /// The OS option profile. /// [Rest.Serialization.JsonTransformation] - public partial class OrchestratorVersionProfileListResult + public partial class OSOptionProfile { /// - /// Initializes a new instance of the - /// OrchestratorVersionProfileListResult class. + /// Initializes a new instance of the OSOptionProfile class. /// - public OrchestratorVersionProfileListResult() + public OSOptionProfile() { CustomInit(); } /// - /// Initializes a new instance of the - /// OrchestratorVersionProfileListResult class. + /// Initializes a new instance of the OSOptionProfile class. /// - /// List of orchestrator version - /// profiles. - /// Id of the orchestrator version profile list - /// result. - /// Name of the orchestrator version profile list - /// result. - /// Type of the orchestrator version profile list - /// result. - public OrchestratorVersionProfileListResult(IList orchestrators, string id = default(string), string name = default(string), string type = default(string)) + /// The list of OS options. + /// The ID of the OS option resource. + /// The name of the OS option resource. + /// The type of the OS option resource. + public OSOptionProfile(IList osOptionPropertyList, string id = default(string), string name = default(string), string type = default(string)) { Id = id; Name = name; Type = type; - Orchestrators = orchestrators; + OsOptionPropertyList = osOptionPropertyList; CustomInit(); } @@ -59,28 +53,28 @@ public OrchestratorVersionProfileListResult() partial void CustomInit(); /// - /// Gets id of the orchestrator version profile list result. + /// Gets the ID of the OS option resource. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets name of the orchestrator version profile list result. + /// Gets the name of the OS option resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets type of the orchestrator version profile list result. + /// Gets the type of the OS option resource. /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } /// - /// Gets or sets list of orchestrator version profiles. + /// Gets or sets the list of OS options. /// - [JsonProperty(PropertyName = "properties.orchestrators")] - public IList Orchestrators { get; set; } + [JsonProperty(PropertyName = "properties.osOptionPropertyList")] + public IList OsOptionPropertyList { get; set; } /// /// Validate the object. @@ -90,13 +84,13 @@ public OrchestratorVersionProfileListResult() /// public virtual void Validate() { - if (Orchestrators == null) + if (OsOptionPropertyList == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Orchestrators"); + throw new ValidationException(ValidationRules.CannotBeNull, "OsOptionPropertyList"); } - if (Orchestrators != null) + if (OsOptionPropertyList != null) { - foreach (var element in Orchestrators) + foreach (var element in OsOptionPropertyList) { if (element != null) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceCustomProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProperty.cs similarity index 57% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceCustomProfile.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProperty.cs index e93206ba780ba..2a1f78b1443a8 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceCustomProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSOptionProperty.cs @@ -15,28 +15,28 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Properties to configure a custom container service cluster. + /// OS option property. /// - public partial class ContainerServiceCustomProfile + public partial class OSOptionProperty { /// - /// Initializes a new instance of the ContainerServiceCustomProfile - /// class. + /// Initializes a new instance of the OSOptionProperty class. /// - public ContainerServiceCustomProfile() + public OSOptionProperty() { CustomInit(); } /// - /// Initializes a new instance of the ContainerServiceCustomProfile - /// class. + /// Initializes a new instance of the OSOptionProperty class. /// - /// The name of the custom orchestrator to - /// use. - public ContainerServiceCustomProfile(string orchestrator) + /// The OS type. + /// Whether the image is + /// FIPS-enabled. + public OSOptionProperty(string osType, bool enableFipsImage) { - Orchestrator = orchestrator; + OsType = osType; + EnableFipsImage = enableFipsImage; CustomInit(); } @@ -46,10 +46,16 @@ public ContainerServiceCustomProfile(string orchestrator) partial void CustomInit(); /// - /// Gets or sets the name of the custom orchestrator to use. + /// Gets or sets the OS type. /// - [JsonProperty(PropertyName = "orchestrator")] - public string Orchestrator { get; set; } + [JsonProperty(PropertyName = "os-type")] + public string OsType { get; set; } + + /// + /// Gets or sets whether the image is FIPS-enabled. + /// + [JsonProperty(PropertyName = "enable-fips-image")] + public bool EnableFipsImage { get; set; } /// /// Validate the object. @@ -59,9 +65,9 @@ public ContainerServiceCustomProfile(string orchestrator) /// public virtual void Validate() { - if (Orchestrator == null) + if (OsType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Orchestrator"); + throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSSKU.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSSKU.cs new file mode 100644 index 0000000000000..f6ded12604b1a --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSSKU.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 OSSKU. + /// + public static class OSSKU + { + public const string Ubuntu = "Ubuntu"; + public const string CBLMariner = "CBLMariner"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSType.cs index 695e5437f0a8a..6d35fe09e7e66 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OSType.cs @@ -16,7 +16,13 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class OSType { + /// + /// Use Linux. + /// public const string Linux = "Linux"; + /// + /// Use Windows. + /// public const string Windows = "Windows"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftContainerServiceVMSize.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftContainerServiceVMSize.cs deleted file mode 100644 index 0d653547c949c..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftContainerServiceVMSize.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - - /// - /// Defines values for OpenShiftContainerServiceVMSize. - /// - public static class OpenShiftContainerServiceVMSize - { - public const string StandardD2sV3 = "Standard_D2s_v3"; - public const string StandardD4sV3 = "Standard_D4s_v3"; - public const string StandardD8sV3 = "Standard_D8s_v3"; - public const string StandardD16sV3 = "Standard_D16s_v3"; - public const string StandardD32sV3 = "Standard_D32s_v3"; - public const string StandardD64sV3 = "Standard_D64s_v3"; - public const string StandardDS4V2 = "Standard_DS4_v2"; - public const string StandardDS5V2 = "Standard_DS5_v2"; - public const string StandardF8sV2 = "Standard_F8s_v2"; - public const string StandardF16sV2 = "Standard_F16s_v2"; - public const string StandardF32sV2 = "Standard_F32s_v2"; - public const string StandardF64sV2 = "Standard_F64s_v2"; - public const string StandardF72sV2 = "Standard_F72s_v2"; - public const string StandardF8s = "Standard_F8s"; - public const string StandardF16s = "Standard_F16s"; - public const string StandardE4sV3 = "Standard_E4s_v3"; - public const string StandardE8sV3 = "Standard_E8s_v3"; - public const string StandardE16sV3 = "Standard_E16s_v3"; - public const string StandardE20sV3 = "Standard_E20s_v3"; - public const string StandardE32sV3 = "Standard_E32s_v3"; - public const string StandardE64sV3 = "Standard_E64s_v3"; - public const string StandardGS2 = "Standard_GS2"; - public const string StandardGS3 = "Standard_GS3"; - public const string StandardGS4 = "Standard_GS4"; - public const string StandardGS5 = "Standard_GS5"; - public const string StandardDS12V2 = "Standard_DS12_v2"; - public const string StandardDS13V2 = "Standard_DS13_v2"; - public const string StandardDS14V2 = "Standard_DS14_v2"; - public const string StandardDS15V2 = "Standard_DS15_v2"; - public const string StandardL4s = "Standard_L4s"; - public const string StandardL8s = "Standard_L8s"; - public const string StandardL16s = "Standard_L16s"; - public const string StandardL32s = "Standard_L32s"; - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedCluster.cs deleted file mode 100644 index fd9eb0ea52817..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedCluster.cs +++ /dev/null @@ -1,185 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// OpenShift Managed cluster. - /// - [Rest.Serialization.JsonTransformation] - public partial class OpenShiftManagedCluster : Resource - { - /// - /// Initializes a new instance of the OpenShiftManagedCluster class. - /// - public OpenShiftManagedCluster() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenShiftManagedCluster class. - /// - /// Resource location - /// Version of OpenShift specified when - /// creating the cluster. - /// Resource Id - /// Resource name - /// Resource type - /// Resource tags - /// Define the resource plan as required by ARM for - /// billing purposes - /// The current deployment or - /// provisioning state, which only appears in the response. - /// Version of OpenShift specified when - /// creating the cluster. - /// Service generated FQDN for OpenShift - /// API server. - /// Service generated FQDN for OpenShift API server - /// loadbalancer internal hostname. - /// Configuration for OpenShift - /// networking. - /// Configuration for OpenShift - /// router(s). - /// Configuration for OpenShift master - /// VMs. - /// Configuration of OpenShift cluster - /// VMs. - /// Configures OpenShift - /// authentication. - public OpenShiftManagedCluster(string location, string openShiftVersion, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), PurchasePlan plan = default(PurchasePlan), string provisioningState = default(string), string clusterVersion = default(string), string publicHostname = default(string), string fqdn = default(string), NetworkProfile networkProfile = default(NetworkProfile), IList routerProfiles = default(IList), OpenShiftManagedClusterMasterPoolProfile masterPoolProfile = default(OpenShiftManagedClusterMasterPoolProfile), IList agentPoolProfiles = default(IList), OpenShiftManagedClusterAuthProfile authProfile = default(OpenShiftManagedClusterAuthProfile)) - : base(location, id, name, type, tags) - { - Plan = plan; - ProvisioningState = provisioningState; - OpenShiftVersion = openShiftVersion; - ClusterVersion = clusterVersion; - PublicHostname = publicHostname; - Fqdn = fqdn; - NetworkProfile = networkProfile; - RouterProfiles = routerProfiles; - MasterPoolProfile = masterPoolProfile; - AgentPoolProfiles = agentPoolProfiles; - AuthProfile = authProfile; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets define the resource plan as required by ARM for - /// billing purposes - /// - [JsonProperty(PropertyName = "plan")] - public PurchasePlan Plan { get; set; } - - /// - /// Gets the current deployment or provisioning state, which only - /// appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets version of OpenShift specified when creating the - /// cluster. - /// - [JsonProperty(PropertyName = "properties.openShiftVersion")] - public string OpenShiftVersion { get; set; } - - /// - /// Gets version of OpenShift specified when creating the cluster. - /// - [JsonProperty(PropertyName = "properties.clusterVersion")] - public string ClusterVersion { get; private set; } - - /// - /// Gets service generated FQDN for OpenShift API server. - /// - [JsonProperty(PropertyName = "properties.publicHostname")] - public string PublicHostname { get; private set; } - - /// - /// Gets service generated FQDN for OpenShift API server loadbalancer - /// internal hostname. - /// - [JsonProperty(PropertyName = "properties.fqdn")] - public string Fqdn { get; private set; } - - /// - /// Gets or sets configuration for OpenShift networking. - /// - [JsonProperty(PropertyName = "properties.networkProfile")] - public NetworkProfile NetworkProfile { get; set; } - - /// - /// Gets or sets configuration for OpenShift router(s). - /// - [JsonProperty(PropertyName = "properties.routerProfiles")] - public IList RouterProfiles { get; set; } - - /// - /// Gets or sets configuration for OpenShift master VMs. - /// - [JsonProperty(PropertyName = "properties.masterPoolProfile")] - public OpenShiftManagedClusterMasterPoolProfile MasterPoolProfile { get; set; } - - /// - /// Gets or sets configuration of OpenShift cluster VMs. - /// - [JsonProperty(PropertyName = "properties.agentPoolProfiles")] - public IList AgentPoolProfiles { get; set; } - - /// - /// Gets or sets configures OpenShift authentication. - /// - [JsonProperty(PropertyName = "properties.authProfile")] - public OpenShiftManagedClusterAuthProfile AuthProfile { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (OpenShiftVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OpenShiftVersion"); - } - if (MasterPoolProfile != null) - { - MasterPoolProfile.Validate(); - } - if (AgentPoolProfiles != null) - { - foreach (var element in AgentPoolProfiles) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAADIdentityProvider.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAADIdentityProvider.cs deleted file mode 100644 index 2a7a57e11a6fe..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAADIdentityProvider.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines the Identity provider for MS AAD. - /// - [Newtonsoft.Json.JsonObject("AADIdentityProvider")] - public partial class OpenShiftManagedClusterAADIdentityProvider : OpenShiftManagedClusterBaseIdentityProvider - { - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAADIdentityProvider class. - /// - public OpenShiftManagedClusterAADIdentityProvider() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAADIdentityProvider class. - /// - /// The clientId password associated with the - /// provider. - /// The secret password associated with the - /// provider. - /// The tenantId associated with the - /// provider. - /// The groupId to be granted - /// cluster admin role. - public OpenShiftManagedClusterAADIdentityProvider(string clientId = default(string), string secret = default(string), string tenantId = default(string), string customerAdminGroupId = default(string)) - { - ClientId = clientId; - Secret = secret; - TenantId = tenantId; - CustomerAdminGroupId = customerAdminGroupId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the clientId password associated with the provider. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the secret password associated with the provider. - /// - [JsonProperty(PropertyName = "secret")] - public string Secret { get; set; } - - /// - /// Gets or sets the tenantId associated with the provider. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the groupId to be granted cluster admin role. - /// - [JsonProperty(PropertyName = "customerAdminGroupId")] - public string CustomerAdminGroupId { get; set; } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAgentPoolProfile.cs deleted file mode 100644 index 49276b1bd7d8e..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAgentPoolProfile.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines the configuration of the OpenShift cluster VMs. - /// - public partial class OpenShiftManagedClusterAgentPoolProfile - { - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAgentPoolProfile class. - /// - public OpenShiftManagedClusterAgentPoolProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAgentPoolProfile class. - /// - /// Unique name of the pool profile in the context - /// of the subscription and resource group. - /// Number of agents (VMs) to host docker - /// containers. - /// Size of agent VMs. Possible values include: - /// 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - /// 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - /// 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', - /// 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', - /// 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', - /// 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - /// 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - /// 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - /// 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_L16s', 'Standard_L32s' - /// Subnet CIDR for the peering. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// Define the role of the AgentPoolProfile. - /// Possible values include: 'compute', 'infra' - public OpenShiftManagedClusterAgentPoolProfile(string name, int count, string vmSize, string subnetCidr = default(string), string osType = default(string), string role = default(string)) - { - Name = name; - Count = count; - VmSize = vmSize; - SubnetCidr = subnetCidr; - OsType = osType; - Role = role; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique name of the pool profile in the context of the - /// subscription and resource group. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets number of agents (VMs) to host docker containers. - /// - [JsonProperty(PropertyName = "count")] - public int Count { get; set; } - - /// - /// Gets or sets size of agent VMs. Possible values include: - /// 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - /// 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - /// 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', - /// 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', - /// 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', - /// 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - /// 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - /// 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - /// 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_L16s', 'Standard_L32s' - /// - [JsonProperty(PropertyName = "vmSize")] - public string VmSize { get; set; } - - /// - /// Gets or sets subnet CIDR for the peering. - /// - [JsonProperty(PropertyName = "subnetCidr")] - public string SubnetCidr { get; set; } - - /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - - /// - /// Gets or sets define the role of the AgentPoolProfile. Possible - /// values include: 'compute', 'infra' - /// - [JsonProperty(PropertyName = "role")] - public string Role { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (VmSize == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VmSize"); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterMasterPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterMasterPoolProfile.cs deleted file mode 100644 index 5568527bc6238..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterMasterPoolProfile.cs +++ /dev/null @@ -1,130 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// OpenShiftManagedClusterMaterPoolProfile contains configuration for - /// OpenShift master VMs. - /// - public partial class OpenShiftManagedClusterMasterPoolProfile - { - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterMasterPoolProfile class. - /// - public OpenShiftManagedClusterMasterPoolProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterMasterPoolProfile class. - /// - /// Number of masters (VMs) to host docker - /// containers. The default value is 3. - /// Size of agent VMs. Possible values include: - /// 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - /// 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - /// 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', - /// 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', - /// 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', - /// 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - /// 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - /// 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - /// 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_L16s', 'Standard_L32s' - /// Unique name of the master pool profile in the - /// context of the subscription and resource group. - /// Subnet CIDR for the peering. - /// OsType to be used to specify os type. Choose - /// from Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - public OpenShiftManagedClusterMasterPoolProfile(int count, string vmSize, string name = default(string), string subnetCidr = default(string), string osType = default(string)) - { - Name = name; - Count = count; - VmSize = vmSize; - SubnetCidr = subnetCidr; - OsType = osType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique name of the master pool profile in the context - /// of the subscription and resource group. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets number of masters (VMs) to host docker containers. The - /// default value is 3. - /// - [JsonProperty(PropertyName = "count")] - public int Count { get; set; } - - /// - /// Gets or sets size of agent VMs. Possible values include: - /// 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - /// 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - /// 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', - /// 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', - /// 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', - /// 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - /// 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - /// 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - /// 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - /// 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', - /// 'Standard_L16s', 'Standard_L32s' - /// - [JsonProperty(PropertyName = "vmSize")] - public string VmSize { get; set; } - - /// - /// Gets or sets subnet CIDR for the peering. - /// - [JsonProperty(PropertyName = "subnetCidr")] - public string SubnetCidr { get; set; } - - /// - /// Gets or sets osType to be used to specify os type. Choose from - /// Linux and Windows. Default to Linux. Possible values include: - /// 'Linux', 'Windows' - /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (VmSize == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VmSize"); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftRouterProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftRouterProfile.cs deleted file mode 100644 index bc985a75d8de8..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftRouterProfile.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents an OpenShift router - /// - public partial class OpenShiftRouterProfile - { - /// - /// Initializes a new instance of the OpenShiftRouterProfile class. - /// - public OpenShiftRouterProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenShiftRouterProfile class. - /// - /// Name of the router profile. - /// DNS subdomain for OpenShift - /// router. - /// Auto-allocated FQDN for the OpenShift - /// router. - public OpenShiftRouterProfile(string name = default(string), string publicSubdomain = default(string), string fqdn = default(string)) - { - Name = name; - PublicSubdomain = publicSubdomain; - Fqdn = fqdn; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the router profile. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets DNS subdomain for OpenShift router. - /// - [JsonProperty(PropertyName = "publicSubdomain")] - public string PublicSubdomain { get; private set; } - - /// - /// Gets auto-allocated FQDN for the OpenShift router. - /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OperationValue.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OperationValue.cs index c51daa2192e64..81d6eac850c07 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OperationValue.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OperationValue.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. /// [Rest.Serialization.JsonTransformation] public partial class OperationValue @@ -32,10 +32,9 @@ public OperationValue() /// /// Initializes a new instance of the OperationValue class. /// - /// The origin of the compute operation. - /// The name of the compute operation. - /// The display name of the compute - /// operation. + /// The origin of the operation. + /// The name of the operation. + /// The display name of the operation. /// The display name of the resource the /// operation applies to. /// The description of the operation. @@ -58,19 +57,19 @@ public OperationValue() partial void CustomInit(); /// - /// Gets the origin of the compute operation. + /// Gets the origin of the operation. /// [JsonProperty(PropertyName = "origin")] public string Origin { get; private set; } /// - /// Gets the name of the compute operation. + /// Gets the name of the operation. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets the display name of the compute operation. + /// Gets the display name of the operation. /// [JsonProperty(PropertyName = "display.operation")] public string Operation { get; private set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorProfile.cs deleted file mode 100644 index 1628d4cda06ba..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorProfile.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Contains information about orchestrator. - /// - public partial class OrchestratorProfile - { - /// - /// Initializes a new instance of the OrchestratorProfile class. - /// - public OrchestratorProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OrchestratorProfile class. - /// - /// Orchestrator version (major, - /// minor, patch). - /// Orchestrator type. - /// Whether Kubernetes version is currently in - /// preview. - public OrchestratorProfile(string orchestratorVersion, string orchestratorType = default(string), bool? isPreview = default(bool?)) - { - OrchestratorType = orchestratorType; - OrchestratorVersion = orchestratorVersion; - IsPreview = isPreview; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets orchestrator type. - /// - [JsonProperty(PropertyName = "orchestratorType")] - public string OrchestratorType { get; set; } - - /// - /// Gets or sets orchestrator version (major, minor, patch). - /// - [JsonProperty(PropertyName = "orchestratorVersion")] - public string OrchestratorVersion { get; set; } - - /// - /// Gets or sets whether Kubernetes version is currently in preview. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (OrchestratorVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorVersion"); - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfile.cs deleted file mode 100644 index 9edf7e175de69..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OrchestratorVersionProfile.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The profile of an orchestrator and its available versions. - /// - public partial class OrchestratorVersionProfile - { - /// - /// Initializes a new instance of the OrchestratorVersionProfile class. - /// - public OrchestratorVersionProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OrchestratorVersionProfile class. - /// - /// Orchestrator type. - /// Orchestrator version (major, - /// minor, patch). - /// Installed by default if version is - /// not specified. - /// Whether Kubernetes version is currently in - /// preview. - /// The list of available upgrade - /// versions. - public OrchestratorVersionProfile(string orchestratorType, string orchestratorVersion, bool? defaultProperty = default(bool?), bool? isPreview = default(bool?), IList upgrades = default(IList)) - { - OrchestratorType = orchestratorType; - OrchestratorVersion = orchestratorVersion; - DefaultProperty = defaultProperty; - IsPreview = isPreview; - Upgrades = upgrades; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets orchestrator type. - /// - [JsonProperty(PropertyName = "orchestratorType")] - public string OrchestratorType { get; set; } - - /// - /// Gets or sets orchestrator version (major, minor, patch). - /// - [JsonProperty(PropertyName = "orchestratorVersion")] - public string OrchestratorVersion { get; set; } - - /// - /// Gets or sets installed by default if version is not specified. - /// - [JsonProperty(PropertyName = "default")] - public bool? DefaultProperty { get; set; } - - /// - /// Gets or sets whether Kubernetes version is currently in preview. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - - /// - /// Gets or sets the list of available upgrade versions. - /// - [JsonProperty(PropertyName = "upgrades")] - public IList Upgrades { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (OrchestratorType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorType"); - } - if (OrchestratorVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorVersion"); - } - if (Upgrades != null) - { - foreach (var element in Upgrades) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundEnvironmentEndpoint.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundEnvironmentEndpoint.cs new file mode 100644 index 0000000000000..e2753287908bb --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundEnvironmentEndpoint.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Egress endpoints which AKS agent nodes connect to for common purpose. + /// + public partial class OutboundEnvironmentEndpoint + { + /// + /// Initializes a new instance of the OutboundEnvironmentEndpoint + /// class. + /// + public OutboundEnvironmentEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OutboundEnvironmentEndpoint + /// class. + /// + /// The category of endpoints accessed by the + /// AKS agent node, e.g. azure-resource-management, apiserver, + /// etc. + /// The endpoints that AKS agent nodes connect + /// to + public OutboundEnvironmentEndpoint(string category = default(string), IList endpoints = default(IList)) + { + Category = category; + Endpoints = endpoints; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the category of endpoints accessed by the AKS agent + /// node, e.g. azure-resource-management, apiserver, etc. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets the endpoints that AKS agent nodes connect to + /// + [JsonProperty(PropertyName = "endpoints")] + public IList Endpoints { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs index 642cefaa5d57a..05228ab50febc 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs @@ -16,7 +16,19 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class OutboundType { + /// + /// The load balancer is used for egress through an AKS assigned public + /// IP. This supports Kubernetes services of type 'loadBalancer'. For + /// more information see [outbound type + /// loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer). + /// public const string LoadBalancer = "loadBalancer"; + /// + /// Egress paths must be defined by the user. This is an advanced + /// scenario and requires proper network configuration. For more + /// information see [outbound type + /// userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting). + /// public const string UserDefinedRouting = "userDefinedRouting"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page.cs index 98d1c735adfb5..b3544b8d9dc9f 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page.cs @@ -26,7 +26,7 @@ public class Page : IPage /// /// Gets the link to the next page. /// - [JsonProperty("nextLink")] + [JsonProperty("")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page1.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page1.cs index 12800e406b6ed..dcebab5291e6a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page1.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Page1.cs @@ -26,7 +26,7 @@ public class Page1 : IPage /// /// Gets the link to the next page. /// - [JsonProperty("")] + [JsonProperty("nextLink")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs new file mode 100644 index 0000000000000..bc3c17706c5b6 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PowerState.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes the Power State of the cluster + /// + public partial class PowerState + { + /// + /// Initializes a new instance of the PowerState class. + /// + public PowerState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PowerState class. + /// + /// Tells whether the cluster is Running or Stopped. + /// Possible values include: 'Running', 'Stopped' + public PowerState(string code = default(string)) + { + Code = code; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets tells whether the cluster is Running or Stopped. + /// Possible values include: 'Running', 'Stopped' + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs index ebc2b08ac7c5c..12431449470b0 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs @@ -29,7 +29,7 @@ public PrivateEndpoint() /// /// Initializes a new instance of the PrivateEndpoint class. /// - /// The resource Id for private endpoint + /// The resource ID of the private endpoint public PrivateEndpoint(string id = default(string)) { Id = id; @@ -42,7 +42,7 @@ public PrivateEndpoint() partial void CustomInit(); /// - /// Gets or sets the resource Id for private endpoint + /// Gets or sets the resource ID of the private endpoint /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 0000000000000..e4be39832f5fa --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResource.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A private link resource + /// + public partial class PrivateLinkResource + { + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + public PrivateLinkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + /// The ID of the private link resource. + /// The name of the private link resource. + /// The resource type. + /// The group ID of the resource. + /// The RequiredMembers of the + /// resource + /// The private link service ID of + /// the resource, this field is exposed only to NRP internally. + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), string privateLinkServiceID = default(string)) + { + Id = id; + Name = name; + Type = type; + GroupId = groupId; + RequiredMembers = requiredMembers; + PrivateLinkServiceID = privateLinkServiceID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of the private link resource. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the name of the private link resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the group ID of the resource. + /// + [JsonProperty(PropertyName = "groupId")] + public string GroupId { get; set; } + + /// + /// Gets or sets the RequiredMembers of the resource + /// + [JsonProperty(PropertyName = "requiredMembers")] + public IList RequiredMembers { get; set; } + + /// + /// Gets the private link service ID of the resource, this field is + /// exposed only to NRP internally. + /// + [JsonProperty(PropertyName = "privateLinkServiceID")] + public string PrivateLinkServiceID { get; private set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAuthProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs similarity index 51% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAuthProfile.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs index 744333264090b..87267651779d9 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OpenShiftManagedClusterAuthProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkResourcesListResult.cs @@ -16,28 +16,27 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Defines all possible authentication profiles for the OpenShift cluster. + /// A list of private link resources /// - public partial class OpenShiftManagedClusterAuthProfile + public partial class PrivateLinkResourcesListResult { /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAuthProfile class. + /// Initializes a new instance of the PrivateLinkResourcesListResult + /// class. /// - public OpenShiftManagedClusterAuthProfile() + public PrivateLinkResourcesListResult() { CustomInit(); } /// - /// Initializes a new instance of the - /// OpenShiftManagedClusterAuthProfile class. + /// Initializes a new instance of the PrivateLinkResourcesListResult + /// class. /// - /// Type of authentication profile to - /// use. - public OpenShiftManagedClusterAuthProfile(IList identityProviders = default(IList)) + /// The collection value. + public PrivateLinkResourcesListResult(IList value = default(IList)) { - IdentityProviders = identityProviders; + Value = value; CustomInit(); } @@ -47,10 +46,10 @@ public OpenShiftManagedClusterAuthProfile() partial void CustomInit(); /// - /// Gets or sets type of authentication profile to use. + /// Gets or sets the collection value. /// - [JsonProperty(PropertyName = "identityProviders")] - public IList IdentityProviders { get; set; } + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PurchasePlan.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PurchasePlan.cs deleted file mode 100644 index 1652d53115674..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PurchasePlan.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Used for establishing the purchase context of any 3rd Party artifact - /// through MarketPlace. - /// - public partial class PurchasePlan - { - /// - /// Initializes a new instance of the PurchasePlan class. - /// - public PurchasePlan() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PurchasePlan class. - /// - /// The plan ID. - /// Specifies the product of the image from the - /// marketplace. This is the same value as Offer under the - /// imageReference element. - /// The promotion code. - /// The plan ID. - public PurchasePlan(string name = default(string), string product = default(string), string promotionCode = default(string), string publisher = default(string)) - { - Name = name; - Product = product; - PromotionCode = promotionCode; - Publisher = publisher; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the plan ID. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets specifies the product of the image from the - /// marketplace. This is the same value as Offer under the - /// imageReference element. - /// - [JsonProperty(PropertyName = "product")] - public string Product { get; set; } - - /// - /// Gets or sets the promotion code. - /// - [JsonProperty(PropertyName = "promotionCode")] - public string PromotionCode { get; set; } - - /// - /// Gets or sets the plan ID. - /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } - - } -} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs index 6a35a334beff6..09500275894a7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs @@ -21,10 +21,26 @@ namespace Microsoft.Azure.Management.ContainerService.Models [JsonConverter(typeof(StringEnumConverter))] public enum ResourceIdentityType { + /// + /// Use an implicitly created system assigned managed identity to + /// manage cluster resources. Master components in the control plane + /// such as kube-controller-manager will use the system assigned + /// managed identity to manipulate Azure resources. + /// [EnumMember(Value = "SystemAssigned")] SystemAssigned, + /// + /// Use a user-specified identity to manage cluster resources. Master + /// components in the control plane such as kube-controller-manager + /// will use the specified user assigned managed identity to manipulate + /// Azure resources. + /// [EnumMember(Value = "UserAssigned")] UserAssigned, + /// + /// Do not use a managed identity for the Managed Cluster, service + /// principal will be used instead. + /// [EnumMember(Value = "None")] None } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KeyVaultSecretRef.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandRequest.cs similarity index 51% rename from sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KeyVaultSecretRef.cs rename to sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandRequest.cs index 25a0fdc259b5b..c80f3b4ccf980 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/KeyVaultSecretRef.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandRequest.cs @@ -15,29 +15,31 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// Reference to a secret stored in Azure Key Vault. + /// A run command request /// - public partial class KeyVaultSecretRef + public partial class RunCommandRequest { /// - /// Initializes a new instance of the KeyVaultSecretRef class. + /// Initializes a new instance of the RunCommandRequest class. /// - public KeyVaultSecretRef() + public RunCommandRequest() { CustomInit(); } /// - /// Initializes a new instance of the KeyVaultSecretRef class. + /// Initializes a new instance of the RunCommandRequest class. /// - /// Key vault identifier. - /// The secret name. - /// The secret version. - public KeyVaultSecretRef(string vaultID, string secretName, string version = default(string)) + /// The command to run. + /// A base64 encoded zip file containing the + /// files required by the command. + /// AuthToken issued for AKS AAD Server + /// App. + public RunCommandRequest(string command, string context = default(string), string clusterToken = default(string)) { - VaultID = vaultID; - SecretName = secretName; - Version = version; + Command = command; + Context = context; + ClusterToken = clusterToken; CustomInit(); } @@ -47,22 +49,23 @@ public KeyVaultSecretRef() partial void CustomInit(); /// - /// Gets or sets key vault identifier. + /// Gets or sets the command to run. /// - [JsonProperty(PropertyName = "vaultID")] - public string VaultID { get; set; } + [JsonProperty(PropertyName = "command")] + public string Command { get; set; } /// - /// Gets or sets the secret name. + /// Gets or sets a base64 encoded zip file containing the files + /// required by the command. /// - [JsonProperty(PropertyName = "secretName")] - public string SecretName { get; set; } + [JsonProperty(PropertyName = "context")] + public string Context { get; set; } /// - /// Gets or sets the secret version. + /// Gets or sets authToken issued for AKS AAD Server App. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } + [JsonProperty(PropertyName = "clusterToken")] + public string ClusterToken { get; set; } /// /// Validate the object. @@ -72,13 +75,9 @@ public KeyVaultSecretRef() /// public virtual void Validate() { - if (VaultID == null) + if (Command == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "VaultID"); - } - if (SecretName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SecretName"); + throw new ValidationException(ValidationRules.CannotBeNull, "Command"); } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandResult.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandResult.cs new file mode 100644 index 0000000000000..9691747beff60 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/RunCommandResult.cs @@ -0,0 +1,105 @@ +// +// 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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// run command result. + /// + [Rest.Serialization.JsonTransformation] + public partial class RunCommandResult + { + /// + /// Initializes a new instance of the RunCommandResult class. + /// + public RunCommandResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunCommandResult class. + /// + /// The command id. + /// provisioning State + /// The exit code of the command + /// The time when the command started. + /// The time when the command + /// finished. + /// The command output. + /// An explanation of why provisioningState is set + /// to failed (if so). + public RunCommandResult(string id = default(string), string provisioningState = default(string), int? exitCode = default(int?), System.DateTime? startedAt = default(System.DateTime?), System.DateTime? finishedAt = default(System.DateTime?), string logs = default(string), string reason = default(string)) + { + Id = id; + ProvisioningState = provisioningState; + ExitCode = exitCode; + StartedAt = startedAt; + FinishedAt = finishedAt; + Logs = logs; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the command id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets provisioning State + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets the exit code of the command + /// + [JsonProperty(PropertyName = "properties.exitCode")] + public int? ExitCode { get; private set; } + + /// + /// Gets the time when the command started. + /// + [JsonProperty(PropertyName = "properties.startedAt")] + public System.DateTime? StartedAt { get; private set; } + + /// + /// Gets the time when the command finished. + /// + [JsonProperty(PropertyName = "properties.finishedAt")] + public System.DateTime? FinishedAt { get; private set; } + + /// + /// Gets the command output. + /// + [JsonProperty(PropertyName = "properties.logs")] + public string Logs { get; private set; } + + /// + /// Gets an explanation of why provisioningState is set to failed (if + /// so). + /// + [JsonProperty(PropertyName = "properties.reason")] + public string Reason { get; private set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs index 25bd3db49c442..a2b60d02b0555 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs @@ -16,7 +16,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class ScaleSetEvictionPolicy { + /// + /// Nodes in the underlying Scale Set of the node pool are deleted when + /// they're evicted. + /// public const string Delete = "Delete"; + /// + /// Nodes in the underlying Scale Set of the node pool are set to the + /// stopped-deallocated state upon eviction. Nodes in the + /// stopped-deallocated state count against your compute quota and can + /// cause issues with cluster scaling or upgrading. + /// public const string Deallocate = "Deallocate"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs index 6fdb73455a4ef..2decb2bbf6536 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs @@ -16,7 +16,15 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class ScaleSetPriority { + /// + /// Spot priority VMs will be used. There is no SLA for spot nodes. See + /// [spot on AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) + /// for more information. + /// public const string Spot = "Spot"; + /// + /// Regular VMs will be used. + /// public const string Regular = "Regular"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SysctlConfig.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SysctlConfig.cs new file mode 100644 index 0000000000000..c97dba97e866f --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SysctlConfig.cs @@ -0,0 +1,291 @@ +// +// 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; + + /// + /// Sysctl settings for Linux agent nodes. + /// + public partial class SysctlConfig + { + /// + /// Initializes a new instance of the SysctlConfig class. + /// + public SysctlConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SysctlConfig class. + /// + /// Sysctl setting + /// net.core.somaxconn. + /// Sysctl setting + /// net.core.netdev_max_backlog. + /// Sysctl setting + /// net.core.rmem_default. + /// Sysctl setting + /// net.core.rmem_max. + /// Sysctl setting + /// net.core.wmem_default. + /// Sysctl setting + /// net.core.wmem_max. + /// Sysctl setting + /// net.core.optmem_max. + /// Sysctl setting + /// net.ipv4.tcp_max_syn_backlog. + /// Sysctl setting + /// net.ipv4.tcp_max_tw_buckets. + /// Sysctl setting + /// net.ipv4.tcp_fin_timeout. + /// Sysctl setting + /// net.ipv4.tcp_keepalive_time. + /// Sysctl setting + /// net.ipv4.tcp_keepalive_probes. + /// Sysctl setting + /// net.ipv4.tcp_keepalive_intvl. + /// Sysctl setting + /// net.ipv4.tcp_tw_reuse. + /// Sysctl setting + /// net.ipv4.ip_local_port_range. + /// Sysctl setting + /// net.ipv4.neigh.default.gc_thresh1. + /// Sysctl setting + /// net.ipv4.neigh.default.gc_thresh2. + /// Sysctl setting + /// net.ipv4.neigh.default.gc_thresh3. + /// Sysctl setting + /// net.netfilter.nf_conntrack_max. + /// Sysctl setting + /// net.netfilter.nf_conntrack_buckets. + /// Sysctl setting + /// fs.inotify.max_user_watches. + /// Sysctl setting fs.file-max. + /// Sysctl setting fs.aio-max-nr. + /// Sysctl setting fs.nr_open. + /// Sysctl setting + /// kernel.threads-max. + /// Sysctl setting + /// vm.max_map_count. + /// Sysctl setting vm.swappiness. + /// Sysctl setting + /// vm.vfs_cache_pressure. + public SysctlConfig(int? netCoreSomaxconn = default(int?), int? netCoreNetdevMaxBacklog = default(int?), int? netCoreRmemDefault = default(int?), int? netCoreRmemMax = default(int?), int? netCoreWmemDefault = default(int?), int? netCoreWmemMax = default(int?), int? netCoreOptmemMax = default(int?), int? netIpv4TcpMaxSynBacklog = default(int?), int? netIpv4TcpMaxTwBuckets = default(int?), int? netIpv4TcpFinTimeout = default(int?), int? netIpv4TcpKeepaliveTime = default(int?), int? netIpv4TcpKeepaliveProbes = default(int?), int? netIpv4TcpkeepaliveIntvl = default(int?), bool? netIpv4TcpTwReuse = default(bool?), string netIpv4IpLocalPortRange = default(string), int? netIpv4NeighDefaultGcThresh1 = default(int?), int? netIpv4NeighDefaultGcThresh2 = default(int?), int? netIpv4NeighDefaultGcThresh3 = default(int?), int? netNetfilterNfConntrackMax = default(int?), int? netNetfilterNfConntrackBuckets = default(int?), int? fsInotifyMaxUserWatches = default(int?), int? fsFileMax = default(int?), int? fsAioMaxNr = default(int?), int? fsNrOpen = default(int?), int? kernelThreadsMax = default(int?), int? vmMaxMapCount = default(int?), int? vmSwappiness = default(int?), int? vmVfsCachePressure = default(int?)) + { + NetCoreSomaxconn = netCoreSomaxconn; + NetCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; + NetCoreRmemDefault = netCoreRmemDefault; + NetCoreRmemMax = netCoreRmemMax; + NetCoreWmemDefault = netCoreWmemDefault; + NetCoreWmemMax = netCoreWmemMax; + NetCoreOptmemMax = netCoreOptmemMax; + NetIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; + NetIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; + NetIpv4TcpFinTimeout = netIpv4TcpFinTimeout; + NetIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; + NetIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; + NetIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; + NetIpv4TcpTwReuse = netIpv4TcpTwReuse; + NetIpv4IpLocalPortRange = netIpv4IpLocalPortRange; + NetIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; + NetIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; + NetIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; + NetNetfilterNfConntrackMax = netNetfilterNfConntrackMax; + NetNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; + FsInotifyMaxUserWatches = fsInotifyMaxUserWatches; + FsFileMax = fsFileMax; + FsAioMaxNr = fsAioMaxNr; + FsNrOpen = fsNrOpen; + KernelThreadsMax = kernelThreadsMax; + VmMaxMapCount = vmMaxMapCount; + VmSwappiness = vmSwappiness; + VmVfsCachePressure = vmVfsCachePressure; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets sysctl setting net.core.somaxconn. + /// + [JsonProperty(PropertyName = "netCoreSomaxconn")] + public int? NetCoreSomaxconn { get; set; } + + /// + /// Gets or sets sysctl setting net.core.netdev_max_backlog. + /// + [JsonProperty(PropertyName = "netCoreNetdevMaxBacklog")] + public int? NetCoreNetdevMaxBacklog { get; set; } + + /// + /// Gets or sets sysctl setting net.core.rmem_default. + /// + [JsonProperty(PropertyName = "netCoreRmemDefault")] + public int? NetCoreRmemDefault { get; set; } + + /// + /// Gets or sets sysctl setting net.core.rmem_max. + /// + [JsonProperty(PropertyName = "netCoreRmemMax")] + public int? NetCoreRmemMax { get; set; } + + /// + /// Gets or sets sysctl setting net.core.wmem_default. + /// + [JsonProperty(PropertyName = "netCoreWmemDefault")] + public int? NetCoreWmemDefault { get; set; } + + /// + /// Gets or sets sysctl setting net.core.wmem_max. + /// + [JsonProperty(PropertyName = "netCoreWmemMax")] + public int? NetCoreWmemMax { get; set; } + + /// + /// Gets or sets sysctl setting net.core.optmem_max. + /// + [JsonProperty(PropertyName = "netCoreOptmemMax")] + public int? NetCoreOptmemMax { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_max_syn_backlog. + /// + [JsonProperty(PropertyName = "netIpv4TcpMaxSynBacklog")] + public int? NetIpv4TcpMaxSynBacklog { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_max_tw_buckets. + /// + [JsonProperty(PropertyName = "netIpv4TcpMaxTwBuckets")] + public int? NetIpv4TcpMaxTwBuckets { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_fin_timeout. + /// + [JsonProperty(PropertyName = "netIpv4TcpFinTimeout")] + public int? NetIpv4TcpFinTimeout { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_time. + /// + [JsonProperty(PropertyName = "netIpv4TcpKeepaliveTime")] + public int? NetIpv4TcpKeepaliveTime { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_probes. + /// + [JsonProperty(PropertyName = "netIpv4TcpKeepaliveProbes")] + public int? NetIpv4TcpKeepaliveProbes { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_intvl. + /// + [JsonProperty(PropertyName = "netIpv4TcpkeepaliveIntvl")] + public int? NetIpv4TcpkeepaliveIntvl { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.tcp_tw_reuse. + /// + [JsonProperty(PropertyName = "netIpv4TcpTwReuse")] + public bool? NetIpv4TcpTwReuse { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.ip_local_port_range. + /// + [JsonProperty(PropertyName = "netIpv4IpLocalPortRange")] + public string NetIpv4IpLocalPortRange { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh1. + /// + [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh1")] + public int? NetIpv4NeighDefaultGcThresh1 { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh2. + /// + [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh2")] + public int? NetIpv4NeighDefaultGcThresh2 { get; set; } + + /// + /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh3. + /// + [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh3")] + public int? NetIpv4NeighDefaultGcThresh3 { get; set; } + + /// + /// Gets or sets sysctl setting net.netfilter.nf_conntrack_max. + /// + [JsonProperty(PropertyName = "netNetfilterNfConntrackMax")] + public int? NetNetfilterNfConntrackMax { get; set; } + + /// + /// Gets or sets sysctl setting net.netfilter.nf_conntrack_buckets. + /// + [JsonProperty(PropertyName = "netNetfilterNfConntrackBuckets")] + public int? NetNetfilterNfConntrackBuckets { get; set; } + + /// + /// Gets or sets sysctl setting fs.inotify.max_user_watches. + /// + [JsonProperty(PropertyName = "fsInotifyMaxUserWatches")] + public int? FsInotifyMaxUserWatches { get; set; } + + /// + /// Gets or sets sysctl setting fs.file-max. + /// + [JsonProperty(PropertyName = "fsFileMax")] + public int? FsFileMax { get; set; } + + /// + /// Gets or sets sysctl setting fs.aio-max-nr. + /// + [JsonProperty(PropertyName = "fsAioMaxNr")] + public int? FsAioMaxNr { get; set; } + + /// + /// Gets or sets sysctl setting fs.nr_open. + /// + [JsonProperty(PropertyName = "fsNrOpen")] + public int? FsNrOpen { get; set; } + + /// + /// Gets or sets sysctl setting kernel.threads-max. + /// + [JsonProperty(PropertyName = "kernelThreadsMax")] + public int? KernelThreadsMax { get; set; } + + /// + /// Gets or sets sysctl setting vm.max_map_count. + /// + [JsonProperty(PropertyName = "vmMaxMapCount")] + public int? VmMaxMapCount { get; set; } + + /// + /// Gets or sets sysctl setting vm.swappiness. + /// + [JsonProperty(PropertyName = "vmSwappiness")] + public int? VmSwappiness { get; set; } + + /// + /// Gets or sets sysctl setting vm.vfs_cache_pressure. + /// + [JsonProperty(PropertyName = "vmVfsCachePressure")] + public int? VmVfsCachePressure { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs new file mode 100644 index 0000000000000..c553ddd7e5026 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs @@ -0,0 +1,103 @@ +// +// 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; + + /// + /// Metadata pertaining to creation and last modification of the resource. + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// The identity that created the + /// resource. + /// The type of identity that created the + /// resource. Possible values include: 'User', 'Application', + /// 'ManagedIdentity', 'Key' + /// The UTC timestamp of resource + /// creation. + /// The identity that last modified the + /// resource. + /// The type of identity that last + /// modified the resource. Possible values include: 'User', + /// 'Application', 'ManagedIdentity', 'Key' + /// The type of identity that last + /// modified the resource. + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity that created the resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; set; } + + /// + /// Gets or sets the type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; set; } + + /// + /// Gets or sets the UTC timestamp of resource creation. + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; set; } + + /// + /// Gets or sets the identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeInWeek.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeInWeek.cs new file mode 100644 index 0000000000000..18570e995d9e1 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeInWeek.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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Time in a week. + /// + public partial class TimeInWeek + { + /// + /// Initializes a new instance of the TimeInWeek class. + /// + public TimeInWeek() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TimeInWeek class. + /// + /// The day of the week. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// A list of hours in the day used to identify + /// a time range. + public TimeInWeek(string day = default(string), IList hourSlots = default(IList)) + { + Day = day; + HourSlots = hourSlots; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the day of the week. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// + [JsonProperty(PropertyName = "day")] + public string Day { get; set; } + + /// + /// Gets or sets a list of hours in the day used to identify a time + /// range. + /// + /// + /// Each integer hour represents a time range beginning at 0m after the + /// hour ending at the next hour (non-inclusive). 0 corresponds to + /// 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the + /// 00:00 - 02:00 UTC time range. + /// + [JsonProperty(PropertyName = "hourSlots")] + public IList HourSlots { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeSpan.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeSpan.cs new file mode 100644 index 0000000000000..b9f29a871f3bd --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/TimeSpan.cs @@ -0,0 +1,62 @@ +// +// 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; + + /// + /// A time range. + /// + /// + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + /// + public partial class TimeSpan + { + /// + /// Initializes a new instance of the TimeSpan class. + /// + public TimeSpan() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TimeSpan class. + /// + /// The start of a time span + /// The end of a time span + public TimeSpan(System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?)) + { + Start = start; + End = end; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the start of a time span + /// + [JsonProperty(PropertyName = "start")] + public System.DateTime? Start { get; set; } + + /// + /// Gets or sets the end of a time span + /// + [JsonProperty(PropertyName = "end")] + public System.DateTime? End { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UpgradeChannel.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UpgradeChannel.cs new file mode 100644 index 0000000000000..91af780850f9c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UpgradeChannel.cs @@ -0,0 +1,61 @@ +// +// 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 UpgradeChannel. + /// + public static class UpgradeChannel + { + /// + /// Automatically upgrade the cluster to the latest supported patch + /// release on the latest supported minor version. In cases where the + /// cluster is at a version of Kubernetes that is at an N-2 minor + /// version where N is the latest supported minor version, the cluster + /// first upgrades to the latest supported patch version on N-1 minor + /// version. For example, if a cluster is running version 1.17.7 and + /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your + /// cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. + /// + public const string Rapid = "rapid"; + /// + /// Automatically upgrade the cluster to the latest supported patch + /// release on minor version N-1, where N is the latest supported minor + /// version. For example, if a cluster is running version 1.17.7 and + /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your + /// cluster is upgraded to 1.18.6. + /// + public const string Stable = "stable"; + /// + /// Automatically upgrade the cluster to the latest supported patch + /// version when it becomes available while keeping the minor version + /// the same. For example, if a cluster is running version 1.17.7 and + /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your + /// cluster is upgraded to 1.17.9. + /// + public const string Patch = "patch"; + /// + /// Automatically upgrade the node image to the latest version + /// available. Microsoft provides patches and new images for image + /// nodes frequently (usually weekly), but your running nodes won't get + /// the new images unless you do a node image upgrade. Turning on the + /// node-image channel will automatically update your node images + /// whenever a new version is available. + /// + public const string NodeImage = "node-image"; + /// + /// Disables auto-upgrades and keeps the cluster at its current version + /// of Kubernetes. + /// + public const string None = "none"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs index 70a04cf5899bc..1d5dc18d049ca 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs @@ -13,6 +13,9 @@ namespace Microsoft.Azure.Management.ContainerService.Models using Newtonsoft.Json; using System.Linq; + /// + /// Details about a user assigned identity. + /// public partial class UserAssignedIdentity { /// @@ -26,11 +29,11 @@ public UserAssignedIdentity() /// /// Initializes a new instance of the UserAssignedIdentity class. /// - /// The resource id of the user assigned + /// The resource ID of the user assigned /// identity. - /// The client id of the user assigned + /// The client ID of the user assigned /// identity. - /// The object id of the user assigned + /// The object ID of the user assigned /// identity. public UserAssignedIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) { @@ -46,19 +49,19 @@ public UserAssignedIdentity() partial void CustomInit(); /// - /// Gets or sets the resource id of the user assigned identity. + /// Gets or sets the resource ID of the user assigned identity. /// [JsonProperty(PropertyName = "resourceId")] public string ResourceId { get; set; } /// - /// Gets or sets the client id of the user assigned identity. + /// Gets or sets the client ID of the user assigned identity. /// [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } /// - /// Gets or sets the object id of the user assigned identity. + /// Gets or sets the object ID of the user assigned identity. /// [JsonProperty(PropertyName = "objectId")] public string ObjectId { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WeekDay.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WeekDay.cs new file mode 100644 index 0000000000000..e0238baf21225 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WeekDay.cs @@ -0,0 +1,27 @@ +// +// 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 WeekDay. + /// + public static class WeekDay + { + public const string Sunday = "Sunday"; + public const string Monday = "Monday"; + public const string Tuesday = "Tuesday"; + public const string Wednesday = "Wednesday"; + public const string Thursday = "Thursday"; + public const string Friday = "Friday"; + public const string Saturday = "Saturday"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperationsExtensions.cs deleted file mode 100644 index 37a2d108e3e68..0000000000000 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OpenShiftManagedClustersOperationsExtensions.cs +++ /dev/null @@ -1,547 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for OpenShiftManagedClustersOperations. - /// - public static partial class OpenShiftManagedClustersOperationsExtensions - { - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOpenShiftManagedClustersOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOpenShiftManagedClustersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - public static IPage ListByResourceGroup(this IOpenShiftManagedClustersOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a OpenShift managed cluster. - /// - /// - /// Gets the details of the managed OpenShift cluster with a specified resource - /// group and name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - public static OpenShiftManagedCluster Get(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a OpenShift managed cluster. - /// - /// - /// Gets the details of the managed OpenShift cluster with a specified resource - /// group and name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IOpenShiftManagedClustersOperations 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 an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. - /// - public static OpenShiftManagedCluster CreateOrUpdate(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Resource tags. - /// - public static OpenShiftManagedCluster UpdateTags(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) - { - return operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); - } - - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateTagsAsync(this IOpenShiftManagedClustersOperations 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 an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - public static void Delete(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. - /// - public static OpenShiftManagedCluster BeginCreateOrUpdate(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an OpenShift managed cluster. - /// - /// - /// Creates or updates a OpenShift managed cluster with the specified - /// configuration for agents and OpenShift version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Parameters supplied to the Create or Update an OpenShift Managed Cluster - /// operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, OpenShiftManagedCluster parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Resource tags. - /// - public static OpenShiftManagedCluster BeginUpdateTags(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) - { - return operations.BeginUpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); - } - - /// - /// Updates tags on an OpenShift managed cluster. - /// - /// - /// Updates an OpenShift managed cluster with the specified tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateTagsAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - public static void BeginDelete(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes an OpenShift managed cluster. - /// - /// - /// Deletes the OpenShift managed cluster with a specified resource group and - /// name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the OpenShift managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IOpenShiftManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOpenShiftManagedClustersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// - /// - /// Gets a list of OpenShift managed clusters in the specified subscription. - /// The operation returns properties of each OpenShift managed cluster. - /// - /// - /// 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 IOpenShiftManagedClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IOpenShiftManagedClustersOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. - /// - /// - /// Lists OpenShift managed clusters in the specified subscription and resource - /// group. The operation returns properties of each OpenShift managed cluster. - /// - /// - /// 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 IOpenShiftManagedClustersOperations 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/Operations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs index 9aa03fa35215e..bd94929241457 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs @@ -51,7 +51,7 @@ internal Operations(ContainerServiceClient client) public ContainerServiceClient Client { get; private set; } /// - /// Gets a list of compute operations. + /// Gets a list of operations. /// /// /// Headers that will be added to request. @@ -65,12 +65,21 @@ internal Operations(ContainerServiceClient client) /// /// 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)) { - string apiVersion = "2020-07-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -78,7 +87,6 @@ internal Operations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -86,9 +94,9 @@ internal Operations(ContainerServiceClient client) var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ContainerService/operations").ToString(); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -196,7 +204,7 @@ internal Operations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OperationsExtensions.cs index 5497ee0a0ebaa..96f13e6718f61 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/OperationsExtensions.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.ContainerService public static partial class OperationsExtensions { /// - /// Gets a list of compute operations. + /// Gets a list of operations. /// /// /// The operations group for this extension method. @@ -35,7 +35,7 @@ public static IEnumerable List(this IOperations operations) } /// - /// Gets a list of compute operations. + /// Gets a list of operations. /// /// /// The operations group for this extension method. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs index 4a6f473035d38..8e3b99ca66364 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -55,9 +55,8 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// cluster. /// /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. The operation returns properties of each private endpoint - /// connection. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. @@ -88,6 +87,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -122,7 +125,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -130,7 +132,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -143,9 +144,9 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -273,11 +274,11 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) } /// - /// Gets the private endpoint connection. + /// Gets the specified private endpoint connection. /// /// - /// Gets the details of the private endpoint connection by managed cluster and - /// resource group. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. @@ -311,6 +312,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -349,7 +354,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -357,7 +361,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); @@ -372,9 +375,9 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -504,9 +507,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// Updates a private endpoint connection. /// - /// - /// Updates a private endpoint connection in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -517,7 +517,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// The name of the private endpoint connection. /// /// - /// Parameters supplied to the Update a private endpoint connection operation. + /// The updated private endpoint connection. /// /// /// Headers that will be added to request. @@ -542,6 +542,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -588,7 +592,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -596,7 +599,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); @@ -612,9 +614,9 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -750,9 +752,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -778,9 +777,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The name of the resource group. /// @@ -810,6 +806,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -848,7 +848,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2020-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -856,7 +855,6 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); @@ -871,9 +869,9 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs index 45b67474e47e8..358740558945c 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -26,9 +26,8 @@ public static partial class PrivateEndpointConnectionsOperationsExtensions /// cluster. /// /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. The operation returns properties of each private endpoint - /// connection. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The operations group for this extension method. @@ -49,9 +48,8 @@ public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConn /// cluster. /// /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. The operation returns properties of each private endpoint - /// connection. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The operations group for this extension method. @@ -74,11 +72,11 @@ public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConn } /// - /// Gets the private endpoint connection. + /// Gets the specified private endpoint connection. /// /// - /// Gets the details of the private endpoint connection by managed cluster and - /// resource group. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The operations group for this extension method. @@ -98,11 +96,11 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper } /// - /// Gets the private endpoint connection. + /// Gets the specified private endpoint connection. /// /// - /// Gets the details of the private endpoint connection by managed cluster and - /// resource group. + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The operations group for this extension method. @@ -130,9 +128,6 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// /// Updates a private endpoint connection. /// - /// - /// Updates a private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -146,7 +141,7 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// The name of the private endpoint connection. /// /// - /// Parameters supplied to the Update a private endpoint connection operation. + /// The updated private endpoint connection. /// public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) { @@ -156,9 +151,6 @@ public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsO /// /// Updates a private endpoint connection. /// - /// - /// Updates a private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -172,7 +164,7 @@ public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsO /// The name of the private endpoint connection. /// /// - /// Parameters supplied to the Update a private endpoint connection operation. + /// The updated private endpoint connection. /// /// /// The cancellation token. @@ -188,9 +180,6 @@ public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsO /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -211,9 +200,6 @@ public static void Delete(this IPrivateEndpointConnectionsOperations operations, /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -237,9 +223,6 @@ public static void Delete(this IPrivateEndpointConnectionsOperations operations, /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// @@ -260,9 +243,6 @@ public static void BeginDelete(this IPrivateEndpointConnectionsOperations operat /// /// Deletes a private endpoint connection. /// - /// - /// Deletes the private endpoint connection in the specified managed cluster. - /// /// /// The operations group for this extension method. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs new file mode 100644 index 0000000000000..acaaf2a910c41 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs @@ -0,0 +1,276 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkResourcesOperations operations. + /// + internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations + { + /// + /// Initializes a new instance of the PrivateLinkResourcesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateLinkResourcesOperations(ContainerServiceClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ContainerServiceClient + /// + public ContainerServiceClient Client { get; private set; } + + /// + /// Gets a list of private link resources in the specified managed cluster. + /// + /// + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + // 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, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (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; + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 0000000000000..9d7637a8115a9 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkResourcesOperationsExtensions + { + /// + /// Gets a list of private link resources in the specified managed cluster. + /// + /// + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static PrivateLinkResourcesListResult List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName) + { + return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of private link resources in the specified managed cluster. + /// + /// + /// To learn more about private clusters, see: + /// https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs new file mode 100644 index 0000000000000..0578d8853c68e --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs @@ -0,0 +1,286 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ResolvePrivateLinkServiceIdOperations operations. + /// + internal partial class ResolvePrivateLinkServiceIdOperations : IServiceOperations, IResolvePrivateLinkServiceIdOperations + { + /// + /// Initializes a new instance of the ResolvePrivateLinkServiceIdOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ContainerServiceClient + /// + public ContainerServiceClient Client { get; private set; } + + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Parameters required in order to resolve a private link service ID. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // 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, "POST", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (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; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs new file mode 100644 index 0000000000000..f3a7c7e12c964 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ResolvePrivateLinkServiceIdOperations. + /// + public static partial class ResolvePrivateLinkServiceIdOperationsExtensions + { + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Parameters required in order to resolve a private link service ID. + /// + public static PrivateLinkResource POST(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters) + { + return operations.POSTAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Parameters required in order to resolve a private link service ID. + /// + /// + /// The cancellation token. + /// + public static async Task POSTAsync(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.POSTWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs index bb2cb6f0ea604..4fb03c776b6e7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs @@ -19,26 +19,15 @@ public static IEnumerable> ApiInfo_ContainerServic { return new Tuple[] { - new Tuple("ContainerService", "AgentPools", "2020-07-01"), - new Tuple("ContainerService", "ContainerServices", "2017-07-01"), - new Tuple("ContainerService", "ContainerServices", "2019-08-01"), - new Tuple("ContainerService", "ManagedClusters", "2020-07-01"), - new Tuple("ContainerService", "OpenShiftManagedClusters", "2019-04-30"), - new Tuple("ContainerService", "Operations", "2020-07-01"), - new Tuple("ContainerService", "PrivateEndpointConnections", "2020-07-01"), + new Tuple("ContainerService", "AgentPools", "2021-05-01"), + new Tuple("ContainerService", "MaintenanceConfigurations", "2021-05-01"), + new Tuple("ContainerService", "ManagedClusters", "2021-05-01"), + new Tuple("ContainerService", "Operations", "2021-05-01"), + new Tuple("ContainerService", "PrivateEndpointConnections", "2021-05-01"), + new Tuple("ContainerService", "PrivateLinkResources", "2021-05-01"), + new Tuple("ContainerService", "ResolvePrivateLinkServiceId", "2021-05-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerservice/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\abelch\\src\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "122829cebe6e4177e9eb6ff349071d3e2034b0e7"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -