diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedClusterVersionOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedClusterVersionOperations.cs new file mode 100644 index 000000000000..10c2cef0bedc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedClusterVersionOperations.cs @@ -0,0 +1,145 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedClusterVersionOperations operations. + /// + public partial interface IManagedClusterVersionOperations + { + /// + /// Gets information about a Service Fabric managed cluster code + /// version available in the specified location. + /// + /// + /// Gets information about an available Service Fabric managed cluster + /// code version. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// The cluster code version. + /// + /// + /// 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 location, string clusterVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets information about a Service Fabric cluster code version + /// available for the specified environment. + /// + /// + /// Gets information about an available Service Fabric cluster code + /// version by environment. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// The cluster code version. + /// + /// + /// 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> GetByEnvironmentWithHttpMessagesAsync(string location, string clusterVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of Service Fabric cluster code versions available for + /// the specified location. + /// + /// + /// Gets all available code versions for Service Fabric cluster + /// resources by location. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of Service Fabric cluster code versions available for + /// the specified environment. + /// + /// + /// Gets all available code versions for Service Fabric cluster + /// resources by environment. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// 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> ListByEnvironmentWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs index 4d77cb8040d5..a6f5ee33f297 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs @@ -42,8 +42,8 @@ public partial interface IServiceFabricManagedClustersManagementClient : System. /// /// The version of the Service Fabric resource provider API. This is a - /// required parameter and it's value must be "2021-01-01-preview" for - /// this specification. + /// required parameter and it's value must be "2021-05-01" for this + /// specification. /// string ApiVersion { get; } @@ -96,6 +96,11 @@ public partial interface IServiceFabricManagedClustersManagementClient : System. /// IManagedClustersOperations ManagedClusters { get; } + /// + /// Gets the IManagedClusterVersionOperations. + /// + IManagedClusterVersionOperations ManagedClusterVersion { get; } + /// /// Gets the IOperations. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs new file mode 100644 index 000000000000..6051ce5507f4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs @@ -0,0 +1,814 @@ +// +// 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.ServiceFabricManagedClusters +{ + 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; + + /// + /// ManagedClusterVersionOperations operations. + /// + internal partial class ManagedClusterVersionOperations : IServiceOperations, IManagedClusterVersionOperations + { + /// + /// Initializes a new instance of the ManagedClusterVersionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ManagedClusterVersionOperations(ServiceFabricManagedClustersManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ServiceFabricManagedClustersManagementClient + /// + public ServiceFabricManagedClustersManagementClient Client { get; private set; } + + /// + /// Gets information about a Service Fabric managed cluster code version + /// available in the specified location. + /// + /// + /// Gets information about an available Service Fabric managed cluster code + /// version. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string location, string clusterVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (clusterVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "clusterVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("clusterVersion", clusterVersion); + 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}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{clusterVersion}", System.Uri.EscapeDataString(clusterVersion)); + 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 information about a Service Fabric cluster code version available for + /// the specified environment. + /// + /// + /// Gets information about an available Service Fabric cluster code version by + /// environment. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + /// + /// 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> GetByEnvironmentWithHttpMessagesAsync(string location, string clusterVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (clusterVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "clusterVersion"); + } + string environment = "Windows"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("environment", environment); + tracingParameters.Add("clusterVersion", clusterVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetByEnvironment", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{environment}", System.Uri.EscapeDataString(environment)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{clusterVersion}", System.Uri.EscapeDataString(clusterVersion)); + 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 the list of Service Fabric cluster code versions available for the + /// specified location. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// location. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + 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.ServiceFabric/locations/{location}/managedClusterVersions").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 the list of Service Fabric cluster code versions available for the + /// specified environment. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// environment. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// 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> ListByEnvironmentWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string environment = "Windows"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("environment", environment); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByEnvironment", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{environment}", System.Uri.EscapeDataString(environment)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperationsExtensions.cs new file mode 100644 index 000000000000..eed890bfff0b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperationsExtensions.cs @@ -0,0 +1,221 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ManagedClusterVersionOperations. + /// + public static partial class ManagedClusterVersionOperationsExtensions + { + /// + /// Gets information about a Service Fabric managed cluster code version + /// available in the specified location. + /// + /// + /// Gets information about an available Service Fabric managed cluster code + /// version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + public static ManagedClusterCodeVersionResult Get(this IManagedClusterVersionOperations operations, string location, string clusterVersion) + { + return operations.GetAsync(location, clusterVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets information about a Service Fabric managed cluster code version + /// available in the specified location. + /// + /// + /// Gets information about an available Service Fabric managed cluster code + /// version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IManagedClusterVersionOperations operations, string location, string clusterVersion, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, clusterVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets information about a Service Fabric cluster code version available for + /// the specified environment. + /// + /// + /// Gets information about an available Service Fabric cluster code version by + /// environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + public static ManagedClusterCodeVersionResult GetByEnvironment(this IManagedClusterVersionOperations operations, string location, string clusterVersion) + { + return operations.GetByEnvironmentAsync(location, clusterVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets information about a Service Fabric cluster code version available for + /// the specified environment. + /// + /// + /// Gets information about an available Service Fabric cluster code version by + /// environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cluster code version. + /// + /// + /// The cancellation token. + /// + public static async Task GetByEnvironmentAsync(this IManagedClusterVersionOperations operations, string location, string clusterVersion, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetByEnvironmentWithHttpMessagesAsync(location, clusterVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of Service Fabric cluster code versions available for the + /// specified location. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + public static ManagedClusterCodeVersionListResult List(this IManagedClusterVersionOperations operations, string location) + { + return operations.ListAsync(location).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Service Fabric cluster code versions available for the + /// specified location. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IManagedClusterVersionOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of Service Fabric cluster code versions available for the + /// specified environment. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + public static ManagedClusterCodeVersionListResult ListByEnvironment(this IManagedClusterVersionOperations operations, string location) + { + return operations.ListByEnvironmentAsync(location).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Service Fabric cluster code versions available for the + /// specified environment. + /// + /// + /// Gets all available code versions for Service Fabric cluster resources by + /// environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cancellation token. + /// + public static async Task ListByEnvironmentAsync(this IManagedClusterVersionOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByEnvironmentWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs index c55e6da39d94..41f03abcac54 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs @@ -34,11 +34,7 @@ public ApplicationUpgradePolicy() /// requests to drain gracefully. This would be effective when the /// instance is closing during the application/cluster upgrade, only /// for those instances which have a non-zero delay duration configured - /// in the service description. See InstanceCloseDelayDurationSeconds - /// property in StatelessServiceDescription for details. Note, the - /// default value of InstanceCloseDelayDurationInSeconds is 4294967295, - /// which indicates that the behavior will entirely depend on the delay - /// configured in the stateless service description. + /// in the service description. /// Possible values include: 'Monitored', /// 'UnmonitoredAuto' /// The maximum amount of @@ -89,11 +85,7 @@ public ApplicationUpgradePolicy() /// gracefully. This would be effective when the instance is closing /// during the application/cluster upgrade, only for those instances /// which have a non-zero delay duration configured in the service - /// description. See InstanceCloseDelayDurationSeconds property in - /// StatelessServiceDescription for details. Note, the default value of - /// InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - /// that the behavior will entirely depend on the delay configured in - /// the stateless service description. + /// description. /// [JsonProperty(PropertyName = "instanceCloseDelayDuration")] public long? InstanceCloseDelayDuration { get; set; } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterState.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterState.cs new file mode 100644 index 000000000000..8fc761a19b42 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterState.cs @@ -0,0 +1,51 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for ClusterState. + /// + public static class ClusterState + { + /// + /// Indicates that the cluster resource is created and the resource + /// provider is waiting for Service Fabric VM extension to boot up and + /// report to it. + /// + public const string WaitingForNodes = "WaitingForNodes"; + /// + /// Indicates that the Service Fabric runtime is being installed on the + /// VMs. Cluster resource will be in this state until the cluster boots + /// up and system services are up. + /// + public const string Deploying = "Deploying"; + /// + /// Indicates that the cluster is upgrading to establishes the cluster + /// version. This upgrade is automatically initiated when the cluster + /// boots up for the first time. + /// + public const string BaselineUpgrade = "BaselineUpgrade"; + /// + /// Indicates that the cluster is being upgraded with the user provided + /// configuration. + /// + public const string Upgrading = "Upgrading"; + /// + /// Indicates that the last upgrade for the cluster has failed. + /// + public const string UpgradeFailed = "UpgradeFailed"; + /// + /// Indicates that the cluster is in a stable state. + /// + public const string Ready = "Ready"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterUpgradeMode.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterUpgradeMode.cs new file mode 100644 index 000000000000..775e3f63bdee --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ClusterUpgradeMode.cs @@ -0,0 +1,32 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for ClusterUpgradeMode. + /// + public static class ClusterUpgradeMode + { + /// + /// The cluster will be automatically upgraded to the latest Service + /// Fabric runtime version, **clusterUpgradeCadence** will determine + /// when the upgrade starts after the new version becomes available. + /// + public const string Automatic = "Automatic"; + /// + /// The cluster will not be automatically upgraded to the latest + /// Service Fabric runtime version. The cluster is upgraded by setting + /// the **clusterCodeVersion** property in the cluster resource. + /// + public const string Manual = "Manual"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/DiskType.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/DiskType.cs new file mode 100644 index 000000000000..247c5cafac0a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/DiskType.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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for DiskType. + /// + public static class DiskType + { + /// + /// Standard HDD locally redundant storage. Best for backup, + /// non-critical, and infrequent access. + /// + public const string StandardLRS = "Standard_LRS"; + /// + /// Standard SSD locally redundant storage. Best for web servers, + /// lightly used enterprise applications and dev/test. + /// + public const string StandardSSDLRS = "StandardSSD_LRS"; + /// + /// Premium SSD locally redundant storage. Best for production and + /// performance sensitive workloads. + /// + public const string PremiumLRS = "Premium_LRS"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs index 23e4b94fc9be..0dc1b689457b 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs @@ -41,13 +41,16 @@ public LoadBalancingRule() /// the reference to the load balancer /// probe used by the load balancing rule. Possible values include: /// 'tcp', 'http', 'https' + /// The prob port used by the load balancing + /// rule. Acceptable values are between 1 and 65535. /// The probe request path. Only /// supported for HTTP/HTTPS probes. - public LoadBalancingRule(int frontendPort, int backendPort, string protocol, string probeProtocol, string probeRequestPath = default(string)) + public LoadBalancingRule(int frontendPort, int backendPort, string protocol, string probeProtocol, int? probePort = default(int?), string probeRequestPath = default(string)) { FrontendPort = frontendPort; BackendPort = backendPort; Protocol = protocol; + ProbePort = probePort; ProbeProtocol = probeProtocol; ProbeRequestPath = probeRequestPath; CustomInit(); @@ -80,6 +83,13 @@ public LoadBalancingRule() [JsonProperty(PropertyName = "protocol")] public string Protocol { get; set; } + /// + /// Gets or sets the prob port used by the load balancing rule. + /// Acceptable values are between 1 and 65535. + /// + [JsonProperty(PropertyName = "probePort")] + public int? ProbePort { get; set; } + /// /// Gets or sets the reference to the load balancer probe used by the /// load balancing rule. Possible values include: 'tcp', 'http', @@ -127,6 +137,14 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "BackendPort", 1); } + if (ProbePort > 65534) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ProbePort", 65534); + } + if (ProbePort < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ProbePort", 1); + } } } } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs index 27dee8c443fd..d15d12f185b1 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs @@ -78,14 +78,17 @@ public ManagedCluster() /// 'Creating', 'Created', 'Updating', 'Succeeded', 'Failed', /// 'Canceled', 'Deleting', 'Deleted', 'Other' /// The Service Fabric runtime version - /// of the cluster. This property can only by set the user when - /// **upgradeMode** is set to 'Manual'. To get list of available + /// of the cluster. This property is required when + /// **clusterUpgradeMode** is set to 'Manual'. To get list of available /// Service Fabric versions for new clusters use [ClusterVersion /// API](./ClusterVersion.md). To get the list of available version for /// existing clusters use **availableClusterVersions**. + /// Possible values include: + /// 'Automatic', 'Manual' /// Indicates when new cluster /// runtime version upgrades will be applied after they are released. - /// By default is Wave0. Possible values include: 'Wave0', 'Wave1', + /// By default is Wave0. Only applies when **clusterUpgradeMode** is + /// set to 'Automatic'. Possible values include: 'Wave0', 'Wave1', /// 'Wave2' /// List of add-on features to enable on /// the cluster. @@ -93,10 +96,12 @@ public ManagedCluster() /// automatic OS upgrade for the node types that are created using any /// platform OS image with version 'latest'. The default value for this /// setting is false. + /// Indicates if the cluster has zone + /// resiliency. /// The policy used /// to clean up unused versions. /// The sku of the managed cluster - public ManagedCluster(string location, string dnsName, string adminUserName, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string etag = default(string), SystemData systemData = default(SystemData), string fqdn = default(string), string ipv4Address = default(string), string clusterId = default(string), string clusterState = default(string), IList clusterCertificateThumbprints = default(IList), int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminPassword = default(string), IList loadBalancingRules = default(IList), bool? allowRdpAccess = default(bool?), IList networkSecurityRules = default(IList), IList clients = default(IList), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), IList fabricSettings = default(IList), string provisioningState = default(string), string clusterCodeVersion = default(string), string clusterUpgradeCadence = default(string), IList addonFeatures = default(IList), bool? enableAutoOSUpgrade = default(bool?), ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy = default(ApplicationTypeVersionsCleanupPolicy), Sku sku = default(Sku)) + public ManagedCluster(string location, string dnsName, string adminUserName, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string etag = default(string), SystemData systemData = default(SystemData), string fqdn = default(string), string ipv4Address = default(string), string clusterId = default(string), string clusterState = default(string), IList clusterCertificateThumbprints = default(IList), int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminPassword = default(string), IList loadBalancingRules = default(IList), bool? allowRdpAccess = default(bool?), IList networkSecurityRules = default(IList), IList clients = default(IList), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), IList fabricSettings = default(IList), string provisioningState = default(string), string clusterCodeVersion = default(string), string clusterUpgradeMode = default(string), string clusterUpgradeCadence = default(string), IList addonFeatures = default(IList), bool? enableAutoOSUpgrade = default(bool?), bool? zonalResiliency = default(bool?), ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy = default(ApplicationTypeVersionsCleanupPolicy), Sku sku = default(Sku)) : base(location, id, name, type, tags, etag, systemData) { DnsName = dnsName; @@ -117,9 +122,11 @@ public ManagedCluster() FabricSettings = fabricSettings; ProvisioningState = provisioningState; ClusterCodeVersion = clusterCodeVersion; + ClusterUpgradeMode = clusterUpgradeMode; ClusterUpgradeCadence = clusterUpgradeCadence; AddonFeatures = addonFeatures; EnableAutoOSUpgrade = enableAutoOSUpgrade; + ZonalResiliency = zonalResiliency; ApplicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy; Sku = sku; CustomInit(); @@ -248,19 +255,26 @@ public ManagedCluster() /// /// Gets or sets the Service Fabric runtime version of the cluster. - /// This property can only by set the user when **upgradeMode** is set - /// to 'Manual'. To get list of available Service Fabric versions for - /// new clusters use [ClusterVersion API](./ClusterVersion.md). To get - /// the list of available version for existing clusters use + /// This property is required when **clusterUpgradeMode** is set to + /// 'Manual'. To get list of available Service Fabric versions for new + /// clusters use [ClusterVersion API](./ClusterVersion.md). To get the + /// list of available version for existing clusters use /// **availableClusterVersions**. /// [JsonProperty(PropertyName = "properties.clusterCodeVersion")] public string ClusterCodeVersion { get; set; } + /// + /// Gets or sets possible values include: 'Automatic', 'Manual' + /// + [JsonProperty(PropertyName = "properties.clusterUpgradeMode")] + public string ClusterUpgradeMode { get; set; } + /// /// Gets or sets indicates when new cluster runtime version upgrades - /// will be applied after they are released. By default is Wave0. - /// Possible values include: 'Wave0', 'Wave1', 'Wave2' + /// will be applied after they are released. By default is Wave0. Only + /// applies when **clusterUpgradeMode** is set to 'Automatic'. Possible + /// values include: 'Wave0', 'Wave1', 'Wave2' /// [JsonProperty(PropertyName = "properties.clusterUpgradeCadence")] public string ClusterUpgradeCadence { get; set; } @@ -279,6 +293,12 @@ public ManagedCluster() [JsonProperty(PropertyName = "properties.enableAutoOSUpgrade")] public bool? EnableAutoOSUpgrade { get; set; } + /// + /// Gets or sets indicates if the cluster has zone resiliency. + /// + [JsonProperty(PropertyName = "properties.zonalResiliency")] + public bool? ZonalResiliency { get; set; } + /// /// Gets or sets the policy used to clean up unused versions. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionListResult.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionListResult.cs new file mode 100644 index 000000000000..8c0116585d5a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionListResult.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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The list results of the Service Fabric runtime versions. + /// + public partial class ManagedClusterCodeVersionListResult + { + /// + /// Initializes a new instance of the + /// ManagedClusterCodeVersionListResult class. + /// + public ManagedClusterCodeVersionListResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterCodeVersionListResult class. + /// + public ManagedClusterCodeVersionListResult(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionResult.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionResult.cs new file mode 100644 index 000000000000..956ba26bb8ae --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterCodeVersionResult.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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The result of the Service Fabric runtime versions + /// + [Rest.Serialization.JsonTransformation] + public partial class ManagedClusterCodeVersionResult + { + /// + /// Initializes a new instance of the ManagedClusterCodeVersionResult + /// class. + /// + public ManagedClusterCodeVersionResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterCodeVersionResult + /// class. + /// + /// The identification of the result + /// The name of the result + /// The result resource type + /// The Service Fabric runtime version of the + /// cluster. + /// The date of expiry of support of the + /// version. + /// Possible values include: 'Windows' + public ManagedClusterCodeVersionResult(string id = default(string), string name = default(string), string type = default(string), string codeVersion = default(string), string supportExpiryUtc = default(string), string osType = default(string)) + { + Id = id; + Name = name; + Type = type; + CodeVersion = codeVersion; + SupportExpiryUtc = supportExpiryUtc; + OsType = osType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identification of the result + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the name of the result + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the result resource type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the Service Fabric runtime version of the cluster. + /// + [JsonProperty(PropertyName = "properties.codeVersion")] + public string CodeVersion { get; set; } + + /// + /// Gets or sets the date of expiry of support of the version. + /// + [JsonProperty(PropertyName = "properties.supportExpiryUtc")] + public string SupportExpiryUtc { get; set; } + + /// + /// Gets or sets possible values include: 'Windows' + /// + [JsonProperty(PropertyName = "properties.osType")] + public string OsType { get; set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs index a4764a84aa5c..7a95a6bb2fe2 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs @@ -46,6 +46,8 @@ public NodeType() /// Azure resource name. /// Azure resource type. /// Azure resource tags. + /// Possible values include: 'Standard_LRS', + /// 'StandardSSD_LRS', 'Premium_LRS' /// The placement tags applied to /// nodes in the node type, which can be used to indicate where certain /// services (workload) should run. @@ -74,16 +76,19 @@ public NodeType() /// 'latest'. /// virtual machine secretes. /// virtual machine extensions. + /// Indicates if the node type can only host + /// Stateless workloads. /// The provisioning state of the /// managed cluster resource. Possible values include: 'None', /// 'Creating', 'Created', 'Updating', 'Succeeded', 'Failed', /// 'Canceled', 'Deleting', 'Deleted', 'Other' - public NodeType(bool isPrimary, int vmInstanceCount, int dataDiskSizeGB, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), IDictionary placementProperties = default(IDictionary), IDictionary capacities = default(IDictionary), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), IList vmSecrets = default(IList), IList vmExtensions = default(IList), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), string provisioningState = default(string)) + public NodeType(bool isPrimary, int vmInstanceCount, int dataDiskSizeGB, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), string dataDiskType = default(string), IDictionary placementProperties = default(IDictionary), IDictionary capacities = default(IDictionary), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), IList vmSecrets = default(IList), IList vmExtensions = default(IList), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), bool? isStateless = default(bool?), string provisioningState = default(string)) : base(id, name, type, tags, systemData) { IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; DataDiskSizeGB = dataDiskSizeGB; + DataDiskType = dataDiskType; PlacementProperties = placementProperties; Capacities = capacities; ApplicationPorts = applicationPorts; @@ -96,6 +101,7 @@ public NodeType() VmSecrets = vmSecrets; VmExtensions = vmExtensions; VmManagedIdentity = vmManagedIdentity; + IsStateless = isStateless; ProvisioningState = provisioningState; CustomInit(); } @@ -125,6 +131,13 @@ public NodeType() [JsonProperty(PropertyName = "properties.dataDiskSizeGB")] public int DataDiskSizeGB { get; set; } + /// + /// Gets or sets possible values include: 'Standard_LRS', + /// 'StandardSSD_LRS', 'Premium_LRS' + /// + [JsonProperty(PropertyName = "properties.dataDiskType")] + public string DataDiskType { get; set; } + /// /// Gets or sets the placement tags applied to nodes in the node type, /// which can be used to indicate where certain services (workload) @@ -216,6 +229,13 @@ public NodeType() [JsonProperty(PropertyName = "properties.vmManagedIdentity")] public VmManagedIdentity VmManagedIdentity { get; set; } + /// + /// Gets or sets indicates if the node type can only host Stateless + /// workloads. + /// + [JsonProperty(PropertyName = "properties.isStateless")] + public bool? IsStateless { get; set; } + /// /// Gets the provisioning state of the managed cluster resource. /// Possible values include: 'None', 'Creating', 'Created', 'Updating', diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceProperties.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceProperties.cs index ac96e5078010..6ac6a0a69b8d 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceProperties.cs @@ -46,17 +46,13 @@ public ServiceResourceProperties() /// The activation Mode of /// the service package. Possible values include: 'SharedProcess', /// 'ExclusiveProcess' - /// The DNS name of the service. It - /// requires the DNS system service to be enabled in Service Fabric - /// cluster. - public ServiceResourceProperties(string serviceTypeName, Partition partitionDescription, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string), string serviceDnsName = default(string)) + public ServiceResourceProperties(string serviceTypeName, Partition partitionDescription, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string)) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies) { ProvisioningState = provisioningState; ServiceTypeName = serviceTypeName; PartitionDescription = partitionDescription; ServicePackageActivationMode = servicePackageActivationMode; - ServiceDnsName = serviceDnsName; CustomInit(); } @@ -90,13 +86,6 @@ public ServiceResourceProperties() [JsonProperty(PropertyName = "servicePackageActivationMode")] public string ServicePackageActivationMode { get; set; } - /// - /// Gets or sets the DNS name of the service. It requires the DNS - /// system service to be enabled in Service Fabric cluster. - /// - [JsonProperty(PropertyName = "serviceDnsName")] - public string ServiceDnsName { get; set; } - /// /// Validate the object. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs index 8f276f706c0d..5dc5855ae73e 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs @@ -47,9 +47,6 @@ public StatefulServiceProperties() /// The activation Mode of /// the service package. Possible values include: 'SharedProcess', /// 'ExclusiveProcess' - /// The DNS name of the service. It - /// requires the DNS system service to be enabled in Service Fabric - /// cluster. /// A flag indicating whether this is a /// persistent service which stores states on the local disk. If it is /// then the value of this property is true, if not it is @@ -75,8 +72,8 @@ public StatefulServiceProperties() /// finished build. If desired behavior is to drop it as soon as /// possible the value of this property is true, if not it is /// false. - public StatefulServiceProperties(string serviceTypeName, Partition partitionDescription, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string), string serviceDnsName = default(string), bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), string replicaRestartWaitDuration = default(string), string quorumLossWaitDuration = default(string), string standByReplicaKeepDuration = default(string), string servicePlacementTimeLimit = default(string), bool? dropSourceReplicaOnMove = default(bool?)) - : base(serviceTypeName, partitionDescription, placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, provisioningState, servicePackageActivationMode, serviceDnsName) + public StatefulServiceProperties(string serviceTypeName, Partition partitionDescription, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string), bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), string replicaRestartWaitDuration = default(string), string quorumLossWaitDuration = default(string), string standByReplicaKeepDuration = default(string), string servicePlacementTimeLimit = default(string), bool? dropSourceReplicaOnMove = default(bool?)) + : base(serviceTypeName, partitionDescription, placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, provisioningState, servicePackageActivationMode) { HasPersistedState = hasPersistedState; TargetReplicaSetSize = targetReplicaSetSize; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs index 00b3e7949380..2cddf0623d5e 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs @@ -48,9 +48,6 @@ public StatelessServiceProperties() /// The activation Mode of /// the service package. Possible values include: 'SharedProcess', /// 'ExclusiveProcess' - /// The DNS name of the service. It - /// requires the DNS system service to be enabled in Service Fabric - /// cluster. /// MinInstanceCount is the minimum /// number of instances that must be up to meet the EnsureAvailability /// safety check during operations like upgrade or deactivate node. The @@ -69,29 +66,12 @@ public StatelessServiceProperties() /// MinInstancePercentage computation, -1 is first converted into the /// number of nodes on which the instances are allowed to be placed /// according to the placement constraints on the service. - /// Duration represented in - /// ISO 8601 format "hh:mm:ss", to wait before a stateless instance is - /// closed, to allow the active requests to drain gracefully. This - /// would be effective when the instance is closing during the - /// application/cluster upgrade and disabling node. The endpoint - /// exposed on this instance is removed prior to starting the delay, - /// which prevents new connections to this instance. In addition, - /// clients that have subscribed to service endpoint change - /// events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - /// can do the following upon receiving the endpoint removal - /// notification: - Stop sending new requests to this instance. - Close - /// existing connections after in-flight requests have completed. - - /// Connect to a different instance of the service partition for future - /// requests. Note, the default value of InstanceCloseDelayDuration is - /// 0, which indicates that there won't be any delay or removal of the - /// endpoint prior to closing the instance. - public StatelessServiceProperties(string serviceTypeName, Partition partitionDescription, int instanceCount, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string), string serviceDnsName = default(string), int? minInstanceCount = default(int?), int? minInstancePercentage = default(int?), string instanceCloseDelayDuration = default(string)) - : base(serviceTypeName, partitionDescription, placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, provisioningState, servicePackageActivationMode, serviceDnsName) + public StatelessServiceProperties(string serviceTypeName, Partition partitionDescription, int instanceCount, string placementConstraints = default(string), IList correlationScheme = default(IList), IList serviceLoadMetrics = default(IList), IList servicePlacementPolicies = default(IList), string defaultMoveCost = default(string), IList scalingPolicies = default(IList), string provisioningState = default(string), string servicePackageActivationMode = default(string), int? minInstanceCount = default(int?), int? minInstancePercentage = default(int?)) + : base(serviceTypeName, partitionDescription, placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, provisioningState, servicePackageActivationMode) { InstanceCount = instanceCount; MinInstanceCount = minInstanceCount; MinInstancePercentage = minInstancePercentage; - InstanceCloseDelayDuration = instanceCloseDelayDuration; CustomInit(); } @@ -133,27 +113,6 @@ public StatelessServiceProperties() [JsonProperty(PropertyName = "minInstancePercentage")] public int? MinInstancePercentage { get; set; } - /// - /// Gets or sets duration represented in ISO 8601 format "hh:mm:ss", to - /// wait before a stateless instance is closed, to allow the active - /// requests to drain gracefully. This would be effective when the - /// instance is closing during the application/cluster upgrade and - /// disabling node. The endpoint exposed on this instance is removed - /// prior to starting the delay, which prevents new connections to this - /// instance. In addition, clients that have subscribed to service - /// endpoint change - /// events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - /// can do the following upon receiving the endpoint removal - /// notification: - Stop sending new requests to this instance. - Close - /// existing connections after in-flight requests have completed. - - /// Connect to a different instance of the service partition for future - /// requests. Note, the default value of InstanceCloseDelayDuration is - /// 0, which indicates that there won't be any delay or removal of the - /// endpoint prior to closing the instance. - /// - [JsonProperty(PropertyName = "instanceCloseDelayDuration")] - public string InstanceCloseDelayDuration { get; set; } - /// /// Validate the object. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs index 14c24b654dde..4739bc714dc6 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs @@ -19,26 +19,16 @@ public static IEnumerable> ApiInfo_ServiceFabricMa { return new Tuple[] { - new Tuple("ServiceFabric", "ApplicationTypeVersions", "2021-01-01-preview"), - new Tuple("ServiceFabric", "ApplicationTypes", "2021-01-01-preview"), - new Tuple("ServiceFabric", "Applications", "2021-01-01-preview"), - new Tuple("ServiceFabric", "ManagedClusters", "2021-01-01-preview"), - new Tuple("ServiceFabric", "NodeTypes", "2021-01-01-preview"), - new Tuple("ServiceFabric", "Operations", "2021-01-01-preview"), - new Tuple("ServiceFabric", "Services", "2021-01-01-preview"), + new Tuple("ServiceFabric", "ApplicationTypeVersions", "2021-05-01"), + new Tuple("ServiceFabric", "ApplicationTypes", "2021-05-01"), + new Tuple("ServiceFabric", "Applications", "2021-05-01"), + new Tuple("ServiceFabric", "ManagedClusterVersion", "2021-05-01"), + new Tuple("ServiceFabric", "ManagedClusters", "2021-05-01"), + new Tuple("ServiceFabric", "NodeTypes", "2021-05-01"), + new Tuple("ServiceFabric", "Operations", "2021-05-01"), + new Tuple("ServiceFabric", "Services", "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/servicefabricmanagedclusters/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\code\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "8240593bde5350e6762015523ccd57cb61e32da5"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs index 0ae0a1b51b4d..00047866e9a2 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs @@ -48,8 +48,7 @@ public partial class ServiceFabricManagedClustersManagementClient : ServiceClien /// /// The version of the Service Fabric resource provider API. This is a required - /// parameter and it's value must be "2021-01-01-preview" for this - /// specification. + /// parameter and it's value must be "2021-05-01" for this specification. /// public string ApiVersion { get; private set; } @@ -101,6 +100,11 @@ public partial class ServiceFabricManagedClustersManagementClient : ServiceClien /// public virtual IManagedClustersOperations ManagedClusters { get; private set; } + /// + /// Gets the IManagedClusterVersionOperations. + /// + public virtual IManagedClusterVersionOperations ManagedClusterVersion { get; private set; } + /// /// Gets the IOperations. /// @@ -357,10 +361,11 @@ private void Initialize() Applications = new ApplicationsOperations(this); Services = new ServicesOperations(this); ManagedClusters = new ManagedClustersOperations(this); + ManagedClusterVersion = new ManagedClusterVersionOperations(this); Operations = new Operations(this); NodeTypes = new NodeTypesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-01-01-preview"; + ApiVersion = "2021-05-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true;