diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperations.cs
new file mode 100644
index 000000000000..d0d133a22a86
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperations.cs
@@ -0,0 +1,1209 @@
+//
+// 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.Avs
+{
+ 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;
+
+ ///
+ /// AuthorizationsOperations operations.
+ ///
+ internal partial class AuthorizationsOperations : IServiceOperations, IAuthorizationsOperations
+ {
+ ///
+ /// Initializes a new instance of the AuthorizationsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AuthorizationsOperations(AvsClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AvsClient
+ ///
+ public AvsClient Client { get; private set; }
+
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ 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.AVS/privateClouds/{privateCloudName}/authorizations").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ 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;
+ }
+
+ ///
+ /// Get an ExpressRoute Circuit Authorization by name in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (authorizationName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "authorizationName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("authorizationName", authorizationName);
+ 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.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{authorizationName}", System.Uri.EscapeDataString(authorizationName));
+ 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;
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (authorizationName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "authorizationName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ ExpressRouteAuthorization authorization = new ExpressRouteAuthorization();
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("authorizationName", authorizationName);
+ tracingParameters.Add("authorization", authorization);
+ 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.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{authorizationName}", System.Uri.EscapeDataString(authorizationName));
+ 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(authorization != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(authorization, 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;
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (authorizationName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "authorizationName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("authorizationName", authorizationName);
+ 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.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{authorizationName}", System.Uri.EscapeDataString(authorizationName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 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;
+ }
+
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperationsExtensions.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperationsExtensions.cs
new file mode 100644
index 000000000000..396f174e4bf5
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AuthorizationsOperationsExtensions.cs
@@ -0,0 +1,323 @@
+//
+// 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.Avs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for AuthorizationsOperations.
+ ///
+ public static partial class AuthorizationsOperationsExtensions
+ {
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ public static IPage List(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName)
+ {
+ return operations.ListAsync(resourceGroupName, privateCloudName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, privateCloudName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get an ExpressRoute Circuit Authorization by name in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ public static ExpressRouteAuthorization Get(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName)
+ {
+ return operations.GetAsync(resourceGroupName, privateCloudName, authorizationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get an ExpressRoute Circuit Authorization by name in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ public static ExpressRouteAuthorization CreateOrUpdate(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ public static void Delete(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName)
+ {
+ operations.DeleteAsync(resourceGroupName, privateCloudName, authorizationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ public static ExpressRouteAuthorization BeginCreateOrUpdate(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ public static void BeginDelete(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, privateCloudName, authorizationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IAuthorizationsOperations operations, string resourceGroupName, string privateCloudName, string authorizationName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, privateCloudName, authorizationName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IAuthorizationsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// 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 IAuthorizationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AvsClient.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AvsClient.cs
index ae2f19697654..13580eab77c9 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AvsClient.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/AvsClient.cs
@@ -47,14 +47,14 @@ public partial class AvsClient : ServiceClient, IAvsClient, IAzureCli
public ServiceClientCredentials Credentials { get; private set; }
///
- /// Unique identifier for the Azure subscription
+ /// The API version to use for this operation.
///
- public string SubscriptionId { get; set; }
+ public string ApiVersion { get; private set; }
///
- /// Version of Azure VMware Solution API to be used with the client request
+ /// The ID of the target subscription.
///
- public string ApiVersion { get; private set; }
+ public string SubscriptionId { get; set; }
///
/// The preferred language for the response.
@@ -94,6 +94,16 @@ public partial class AvsClient : ServiceClient, IAvsClient, IAzureCli
///
public virtual IClustersOperations Clusters { get; private set; }
+ ///
+ /// Gets the IHcxEnterpriseSitesOperations.
+ ///
+ public virtual IHcxEnterpriseSitesOperations HcxEnterpriseSites { get; private set; }
+
+ ///
+ /// Gets the IAuthorizationsOperations.
+ ///
+ public virtual IAuthorizationsOperations Authorizations { get; private set; }
+
///
/// Initializes a new instance of the AvsClient class.
///
@@ -339,8 +349,10 @@ private void Initialize()
Locations = new LocationsOperations(this);
PrivateClouds = new PrivateCloudsOperations(this);
Clusters = new ClustersOperations(this);
+ HcxEnterpriseSites = new HcxEnterpriseSitesOperations(this);
+ Authorizations = new AuthorizationsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2019-08-09-preview";
+ ApiVersion = "2020-03-20";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
@@ -357,6 +369,7 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
+ SerializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings = new JsonSerializerSettings
{
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
@@ -370,6 +383,7 @@ private void Initialize()
}
};
CustomInitialize();
+ DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperations.cs
index 5b806c275f04..be50518371ba 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperations.cs
@@ -54,7 +54,7 @@ internal ClustersOperations(AvsClient client)
/// List clusters in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -65,7 +65,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -86,10 +86,32 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -98,6 +120,13 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -181,13 +210,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -197,6 +227,10 @@ internal ClustersOperations(AvsClient client)
}
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);
@@ -245,7 +279,7 @@ internal ClustersOperations(AvsClient client)
/// Get a cluster by name in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -259,7 +293,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -280,10 +314,32 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -296,6 +352,13 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -381,13 +444,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -397,6 +461,10 @@ internal ClustersOperations(AvsClient client)
}
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);
@@ -445,7 +513,7 @@ internal ClustersOperations(AvsClient client)
/// Create or update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -473,7 +541,7 @@ internal ClustersOperations(AvsClient client)
/// Update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -481,8 +549,8 @@ internal ClustersOperations(AvsClient client)
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// The headers that will be added to request.
@@ -490,10 +558,10 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send Request
- AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, cluster, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -501,7 +569,7 @@ internal ClustersOperations(AvsClient client)
/// Delete a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -526,7 +594,7 @@ internal ClustersOperations(AvsClient client)
/// Create or update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -543,7 +611,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -564,10 +632,32 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -580,10 +670,21 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "cluster");
}
+ if (cluster != null)
+ {
+ cluster.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -676,13 +777,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -692,6 +794,10 @@ internal ClustersOperations(AvsClient client)
}
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);
@@ -758,7 +864,7 @@ internal ClustersOperations(AvsClient client)
/// Update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -766,8 +872,8 @@ internal ClustersOperations(AvsClient client)
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// Headers that will be added to request.
@@ -775,7 +881,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -790,16 +896,38 @@ internal ClustersOperations(AvsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -808,14 +936,21 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
}
- if (cluster == null)
+ if (clusterUpdate == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "cluster");
+ throw new ValidationException(ValidationRules.CannotBeNull, "clusterUpdate");
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -826,7 +961,7 @@ internal ClustersOperations(AvsClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("privateCloudName", privateCloudName);
tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("cluster", cluster);
+ tracingParameters.Add("clusterUpdate", clusterUpdate);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
@@ -880,9 +1015,9 @@ internal ClustersOperations(AvsClient client)
// Serialize Request
string _requestContent = null;
- if(cluster != null)
+ if(clusterUpdate != null)
{
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(cluster, Client.SerializationSettings);
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(clusterUpdate, 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");
}
@@ -908,13 +1043,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -924,6 +1060,10 @@ internal ClustersOperations(AvsClient client)
}
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);
@@ -990,7 +1130,7 @@ internal ClustersOperations(AvsClient client)
/// Delete a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -1004,7 +1144,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1022,10 +1162,32 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -1038,6 +1200,13 @@ internal ClustersOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1123,13 +1292,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1139,6 +1309,10 @@ internal ClustersOperations(AvsClient client)
}
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);
@@ -1177,7 +1351,7 @@ internal ClustersOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1273,13 +1447,14 @@ internal ClustersOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1289,6 +1464,10 @@ internal ClustersOperations(AvsClient client)
}
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);
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperationsExtensions.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperationsExtensions.cs
index c035ec3d7228..33ede2495a65 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperationsExtensions.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ClustersOperationsExtensions.cs
@@ -28,7 +28,7 @@ public static partial class ClustersOperationsExtensions
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -45,7 +45,7 @@ public static IPage List(this IClustersOperations operations, string re
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -68,7 +68,7 @@ public static IPage List(this IClustersOperations operations, string re
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -88,7 +88,7 @@ public static Cluster Get(this IClustersOperations operations, string resourceGr
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -114,7 +114,7 @@ public static Cluster Get(this IClustersOperations operations, string resourceGr
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -137,7 +137,7 @@ public static Cluster CreateOrUpdate(this IClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -166,7 +166,7 @@ public static Cluster CreateOrUpdate(this IClustersOperations operations, string
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -174,12 +174,12 @@ public static Cluster CreateOrUpdate(this IClustersOperations operations, string
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
- public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster)
+ public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate)
{
- return operations.UpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).GetAwaiter().GetResult();
+ return operations.UpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).GetAwaiter().GetResult();
}
///
@@ -189,7 +189,7 @@ public static Cluster Update(this IClustersOperations operations, string resourc
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -197,15 +197,15 @@ public static Cluster Update(this IClustersOperations operations, string resourc
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// The cancellation token.
///
- public static async Task UpdateAsync(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateAsync(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, cluster, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -218,7 +218,7 @@ public static Cluster Update(this IClustersOperations operations, string resourc
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -238,7 +238,7 @@ public static void Delete(this IClustersOperations operations, string resourceGr
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -261,7 +261,7 @@ public static void Delete(this IClustersOperations operations, string resourceGr
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -284,7 +284,7 @@ public static Cluster BeginCreateOrUpdate(this IClustersOperations operations, s
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -313,7 +313,7 @@ public static Cluster BeginCreateOrUpdate(this IClustersOperations operations, s
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -321,12 +321,12 @@ public static Cluster BeginCreateOrUpdate(this IClustersOperations operations, s
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
- public static Cluster BeginUpdate(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster)
+ public static Cluster BeginUpdate(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate)
{
- return operations.BeginUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).GetAwaiter().GetResult();
+ return operations.BeginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).GetAwaiter().GetResult();
}
///
@@ -336,7 +336,7 @@ public static Cluster BeginUpdate(this IClustersOperations operations, string re
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -344,15 +344,15 @@ public static Cluster BeginUpdate(this IClustersOperations operations, string re
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// The cancellation token.
///
- public static async Task BeginUpdateAsync(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginUpdateAsync(this IClustersOperations operations, string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, cluster, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -365,7 +365,7 @@ public static Cluster BeginUpdate(this IClustersOperations operations, string re
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -385,7 +385,7 @@ public static void BeginDelete(this IClustersOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperations.cs
new file mode 100644
index 000000000000..a1bd0251cd25
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperations.cs
@@ -0,0 +1,1159 @@
+//
+// 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.Avs
+{
+ 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;
+
+ ///
+ /// HcxEnterpriseSitesOperations operations.
+ ///
+ internal partial class HcxEnterpriseSitesOperations : IServiceOperations, IHcxEnterpriseSitesOperations
+ {
+ ///
+ /// Initializes a new instance of the HcxEnterpriseSitesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal HcxEnterpriseSitesOperations(AvsClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AvsClient
+ ///
+ public AvsClient Client { get; private set; }
+
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ 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.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ 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;
+ }
+
+ ///
+ /// Get an HCX Enterprise Site by name in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (hcxEnterpriseSiteName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hcxEnterpriseSiteName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("hcxEnterpriseSiteName", hcxEnterpriseSiteName);
+ 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.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{hcxEnterpriseSiteName}", System.Uri.EscapeDataString(hcxEnterpriseSiteName));
+ 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;
+ }
+
+ ///
+ /// Create or update an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (hcxEnterpriseSiteName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hcxEnterpriseSiteName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ HcxEnterpriseSite hcxEnterpriseSite = new HcxEnterpriseSite();
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("hcxEnterpriseSiteName", hcxEnterpriseSiteName);
+ tracingParameters.Add("hcxEnterpriseSite", hcxEnterpriseSite);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{hcxEnterpriseSiteName}", System.Uri.EscapeDataString(hcxEnterpriseSiteName));
+ 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(hcxEnterpriseSite != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hcxEnterpriseSite, 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;
+ }
+
+ ///
+ /// Delete an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (privateCloudName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
+ }
+ if (hcxEnterpriseSiteName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hcxEnterpriseSiteName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateCloudName", privateCloudName);
+ tracingParameters.Add("hcxEnterpriseSiteName", hcxEnterpriseSiteName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{privateCloudName}", System.Uri.EscapeDataString(privateCloudName));
+ _url = _url.Replace("{hcxEnterpriseSiteName}", System.Uri.EscapeDataString(hcxEnterpriseSiteName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperationsExtensions.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperationsExtensions.cs
new file mode 100644
index 000000000000..8479b065feae
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/HcxEnterpriseSitesOperationsExtensions.cs
@@ -0,0 +1,234 @@
+//
+// 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.Avs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for HcxEnterpriseSitesOperations.
+ ///
+ public static partial class HcxEnterpriseSitesOperationsExtensions
+ {
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ public static IPage List(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName)
+ {
+ return operations.ListAsync(resourceGroupName, privateCloudName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, privateCloudName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get an HCX Enterprise Site by name in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ public static HcxEnterpriseSite Get(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName)
+ {
+ return operations.GetAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get an HCX Enterprise Site by name in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ public static HcxEnterpriseSite CreateOrUpdate(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ public static void Delete(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName)
+ {
+ operations.DeleteAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IHcxEnterpriseSitesOperations operations, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IHcxEnterpriseSitesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// 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 IHcxEnterpriseSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAuthorizationsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAuthorizationsOperations.cs
new file mode 100644
index 000000000000..d47d8f9c8e17
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAuthorizationsOperations.cs
@@ -0,0 +1,211 @@
+//
+// 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.Avs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// AuthorizationsOperations operations.
+ ///
+ public partial interface IAuthorizationsOperations
+ {
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get an ExpressRoute Circuit Authorization by name in a private
+ /// cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private
+ /// cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update an ExpressRoute Circuit Authorization in a private
+ /// cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete an ExpressRoute Circuit Authorization in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the ExpressRoute Circuit Authorization in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string authorizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List ExpressRoute Circuit Authorizations in a private cloud
+ ///
+ ///
+ /// 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));
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAvsClient.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAvsClient.cs
index 2146c8e1754a..9a1f08824bc6 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAvsClient.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IAvsClient.cs
@@ -41,15 +41,14 @@ public partial interface IAvsClient : System.IDisposable
ServiceClientCredentials Credentials { get; }
///
- /// Unique identifier for the Azure subscription
+ /// The API version to use for this operation.
///
- string SubscriptionId { get; set; }
+ string ApiVersion { get; }
///
- /// Version of Azure VMware Solution API to be used with the client
- /// request
+ /// The ID of the target subscription.
///
- string ApiVersion { get; }
+ string SubscriptionId { get; set; }
///
/// The preferred language for the response.
@@ -90,5 +89,15 @@ public partial interface IAvsClient : System.IDisposable
///
IClustersOperations Clusters { get; }
+ ///
+ /// Gets the IHcxEnterpriseSitesOperations.
+ ///
+ IHcxEnterpriseSitesOperations HcxEnterpriseSites { get; }
+
+ ///
+ /// Gets the IAuthorizationsOperations.
+ ///
+ IAuthorizationsOperations Authorizations { get; }
+
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IClustersOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IClustersOperations.cs
index 650a2565cefc..d69c6b729be2 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IClustersOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IClustersOperations.cs
@@ -27,7 +27,7 @@ public partial interface IClustersOperations
/// List clusters in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -38,7 +38,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -52,7 +52,7 @@ public partial interface IClustersOperations
/// Get a cluster by name in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -66,7 +66,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -80,7 +80,7 @@ public partial interface IClustersOperations
/// Create or update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -97,7 +97,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -111,7 +111,7 @@ public partial interface IClustersOperations
/// Update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -119,8 +119,8 @@ public partial interface IClustersOperations
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// The headers that will be added to request.
@@ -128,7 +128,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -137,12 +137,12 @@ public partial interface IClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Delete a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -156,7 +156,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -167,7 +167,7 @@ public partial interface IClustersOperations
/// Create or update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the private cloud.
@@ -184,7 +184,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -198,7 +198,7 @@ public partial interface IClustersOperations
/// Update a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -206,8 +206,8 @@ public partial interface IClustersOperations
///
/// Name of the cluster in the private cloud
///
- ///
- /// A cluster in a private cloud
+ ///
+ /// The cluster properties to be updated
///
///
/// The headers that will be added to request.
@@ -215,7 +215,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -224,12 +224,12 @@ public partial interface IClustersOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, Cluster cluster, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, string clusterName, ClusterUpdate clusterUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Delete a cluster in a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -243,7 +243,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -262,7 +262,7 @@ public partial interface IClustersOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IHcxEnterpriseSitesOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IHcxEnterpriseSitesOperations.cs
new file mode 100644
index 000000000000..9a41a4eec5f3
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IHcxEnterpriseSitesOperations.cs
@@ -0,0 +1,155 @@
+//
+// 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.Avs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// HcxEnterpriseSitesOperations operations.
+ ///
+ public partial interface IHcxEnterpriseSitesOperations
+ {
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get an HCX Enterprise Site by name in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the private cloud.
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete an HCX Enterprise Site in a private cloud
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the private cloud
+ ///
+ ///
+ /// Name of the HCX Enterprise Site in the private cloud
+ ///
+ ///
+ /// 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 privateCloudName, string hcxEnterpriseSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List HCX Enterprise Sites in a private cloud
+ ///
+ ///
+ /// 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));
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ILocationsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ILocationsOperations.cs
index f731158265f3..dfd3b6412a86 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ILocationsOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/ILocationsOperations.cs
@@ -35,7 +35,7 @@ public partial interface ILocationsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -57,7 +57,7 @@ public partial interface ILocationsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IOperations.cs
index d3a4775d0972..a9c3edc4a392 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IOperations.cs
@@ -32,7 +32,7 @@ public partial interface IOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -54,7 +54,7 @@ public partial interface IOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IPrivateCloudsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IPrivateCloudsOperations.cs
index 2d470722138a..27cc51631820 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IPrivateCloudsOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/IPrivateCloudsOperations.cs
@@ -27,7 +27,7 @@ public partial interface IPrivateCloudsOperations
/// List private clouds in a resource group
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The headers that will be added to request.
@@ -35,7 +35,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -54,7 +54,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -68,7 +68,7 @@ public partial interface IPrivateCloudsOperations
/// Get a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -79,7 +79,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -93,7 +93,7 @@ public partial interface IPrivateCloudsOperations
/// Create or update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -107,7 +107,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -121,13 +121,13 @@ public partial interface IPrivateCloudsOperations
/// Update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// The headers that will be added to request.
@@ -135,7 +135,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -144,12 +144,12 @@ public partial interface IPrivateCloudsOperations
///
/// Thrown when a required parameter is null
///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Delete a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -160,7 +160,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -171,7 +171,7 @@ public partial interface IPrivateCloudsOperations
/// List the admin credentials for the private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -182,7 +182,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -196,7 +196,7 @@ public partial interface IPrivateCloudsOperations
/// Create or update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -210,7 +210,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -224,13 +224,13 @@ public partial interface IPrivateCloudsOperations
/// Update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// The headers that will be added to request.
@@ -238,7 +238,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -247,12 +247,12 @@ public partial interface IPrivateCloudsOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Delete a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -263,7 +263,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -282,7 +282,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -304,7 +304,7 @@ public partial interface IPrivateCloudsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/LocationsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/LocationsOperations.cs
index 8f10b1af0ef8..fffd5e9e857e 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/LocationsOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/LocationsOperations.cs
@@ -62,7 +62,7 @@ internal LocationsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -83,6 +83,13 @@ internal LocationsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (location == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
@@ -91,6 +98,13 @@ internal LocationsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -172,13 +186,14 @@ internal LocationsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -188,6 +203,10 @@ internal LocationsOperations(AvsClient client)
}
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);
@@ -244,7 +263,7 @@ internal LocationsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -265,6 +284,13 @@ internal LocationsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (location == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
@@ -273,6 +299,13 @@ internal LocationsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -354,13 +387,14 @@ internal LocationsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -370,6 +404,10 @@ internal LocationsOperations(AvsClient client)
}
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);
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorException.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorException.cs
deleted file mode 100644
index 604eafc89a33..000000000000
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorException.cs
+++ /dev/null
@@ -1,61 +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.Avs.Models
-{
- using Microsoft.Rest;
-
- ///
- /// Exception thrown for an invalid response with ApiError information.
- ///
- public partial class ApiErrorException : RestException
- {
- ///
- /// Gets information about the associated HTTP request.
- ///
- public HttpRequestMessageWrapper Request { get; set; }
-
- ///
- /// Gets information about the associated HTTP response.
- ///
- public HttpResponseMessageWrapper Response { get; set; }
-
- ///
- /// Gets or sets the body object.
- ///
- public ApiError Body { get; set; }
-
- ///
- /// Initializes a new instance of the ApiErrorException class.
- ///
- public ApiErrorException()
- {
- }
-
- ///
- /// Initializes a new instance of the ApiErrorException class.
- ///
- /// The exception message.
- public ApiErrorException(string message)
- : this(message, null)
- {
- }
-
- ///
- /// Initializes a new instance of the ApiErrorException class.
- ///
- /// The exception message.
- /// Inner exception.
- public ApiErrorException(string message, System.Exception innerException)
- : base(message, innerException)
- {
- }
- }
-}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Circuit.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Circuit.cs
index 7bd10fe203bc..47fa9fc7d502 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Circuit.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Circuit.cs
@@ -11,8 +11,6 @@
namespace Microsoft.Azure.Management.Avs.Models
{
using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
using System.Linq;
///
@@ -33,18 +31,15 @@ public Circuit()
///
/// CIDR of primary subnet
/// CIDR of secondary subnet
- /// Identifier of the ExpressRoute
+ /// Identifier of the ExpressRoute Circuit
/// (Microsoft Colo only)
- /// Authorizations for the ExpressRoute
- /// (Microsoft Colo only)
- /// ExpressRoute private
- /// peering identifier
- public Circuit(string primarySubnet = default(string), string secondarySubnet = default(string), string expressRouteID = default(string), IList authorizations = default(IList), string expressRoutePrivatePeeringID = default(string))
+ /// ExpressRoute Circuit
+ /// private peering identifier
+ public Circuit(string primarySubnet = default(string), string secondarySubnet = default(string), string expressRouteID = default(string), string expressRoutePrivatePeeringID = default(string))
{
PrimarySubnet = primarySubnet;
SecondarySubnet = secondarySubnet;
ExpressRouteID = expressRouteID;
- Authorizations = authorizations;
ExpressRoutePrivatePeeringID = expressRoutePrivatePeeringID;
CustomInit();
}
@@ -67,20 +62,13 @@ public Circuit()
public string SecondarySubnet { get; private set; }
///
- /// Gets identifier of the ExpressRoute (Microsoft Colo only)
+ /// Gets identifier of the ExpressRoute Circuit (Microsoft Colo only)
///
[JsonProperty(PropertyName = "expressRouteID")]
public string ExpressRouteID { get; private set; }
///
- /// Gets or sets authorizations for the ExpressRoute (Microsoft Colo
- /// only)
- ///
- [JsonProperty(PropertyName = "authorizations")]
- public IList Authorizations { get; set; }
-
- ///
- /// Gets expressRoute private peering identifier
+ /// Gets expressRoute Circuit private peering identifier
///
[JsonProperty(PropertyName = "expressRoutePrivatePeeringID")]
public string ExpressRoutePrivatePeeringID { get; private set; }
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Cluster.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Cluster.cs
index 6d902ec0a507..cb7d3ca0bc9d 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Cluster.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Cluster.cs
@@ -10,12 +10,17 @@
namespace Microsoft.Azure.Management.Avs.Models
{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
/// A cluster resource
///
+ [Rest.Serialization.JsonTransformation]
public partial class Cluster : Resource
{
///
@@ -29,15 +34,24 @@ public Cluster()
///
/// Initializes a new instance of the Cluster class.
///
+ /// The cluster SKU
/// Resource ID.
/// Resource name.
/// Resource type.
- /// The properties of a cluster
- /// resource
- public Cluster(string id = default(string), string name = default(string), string type = default(string), ClusterProperties properties = default(ClusterProperties))
+ /// The cluster size
+ /// The state of the cluster
+ /// provisioning. Possible values include: 'Succeeded', 'Failed',
+ /// 'Cancelled', 'Deleting', 'Updating'
+ /// The identity
+ /// The hosts
+ public Cluster(Sku sku, string id = default(string), string name = default(string), string type = default(string), int? clusterSize = default(int?), string provisioningState = default(string), int? clusterId = default(int?), IList hosts = default(IList))
: base(id, name, type)
{
- Properties = properties;
+ Sku = sku;
+ ClusterSize = clusterSize;
+ ProvisioningState = provisioningState;
+ ClusterId = clusterId;
+ Hosts = hosts;
CustomInit();
}
@@ -47,10 +61,52 @@ public Cluster()
partial void CustomInit();
///
- /// Gets or sets the properties of a cluster resource
+ /// Gets or sets the cluster SKU
///
- [JsonProperty(PropertyName = "properties")]
- public ClusterProperties Properties { get; set; }
+ [JsonProperty(PropertyName = "sku")]
+ public Sku Sku { get; set; }
+ ///
+ /// Gets or sets the cluster size
+ ///
+ [JsonProperty(PropertyName = "properties.clusterSize")]
+ public int? ClusterSize { get; set; }
+
+ ///
+ /// Gets or sets the state of the cluster provisioning. Possible values
+ /// include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Gets the identity
+ ///
+ [JsonProperty(PropertyName = "properties.clusterId")]
+ public int? ClusterId { get; private set; }
+
+ ///
+ /// Gets the hosts
+ ///
+ [JsonProperty(PropertyName = "properties.hosts")]
+ public IList Hosts { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProperties.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProperties.cs
deleted file mode 100644
index b1c114ee8215..000000000000
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProperties.cs
+++ /dev/null
@@ -1,60 +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.Avs.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// The properties of a cluster
- ///
- public partial class ClusterProperties : DefaultClusterProperties
- {
- ///
- /// Initializes a new instance of the ClusterProperties class.
- ///
- public ClusterProperties()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ClusterProperties class.
- ///
- /// The identity
- /// The cluster size
- /// The hosts
- /// The state of the cluster
- /// provisioning. Possible values include: 'Succeeded', 'Failed',
- /// 'Cancelled', 'Updating'
- public ClusterProperties(int? clusterId = default(int?), int? clusterSize = default(int?), IList hosts = default(IList), string provisioningState = default(string))
- : base(clusterId, clusterSize, hosts)
- {
- ProvisioningState = provisioningState;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets the state of the cluster provisioning. Possible values
- /// include: 'Succeeded', 'Failed', 'Cancelled', 'Updating'
- ///
- [JsonProperty(PropertyName = "provisioningState")]
- public string ProvisioningState { get; private set; }
-
- }
-}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProvisioningState.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProvisioningState.cs
index 9ea88b9d2339..c9d9118757b0 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProvisioningState.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterProvisioningState.cs
@@ -19,6 +19,7 @@ public static class ClusterProvisioningState
public const string Succeeded = "Succeeded";
public const string Failed = "Failed";
public const string Cancelled = "Cancelled";
+ public const string Deleting = "Deleting";
public const string Updating = "Updating";
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdate.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdate.cs
new file mode 100644
index 000000000000..9f7592be6aa2
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdate.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Avs.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An update of a cluster resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ClusterUpdate
+ {
+ ///
+ /// Initializes a new instance of the ClusterUpdate class.
+ ///
+ public ClusterUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ClusterUpdate class.
+ ///
+ /// The cluster size
+ public ClusterUpdate(int? clusterSize = default(int?))
+ {
+ ClusterSize = clusterSize;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the cluster size
+ ///
+ [JsonProperty(PropertyName = "properties.clusterSize")]
+ public int? ClusterSize { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiError.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdateProperties.cs
similarity index 59%
rename from sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiError.cs
rename to sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdateProperties.cs
index fef10e8de549..c55da6cf5e02 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiError.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ClusterUpdateProperties.cs
@@ -14,25 +14,25 @@ namespace Microsoft.Azure.Management.Avs.Models
using System.Linq;
///
- /// API error response
+ /// The properties of a cluster that may be updated
///
- public partial class ApiError
+ public partial class ClusterUpdateProperties
{
///
- /// Initializes a new instance of the ApiError class.
+ /// Initializes a new instance of the ClusterUpdateProperties class.
///
- public ApiError()
+ public ClusterUpdateProperties()
{
CustomInit();
}
///
- /// Initializes a new instance of the ApiError class.
+ /// Initializes a new instance of the ClusterUpdateProperties class.
///
- /// An error returned by the API
- public ApiError(ApiErrorBase error = default(ApiErrorBase))
+ /// The cluster size
+ public ClusterUpdateProperties(int? clusterSize = default(int?))
{
- Error = error;
+ ClusterSize = clusterSize;
CustomInit();
}
@@ -42,10 +42,10 @@ public ApiError()
partial void CustomInit();
///
- /// Gets or sets an error returned by the API
+ /// Gets or sets the cluster size
///
- [JsonProperty(PropertyName = "error")]
- public ApiErrorBase Error { get; set; }
+ [JsonProperty(PropertyName = "clusterSize")]
+ public int? ClusterSize { get; set; }
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Endpoints.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Endpoints.cs
index 452f57ee4373..2178ac6b2713 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Endpoints.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Endpoints.cs
@@ -33,10 +33,13 @@ public Endpoints()
/// manager
/// Endpoint for Virtual Center Server
/// Appliance
- public Endpoints(string nsxtManager = default(string), string vcsa = default(string))
+ /// Endpoint for the HCX Cloud
+ /// Manager
+ public Endpoints(string nsxtManager = default(string), string vcsa = default(string), string hcxCloudManager = default(string))
{
NsxtManager = nsxtManager;
Vcsa = vcsa;
+ HcxCloudManager = hcxCloudManager;
CustomInit();
}
@@ -57,5 +60,11 @@ public Endpoints()
[JsonProperty(PropertyName = "vcsa")]
public string Vcsa { get; private set; }
+ ///
+ /// Gets endpoint for the HCX Cloud Manager
+ ///
+ [JsonProperty(PropertyName = "hcxCloudManager")]
+ public string HcxCloudManager { get; private set; }
+
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..a35714fc044c
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ /// The additional info type.
+ /// The additional info.
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+ {
+ Type = type;
+ Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [JsonProperty(PropertyName = "info")]
+ public object Info { get; private set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorResponse.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorResponse.cs
new file mode 100644
index 000000000000..f90dd8e1653b
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,90 @@
+//
+// 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.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Error Response
+ ///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return
+ /// error details for failed operations. (This also follows the OData error
+ /// response format.)
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The error code.
+ /// The error message.
+ /// The error target.
+ /// The error details.
+ /// The error additional info.
+ public ErrorResponse(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [JsonProperty(PropertyName = "additionalInfo")]
+ public IList AdditionalInfo { get; private set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorization.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorization.cs
index add24308e259..324499cbf468 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorization.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorization.cs
@@ -10,13 +10,16 @@
namespace Microsoft.Azure.Management.Avs.Models
{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
- /// Authorization for an ExpressRoute
+ /// ExpressRoute Circuit Authorization
///
- public partial class ExpressRouteAuthorization
+ [Rest.Serialization.JsonTransformation]
+ public partial class ExpressRouteAuthorization : Resource
{
///
/// Initializes a new instance of the ExpressRouteAuthorization class.
@@ -29,14 +32,22 @@ public ExpressRouteAuthorization()
///
/// Initializes a new instance of the ExpressRouteAuthorization class.
///
- /// The name of the ExpressRoute
- /// The ID of the ExpressRoute
- /// The key of the ExpressRoute
- public ExpressRouteAuthorization(string name = default(string), string id = default(string), string key = default(string))
+ /// Resource ID.
+ /// Resource name.
+ /// Resource type.
+ /// The state of the ExpressRoute
+ /// Circuit Authorization provisioning. Possible values include:
+ /// 'Succeeded', 'Failed', 'Updating'
+ /// The ID of the
+ /// ExpressRoute Circuit Authorization
+ /// The key of the
+ /// ExpressRoute Circuit Authorization
+ public ExpressRouteAuthorization(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string expressRouteAuthorizationId = default(string), string expressRouteAuthorizationKey = default(string))
+ : base(id, name, type)
{
- Name = name;
- Id = id;
- Key = key;
+ ProvisioningState = provisioningState;
+ ExpressRouteAuthorizationId = expressRouteAuthorizationId;
+ ExpressRouteAuthorizationKey = expressRouteAuthorizationKey;
CustomInit();
}
@@ -46,22 +57,24 @@ public ExpressRouteAuthorization()
partial void CustomInit();
///
- /// Gets or sets the name of the ExpressRoute
+ /// Gets the state of the ExpressRoute Circuit Authorization
+ /// provisioning. Possible values include: 'Succeeded', 'Failed',
+ /// 'Updating'
///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
///
- /// Gets the ID of the ExpressRoute
+ /// Gets the ID of the ExpressRoute Circuit Authorization
///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; private set; }
+ [JsonProperty(PropertyName = "properties.expressRouteAuthorizationId")]
+ public string ExpressRouteAuthorizationId { get; private set; }
///
- /// Gets the key of the ExpressRoute
+ /// Gets the key of the ExpressRoute Circuit Authorization
///
- [JsonProperty(PropertyName = "key")]
- public string Key { get; private set; }
+ [JsonProperty(PropertyName = "properties.expressRouteAuthorizationKey")]
+ public string ExpressRouteAuthorizationKey { get; private set; }
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs
new file mode 100644
index 000000000000..98ae02036550
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Avs.Models
+{
+
+ ///
+ /// Defines values for ExpressRouteAuthorizationProvisioningState.
+ ///
+ public static class ExpressRouteAuthorizationProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Updating = "Updating";
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSite.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSite.cs
new file mode 100644
index 000000000000..8d88666e5c01
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSite.cs
@@ -0,0 +1,69 @@
+//
+// 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.Avs.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An HCX Enterprise Site resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class HcxEnterpriseSite : Resource
+ {
+ ///
+ /// Initializes a new instance of the HcxEnterpriseSite class.
+ ///
+ public HcxEnterpriseSite()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the HcxEnterpriseSite class.
+ ///
+ /// Resource ID.
+ /// Resource name.
+ /// Resource type.
+ /// The activation key
+ /// The status of the HCX Enterprise Site.
+ /// Possible values include: 'Available', 'Consumed', 'Deactivated',
+ /// 'Deleted'
+ public HcxEnterpriseSite(string id = default(string), string name = default(string), string type = default(string), string activationKey = default(string), string status = default(string))
+ : base(id, name, type)
+ {
+ ActivationKey = activationKey;
+ Status = status;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the activation key
+ ///
+ [JsonProperty(PropertyName = "properties.activationKey")]
+ public string ActivationKey { get; private set; }
+
+ ///
+ /// Gets the status of the HCX Enterprise Site. Possible values
+ /// include: 'Available', 'Consumed', 'Deactivated', 'Deleted'
+ ///
+ [JsonProperty(PropertyName = "properties.status")]
+ public string Status { get; private set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs
new file mode 100644
index 000000000000..eb9639dfe67a
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.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.Avs.Models
+{
+
+ ///
+ /// Defines values for HcxEnterpriseSiteStatus.
+ ///
+ public static class HcxEnterpriseSiteStatus
+ {
+ public const string Available = "Available";
+ public const string Consumed = "Consumed";
+ public const string Deactivated = "Deactivated";
+ public const string Deleted = "Deleted";
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/LogSpecification.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/LogSpecification.cs
new file mode 100644
index 000000000000..a7abbd4665d4
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/LogSpecification.cs
@@ -0,0 +1,68 @@
+//
+// 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.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Specifications of the Log for Azure Monitoring
+ ///
+ public partial class LogSpecification
+ {
+ ///
+ /// Initializes a new instance of the LogSpecification class.
+ ///
+ public LogSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LogSpecification class.
+ ///
+ /// Name of the log
+ /// Localized friendly display name of the
+ /// log
+ /// Blob duration of the log
+ public LogSpecification(string name = default(string), string displayName = default(string), string blobDuration = default(string))
+ {
+ Name = name;
+ DisplayName = displayName;
+ BlobDuration = blobDuration;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the log
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets localized friendly display name of the log
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets blob duration of the log
+ ///
+ [JsonProperty(PropertyName = "blobDuration")]
+ public string BlobDuration { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/DefaultClusterProperties.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ManagementCluster.cs
similarity index 61%
rename from sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/DefaultClusterProperties.cs
rename to sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ManagementCluster.cs
index 9a477be0aa80..fe051ed0ed66 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/DefaultClusterProperties.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ManagementCluster.cs
@@ -18,26 +18,30 @@ namespace Microsoft.Azure.Management.Avs.Models
///
/// The properties of a default cluster
///
- public partial class DefaultClusterProperties
+ public partial class ManagementCluster : ClusterUpdateProperties
{
///
- /// Initializes a new instance of the DefaultClusterProperties class.
+ /// Initializes a new instance of the ManagementCluster class.
///
- public DefaultClusterProperties()
+ public ManagementCluster()
{
CustomInit();
}
///
- /// Initializes a new instance of the DefaultClusterProperties class.
+ /// Initializes a new instance of the ManagementCluster class.
///
- /// The identity
/// The cluster size
+ /// The state of the cluster
+ /// provisioning. Possible values include: 'Succeeded', 'Failed',
+ /// 'Cancelled', 'Deleting', 'Updating'
+ /// The identity
/// The hosts
- public DefaultClusterProperties(int? clusterId = default(int?), int? clusterSize = default(int?), IList hosts = default(IList))
+ public ManagementCluster(int? clusterSize = default(int?), string provisioningState = default(string), int? clusterId = default(int?), IList hosts = default(IList))
+ : base(clusterSize)
{
+ ProvisioningState = provisioningState;
ClusterId = clusterId;
- ClusterSize = clusterSize;
Hosts = hosts;
CustomInit();
}
@@ -48,16 +52,17 @@ public DefaultClusterProperties()
partial void CustomInit();
///
- /// Gets the identity
+ /// Gets or sets the state of the cluster provisioning. Possible values
+ /// include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'
///
- [JsonProperty(PropertyName = "clusterId")]
- public int? ClusterId { get; private set; }
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; set; }
///
- /// Gets or sets the cluster size
+ /// Gets the identity
///
- [JsonProperty(PropertyName = "clusterSize")]
- public int? ClusterSize { get; set; }
+ [JsonProperty(PropertyName = "clusterId")]
+ public int? ClusterId { get; private set; }
///
/// Gets the hosts
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricDimension.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricDimension.cs
new file mode 100644
index 000000000000..56d2fed3a036
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricDimension.cs
@@ -0,0 +1,60 @@
+//
+// 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.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Specifications of the Dimension of metrics
+ ///
+ public partial class MetricDimension
+ {
+ ///
+ /// Initializes a new instance of the MetricDimension class.
+ ///
+ public MetricDimension()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MetricDimension class.
+ ///
+ /// Name of the dimension
+ /// Localized friendly display name of the
+ /// dimension
+ public MetricDimension(string name = default(string), string displayName = default(string))
+ {
+ Name = name;
+ DisplayName = displayName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the dimension
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets localized friendly display name of the dimension
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricSpecification.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricSpecification.cs
new file mode 100644
index 000000000000..2362af571c91
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/MetricSpecification.cs
@@ -0,0 +1,164 @@
+//
+// 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.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Specifications of the Metrics for Azure Monitoring
+ ///
+ public partial class MetricSpecification
+ {
+ ///
+ /// Initializes a new instance of the MetricSpecification class.
+ ///
+ public MetricSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MetricSpecification class.
+ ///
+ /// Name of the metric
+ /// Localized friendly display name of the
+ /// metric
+ /// Localized friendly description of
+ /// the metric
+ /// Unit that makes sense for the metric
+ /// Name of the metric category that the metric
+ /// belongs to. A metric can only belong to a single category.
+ /// Only provide one value for this
+ /// field. Valid values: Average, Minimum, Maximum, Total,
+ /// Count.
+ /// Supported aggregation
+ /// types
+ /// Supported time grain
+ /// types
+ /// Optional. If set to true, then zero
+ /// will be returned for time duration where no metric is
+ /// emitted/published.
+ /// Dimensions of the metric
+ /// Whether or not the service
+ /// is using regional MDM accounts.
+ /// The name of the MDM account.
+ /// The name of the MDM
+ /// namespace.
+ public MetricSpecification(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string category = default(string), string aggregationType = default(string), IList supportedAggregationTypes = default(IList), IList supportedTimeGrainTypes = default(IList), bool? fillGapWithZero = default(bool?), IList dimensions = default(IList), string enableRegionalMdmAccount = default(string), string sourceMdmAccount = default(string), string sourceMdmNamespace = default(string))
+ {
+ Name = name;
+ DisplayName = displayName;
+ DisplayDescription = displayDescription;
+ Unit = unit;
+ Category = category;
+ AggregationType = aggregationType;
+ SupportedAggregationTypes = supportedAggregationTypes;
+ SupportedTimeGrainTypes = supportedTimeGrainTypes;
+ FillGapWithZero = fillGapWithZero;
+ Dimensions = dimensions;
+ EnableRegionalMdmAccount = enableRegionalMdmAccount;
+ SourceMdmAccount = sourceMdmAccount;
+ SourceMdmNamespace = sourceMdmNamespace;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the metric
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets localized friendly display name of the metric
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets localized friendly description of the metric
+ ///
+ [JsonProperty(PropertyName = "displayDescription")]
+ public string DisplayDescription { get; set; }
+
+ ///
+ /// Gets or sets unit that makes sense for the metric
+ ///
+ [JsonProperty(PropertyName = "unit")]
+ public string Unit { get; set; }
+
+ ///
+ /// Gets or sets name of the metric category that the metric belongs
+ /// to. A metric can only belong to a single category.
+ ///
+ [JsonProperty(PropertyName = "category")]
+ public string Category { get; set; }
+
+ ///
+ /// Gets or sets only provide one value for this field. Valid values:
+ /// Average, Minimum, Maximum, Total, Count.
+ ///
+ [JsonProperty(PropertyName = "aggregationType")]
+ public string AggregationType { get; set; }
+
+ ///
+ /// Gets or sets supported aggregation types
+ ///
+ [JsonProperty(PropertyName = "supportedAggregationTypes")]
+ public IList SupportedAggregationTypes { get; set; }
+
+ ///
+ /// Gets or sets supported time grain types
+ ///
+ [JsonProperty(PropertyName = "supportedTimeGrainTypes")]
+ public IList SupportedTimeGrainTypes { get; set; }
+
+ ///
+ /// Gets or sets optional. If set to true, then zero will be returned
+ /// for time duration where no metric is emitted/published.
+ ///
+ [JsonProperty(PropertyName = "fillGapWithZero")]
+ public bool? FillGapWithZero { get; set; }
+
+ ///
+ /// Gets or sets dimensions of the metric
+ ///
+ [JsonProperty(PropertyName = "dimensions")]
+ public IList Dimensions { get; set; }
+
+ ///
+ /// Gets or sets whether or not the service is using regional MDM
+ /// accounts.
+ ///
+ [JsonProperty(PropertyName = "enableRegionalMdmAccount")]
+ public string EnableRegionalMdmAccount { get; set; }
+
+ ///
+ /// Gets or sets the name of the MDM account.
+ ///
+ [JsonProperty(PropertyName = "sourceMdmAccount")]
+ public string SourceMdmAccount { get; set; }
+
+ ///
+ /// Gets or sets the name of the MDM namespace.
+ ///
+ [JsonProperty(PropertyName = "sourceMdmNamespace")]
+ public string SourceMdmNamespace { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Operation.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Operation.cs
index ca00e0fa0ee0..ac757b6f4ae5 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Operation.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Operation.cs
@@ -33,10 +33,17 @@ public Operation()
/// object
/// Contains the localized display information
/// for this operation
- public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay))
+ /// Gets or sets a value indicating whether
+ /// the operation is a data action or not
+ /// Origin of the operation
+ /// Properties of the operation
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay), bool? isDataAction = default(bool?), string origin = default(string), OperationProperties properties = default(OperationProperties))
{
Name = name;
Display = display;
+ IsDataAction = isDataAction;
+ Origin = origin;
+ Properties = properties;
CustomInit();
}
@@ -57,5 +64,24 @@ public Operation()
[JsonProperty(PropertyName = "display")]
public OperationDisplay Display { get; private set; }
+ ///
+ /// Gets or sets a value indicating whether the operation is a data
+ /// action or not
+ ///
+ [JsonProperty(PropertyName = "isDataAction")]
+ public bool? IsDataAction { get; set; }
+
+ ///
+ /// Gets or sets origin of the operation
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; set; }
+
+ ///
+ /// Gets or sets properties of the operation
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public OperationProperties Properties { get; set; }
+
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorBase.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/OperationProperties.cs
similarity index 53%
rename from sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorBase.cs
rename to sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/OperationProperties.cs
index 4080cb9ec18c..3c2f913b17e1 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ApiErrorBase.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/OperationProperties.cs
@@ -14,27 +14,26 @@ namespace Microsoft.Azure.Management.Avs.Models
using System.Linq;
///
- /// Api error.
+ /// Extra Operation properties
///
- public partial class ApiErrorBase
+ public partial class OperationProperties
{
///
- /// Initializes a new instance of the ApiErrorBase class.
+ /// Initializes a new instance of the OperationProperties class.
///
- public ApiErrorBase()
+ public OperationProperties()
{
CustomInit();
}
///
- /// Initializes a new instance of the ApiErrorBase class.
+ /// Initializes a new instance of the OperationProperties class.
///
- /// Error code
- /// Error message
- public ApiErrorBase(string code = default(string), string message = default(string))
+ /// Service specifications of the
+ /// operation
+ public OperationProperties(ServiceSpecification serviceSpecification = default(ServiceSpecification))
{
- Code = code;
- Message = message;
+ ServiceSpecification = serviceSpecification;
CustomInit();
}
@@ -44,16 +43,10 @@ public ApiErrorBase()
partial void CustomInit();
///
- /// Gets or sets error code
+ /// Gets or sets service specifications of the operation
///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets error message
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
+ [JsonProperty(PropertyName = "serviceSpecification")]
+ public ServiceSpecification ServiceSpecification { get; set; }
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloud.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloud.cs
index b2087f01cdc4..4e5acde239e7 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloud.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloud.cs
@@ -10,6 +10,8 @@
namespace Microsoft.Azure.Management.Avs.Models
{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,6 +20,7 @@ namespace Microsoft.Azure.Management.Avs.Models
///
/// A private cloud resource
///
+ [Rest.Serialization.JsonTransformation]
public partial class PrivateCloud : TrackedResource
{
///
@@ -31,19 +34,59 @@ public PrivateCloud()
///
/// Initializes a new instance of the PrivateCloud class.
///
+ /// The private cloud SKU
+ /// The block of addresses should be unique
+ /// across VNet in your subscription as well as on-premise. Make sure
+ /// the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are
+ /// between 0 and 255, and X is between 0 and 22
/// Resource ID.
/// Resource name.
/// Resource type.
/// Resource location
/// Resource tags
- /// The private cloud SKU
- /// The properties of a private cloud
- /// resource
- public PrivateCloud(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), PrivateCloudProperties properties = default(PrivateCloudProperties))
+ /// The default cluster used for
+ /// management
+ /// Connectivity to internet is enabled or
+ /// disabled. Possible values include: 'Enabled', 'Disabled'
+ /// vCenter Single Sign On Identity
+ /// Sources
+ /// The provisioning state. Possible
+ /// values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending',
+ /// 'Building', 'Deleting', 'Updating'
+ /// An ExpressRoute Circuit
+ /// The endpoints
+ /// Network used to access vCenter
+ /// Server and NSX-T Manager
+ /// Used for virtual machine cold
+ /// migration, cloning, and snapshot migration
+ /// Used for live migration of virtual
+ /// machines
+ /// Optionally, set the vCenter admin
+ /// password when the private cloud is created
+ /// Optionally, set the NSX-T Manager
+ /// password when the private cloud is created
+ /// Thumbprint of the
+ /// vCenter Server SSL certificate
+ /// Thumbprint of the NSX-T
+ /// Manager SSL certificate
+ public PrivateCloud(Sku sku, string networkBlock, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagementCluster managementCluster = default(ManagementCluster), string internet = default(string), IList identitySources = default(IList), string provisioningState = default(string), Circuit circuit = default(Circuit), Endpoints endpoints = default(Endpoints), string managementNetwork = default(string), string provisioningNetwork = default(string), string vmotionNetwork = default(string), string vcenterPassword = default(string), string nsxtPassword = default(string), string vcenterCertificateThumbprint = default(string), string nsxtCertificateThumbprint = default(string))
: base(id, name, type, location, tags)
{
Sku = sku;
- Properties = properties;
+ ManagementCluster = managementCluster;
+ Internet = internet;
+ IdentitySources = identitySources;
+ ProvisioningState = provisioningState;
+ Circuit = circuit;
+ Endpoints = endpoints;
+ NetworkBlock = networkBlock;
+ ManagementNetwork = managementNetwork;
+ ProvisioningNetwork = provisioningNetwork;
+ VmotionNetwork = vmotionNetwork;
+ VcenterPassword = vcenterPassword;
+ NsxtPassword = nsxtPassword;
+ VcenterCertificateThumbprint = vcenterCertificateThumbprint;
+ NsxtCertificateThumbprint = nsxtCertificateThumbprint;
CustomInit();
}
@@ -59,19 +102,114 @@ public PrivateCloud()
public Sku Sku { get; set; }
///
- /// Gets or sets the properties of a private cloud resource
+ /// Gets or sets the default cluster used for management
+ ///
+ [JsonProperty(PropertyName = "properties.managementCluster")]
+ public ManagementCluster ManagementCluster { get; set; }
+
+ ///
+ /// Gets or sets connectivity to internet is enabled or disabled.
+ /// Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.internet")]
+ public string Internet { get; set; }
+
+ ///
+ /// Gets or sets vCenter Single Sign On Identity Sources
+ ///
+ [JsonProperty(PropertyName = "properties.identitySources")]
+ public IList IdentitySources { get; set; }
+
+ ///
+ /// Gets the provisioning state. Possible values include: 'Succeeded',
+ /// 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting',
+ /// 'Updating'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets an ExpressRoute Circuit
+ ///
+ [JsonProperty(PropertyName = "properties.circuit")]
+ public Circuit Circuit { get; set; }
+
+ ///
+ /// Gets the endpoints
+ ///
+ [JsonProperty(PropertyName = "properties.endpoints")]
+ public Endpoints Endpoints { get; private set; }
+
+ ///
+ /// Gets or sets the block of addresses should be unique across VNet in
+ /// your subscription as well as on-premise. Make sure the CIDR format
+ /// is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255,
+ /// and X is between 0 and 22
+ ///
+ [JsonProperty(PropertyName = "properties.networkBlock")]
+ public string NetworkBlock { get; set; }
+
+ ///
+ /// Gets network used to access vCenter Server and NSX-T Manager
///
- [JsonProperty(PropertyName = "properties")]
- public PrivateCloudProperties Properties { get; set; }
+ [JsonProperty(PropertyName = "properties.managementNetwork")]
+ public string ManagementNetwork { get; private set; }
+
+ ///
+ /// Gets used for virtual machine cold migration, cloning, and snapshot
+ /// migration
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningNetwork")]
+ public string ProvisioningNetwork { get; private set; }
+
+ ///
+ /// Gets used for live migration of virtual machines
+ ///
+ [JsonProperty(PropertyName = "properties.vmotionNetwork")]
+ public string VmotionNetwork { get; private set; }
+
+ ///
+ /// Gets or sets optionally, set the vCenter admin password when the
+ /// private cloud is created
+ ///
+ [JsonProperty(PropertyName = "properties.vcenterPassword")]
+ public string VcenterPassword { get; set; }
+
+ ///
+ /// Gets or sets optionally, set the NSX-T Manager password when the
+ /// private cloud is created
+ ///
+ [JsonProperty(PropertyName = "properties.nsxtPassword")]
+ public string NsxtPassword { get; set; }
+
+ ///
+ /// Gets thumbprint of the vCenter Server SSL certificate
+ ///
+ [JsonProperty(PropertyName = "properties.vcenterCertificateThumbprint")]
+ public string VcenterCertificateThumbprint { get; private set; }
+
+ ///
+ /// Gets thumbprint of the NSX-T Manager SSL certificate
+ ///
+ [JsonProperty(PropertyName = "properties.nsxtCertificateThumbprint")]
+ public string NsxtCertificateThumbprint { get; private set; }
///
/// Validate the object.
///
- ///
+ ///
/// Thrown if validation fails
///
public virtual void Validate()
{
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (NetworkBlock == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "NetworkBlock");
+ }
if (Sku != null)
{
Sku.Validate();
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProperties.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProperties.cs
deleted file mode 100644
index 3929d299d439..000000000000
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProperties.cs
+++ /dev/null
@@ -1,188 +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.Avs.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// The properties of a private cloud resource
- ///
- public partial class PrivateCloudProperties
- {
- ///
- /// Initializes a new instance of the PrivateCloudProperties class.
- ///
- public PrivateCloudProperties()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PrivateCloudProperties class.
- ///
- /// The provisioning state. Possible
- /// values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending',
- /// 'Building', 'Updating'
- /// An ExpressRoute Circuit
- /// The default cluster used for
- /// management
- /// The clusters
- /// The endpoints
- /// Connectivity to internet is enabled or
- /// disabled. Possible values include: 'Enabled', 'Disabled'
- /// vCenter Single Sign On Identity
- /// Sources
- /// The block of addresses should be unique
- /// across VNet in your subscription as well as on-premise. Make sure
- /// the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are
- /// between 0 and 255, and X is between 0 and 22
- /// Network used to access vCenter
- /// Server and NSX-T Manager
- /// Used for virtual machine cold
- /// migration, cloning, and snapshot migration
- /// Used for live migration of virtual
- /// machines
- /// Optionally, set the vCenter admin
- /// password when the private cloud is created
- /// Optionally, set the NSX-T Manager
- /// password when the private cloud is created
- /// Thumbprint of the
- /// vCenter Server SSL certificate
- /// Thumbprint of the NSX-T
- /// Manager SSL certificate
- public PrivateCloudProperties(string provisioningState = default(string), Circuit circuit = default(Circuit), DefaultClusterProperties cluster = default(DefaultClusterProperties), IList clusters = default(IList), Endpoints endpoints = default(Endpoints), string internet = default(string), IList identitySources = default(IList), string networkBlock = default(string), string managementNetwork = default(string), string provisioningNetwork = default(string), string vmotionNetwork = default(string), string vcenterPassword = default(string), string nsxtPassword = default(string), string vcenterCertificateThumbprint = default(string), string nsxtCertificateThumbprint = default(string))
- {
- ProvisioningState = provisioningState;
- Circuit = circuit;
- Cluster = cluster;
- Clusters = clusters;
- Endpoints = endpoints;
- Internet = internet;
- IdentitySources = identitySources;
- NetworkBlock = networkBlock;
- ManagementNetwork = managementNetwork;
- ProvisioningNetwork = provisioningNetwork;
- VmotionNetwork = vmotionNetwork;
- VcenterPassword = vcenterPassword;
- NsxtPassword = nsxtPassword;
- VcenterCertificateThumbprint = vcenterCertificateThumbprint;
- NsxtCertificateThumbprint = nsxtCertificateThumbprint;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets the provisioning state. Possible values include: 'Succeeded',
- /// 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating'
- ///
- [JsonProperty(PropertyName = "provisioningState")]
- public string ProvisioningState { get; private set; }
-
- ///
- /// Gets or sets an ExpressRoute Circuit
- ///
- [JsonProperty(PropertyName = "circuit")]
- public Circuit Circuit { get; set; }
-
- ///
- /// Gets or sets the default cluster used for management
- ///
- [JsonProperty(PropertyName = "cluster")]
- public DefaultClusterProperties Cluster { get; set; }
-
- ///
- /// Gets the clusters
- ///
- [JsonProperty(PropertyName = "clusters")]
- public IList Clusters { get; private set; }
-
- ///
- /// Gets the endpoints
- ///
- [JsonProperty(PropertyName = "endpoints")]
- public Endpoints Endpoints { get; private set; }
-
- ///
- /// Gets or sets connectivity to internet is enabled or disabled.
- /// Possible values include: 'Enabled', 'Disabled'
- ///
- [JsonProperty(PropertyName = "internet")]
- public string Internet { get; set; }
-
- ///
- /// Gets or sets vCenter Single Sign On Identity Sources
- ///
- [JsonProperty(PropertyName = "identitySources")]
- public IList IdentitySources { get; set; }
-
- ///
- /// Gets or sets the block of addresses should be unique across VNet in
- /// your subscription as well as on-premise. Make sure the CIDR format
- /// is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255,
- /// and X is between 0 and 22
- ///
- [JsonProperty(PropertyName = "networkBlock")]
- public string NetworkBlock { get; set; }
-
- ///
- /// Gets network used to access vCenter Server and NSX-T Manager
- ///
- [JsonProperty(PropertyName = "managementNetwork")]
- public string ManagementNetwork { get; private set; }
-
- ///
- /// Gets used for virtual machine cold migration, cloning, and snapshot
- /// migration
- ///
- [JsonProperty(PropertyName = "provisioningNetwork")]
- public string ProvisioningNetwork { get; private set; }
-
- ///
- /// Gets used for live migration of virtual machines
- ///
- [JsonProperty(PropertyName = "vmotionNetwork")]
- public string VmotionNetwork { get; private set; }
-
- ///
- /// Gets or sets optionally, set the vCenter admin password when the
- /// private cloud is created
- ///
- [JsonProperty(PropertyName = "vcenterPassword")]
- public string VcenterPassword { get; set; }
-
- ///
- /// Gets or sets optionally, set the NSX-T Manager password when the
- /// private cloud is created
- ///
- [JsonProperty(PropertyName = "nsxtPassword")]
- public string NsxtPassword { get; set; }
-
- ///
- /// Gets thumbprint of the vCenter Server SSL certificate
- ///
- [JsonProperty(PropertyName = "vcenterCertificateThumbprint")]
- public string VcenterCertificateThumbprint { get; private set; }
-
- ///
- /// Gets thumbprint of the NSX-T Manager SSL certificate
- ///
- [JsonProperty(PropertyName = "nsxtCertificateThumbprint")]
- public string NsxtCertificateThumbprint { get; private set; }
-
- }
-}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProvisioningState.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProvisioningState.cs
index 3713294dae3b..cf3b0c9029f6 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProvisioningState.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudProvisioningState.cs
@@ -21,6 +21,7 @@ public static class PrivateCloudProvisioningState
public const string Cancelled = "Cancelled";
public const string Pending = "Pending";
public const string Building = "Building";
+ public const string Deleting = "Deleting";
public const string Updating = "Updating";
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudUpdate.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudUpdate.cs
new file mode 100644
index 000000000000..6a3b0eb3ecea
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/PrivateCloudUpdate.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.Avs.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An update to a private cloud resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateCloudUpdate
+ {
+ ///
+ /// Initializes a new instance of the PrivateCloudUpdate class.
+ ///
+ public PrivateCloudUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateCloudUpdate class.
+ ///
+ /// Resource tags.
+ /// The default cluster used for
+ /// management
+ /// Connectivity to internet is enabled or
+ /// disabled. Possible values include: 'Enabled', 'Disabled'
+ /// vCenter Single Sign On Identity
+ /// Sources
+ public PrivateCloudUpdate(IDictionary tags = default(IDictionary), ManagementCluster managementCluster = default(ManagementCluster), string internet = default(string), IList identitySources = default(IList))
+ {
+ Tags = tags;
+ ManagementCluster = managementCluster;
+ Internet = internet;
+ IdentitySources = identitySources;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets the default cluster used for management
+ ///
+ [JsonProperty(PropertyName = "properties.managementCluster")]
+ public ManagementCluster ManagementCluster { get; set; }
+
+ ///
+ /// Gets or sets connectivity to internet is enabled or disabled.
+ /// Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.internet")]
+ public string Internet { get; set; }
+
+ ///
+ /// Gets or sets vCenter Single Sign On Identity Sources
+ ///
+ [JsonProperty(PropertyName = "properties.identitySources")]
+ public IList IdentitySources { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Quota.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Quota.cs
index 0d4c5732f8e6..b49469c0390e 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Quota.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/Quota.cs
@@ -55,11 +55,11 @@ public Quota()
public IDictionary HostsRemaining { get; private set; }
///
- /// Gets or sets host quota is active for current subscription.
- /// Possible values include: 'Enabled', 'Disabled'
+ /// Gets host quota is active for current subscription. Possible values
+ /// include: 'Enabled', 'Disabled'
///
[JsonProperty(PropertyName = "quotaEnabled")]
- public string QuotaEnabled { get; set; }
+ public string QuotaEnabled { get; private set; }
}
}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ServiceSpecification.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ServiceSpecification.cs
new file mode 100644
index 000000000000..51953509b4a6
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/ServiceSpecification.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.Avs.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Service specification payload
+ ///
+ public partial class ServiceSpecification
+ {
+ ///
+ /// Initializes a new instance of the ServiceSpecification class.
+ ///
+ public ServiceSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServiceSpecification class.
+ ///
+ /// Specifications of the Log for Azure
+ /// Monitoring
+ /// Specifications of the Metrics
+ /// for Azure Monitoring
+ public ServiceSpecification(IList logSpecifications = default(IList), IList metricSpecifications = default(IList))
+ {
+ LogSpecifications = logSpecifications;
+ MetricSpecifications = metricSpecifications;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets specifications of the Log for Azure Monitoring
+ ///
+ [JsonProperty(PropertyName = "logSpecifications")]
+ public IList LogSpecifications { get; set; }
+
+ ///
+ /// Gets or sets specifications of the Metrics for Azure Monitoring
+ ///
+ [JsonProperty(PropertyName = "metricSpecifications")]
+ public IList MetricSpecifications { get; set; }
+
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/TrialStatus.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/TrialStatus.cs
new file mode 100644
index 000000000000..cb1dbdd2d8fa
--- /dev/null
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Models/TrialStatus.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Avs.Models
+{
+
+ ///
+ /// Defines values for TrialStatus.
+ ///
+ public static class TrialStatus
+ {
+ public const string TrialAvailable = "TrialAvailable";
+ public const string TrialUsed = "TrialUsed";
+ public const string TrialDisabled = "TrialDisabled";
+ }
+}
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Operations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Operations.cs
index 78b8cf23455d..0e5db0646cb0 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Operations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/Operations.cs
@@ -59,7 +59,7 @@ internal Operations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -80,6 +80,13 @@ internal Operations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -158,13 +165,14 @@ internal Operations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -174,6 +182,10 @@ internal Operations(AvsClient client)
}
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);
@@ -230,7 +242,7 @@ internal Operations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -326,13 +338,14 @@ internal Operations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -342,6 +355,10 @@ internal Operations(AvsClient client)
}
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);
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperations.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperations.cs
index c4a46833b882..019a52ebce97 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperations.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperations.cs
@@ -54,7 +54,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// List private clouds in a resource group
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Headers that will be added to request.
@@ -62,7 +62,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -83,14 +83,43 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -172,13 +201,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -188,6 +218,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -241,7 +275,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -262,10 +296,24 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -345,13 +393,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -361,6 +410,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -409,7 +462,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// Get a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -420,7 +473,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -441,10 +494,32 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -453,6 +528,13 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -536,13 +618,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -552,6 +635,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -600,7 +687,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// Create or update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -625,13 +712,13 @@ internal PrivateCloudsOperations(AvsClient client)
/// Update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// The headers that will be added to request.
@@ -639,10 +726,10 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send Request
- AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloud, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloudUpdate, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -650,7 +737,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// Delete a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -672,7 +759,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// List the admin credentials for the private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -683,7 +770,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -704,10 +791,32 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -716,6 +825,13 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -799,13 +915,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -815,6 +932,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -863,7 +984,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// Create or update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -877,7 +998,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -898,10 +1019,32 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -918,6 +1061,13 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1008,13 +1158,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1024,6 +1175,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -1090,13 +1245,13 @@ internal PrivateCloudsOperations(AvsClient client)
/// Update a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// Headers that will be added to request.
@@ -1104,7 +1259,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1119,28 +1274,57 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
}
- if (privateCloud == null)
+ if (privateCloudUpdate == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "privateCloud");
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudUpdate");
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1150,7 +1334,7 @@ internal PrivateCloudsOperations(AvsClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("privateCloudName", privateCloudName);
- tracingParameters.Add("privateCloud", privateCloud);
+ tracingParameters.Add("privateCloudUpdate", privateCloudUpdate);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
@@ -1203,9 +1387,9 @@ internal PrivateCloudsOperations(AvsClient client)
// Serialize Request
string _requestContent = null;
- if(privateCloud != null)
+ if(privateCloudUpdate != null)
{
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateCloud, Client.SerializationSettings);
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateCloudUpdate, 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");
}
@@ -1231,13 +1415,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1247,6 +1432,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -1313,7 +1502,7 @@ internal PrivateCloudsOperations(AvsClient client)
/// Delete a private cloud
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -1324,7 +1513,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1342,10 +1531,32 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (privateCloudName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateCloudName");
@@ -1354,6 +1565,13 @@ internal PrivateCloudsOperations(AvsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1437,13 +1655,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1453,6 +1672,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -1491,7 +1714,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1587,13 +1810,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1603,6 +1827,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
@@ -1659,7 +1887,7 @@ internal PrivateCloudsOperations(AvsClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1755,13 +1983,14 @@ internal PrivateCloudsOperations(AvsClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1771,6 +2000,10 @@ internal PrivateCloudsOperations(AvsClient client)
}
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);
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperationsExtensions.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperationsExtensions.cs
index a9d029b78167..249de4ef896a 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperationsExtensions.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/PrivateCloudsOperationsExtensions.cs
@@ -28,7 +28,7 @@ public static partial class PrivateCloudsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
public static IPage List(this IPrivateCloudsOperations operations, string resourceGroupName)
{
@@ -42,7 +42,7 @@ public static IPage List(this IPrivateCloudsOperations operations,
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The cancellation token.
@@ -90,7 +90,7 @@ public static IPage ListInSubscription(this IPrivateCloudsOperatio
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -107,7 +107,7 @@ public static PrivateCloud Get(this IPrivateCloudsOperations operations, string
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -130,7 +130,7 @@ public static PrivateCloud Get(this IPrivateCloudsOperations operations, string
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -150,7 +150,7 @@ public static PrivateCloud CreateOrUpdate(this IPrivateCloudsOperations operatio
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -176,17 +176,17 @@ public static PrivateCloud CreateOrUpdate(this IPrivateCloudsOperations operatio
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
- public static PrivateCloud Update(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloud privateCloud)
+ public static PrivateCloud Update(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate)
{
- return operations.UpdateAsync(resourceGroupName, privateCloudName, privateCloud).GetAwaiter().GetResult();
+ return operations.UpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).GetAwaiter().GetResult();
}
///
@@ -196,20 +196,20 @@ public static PrivateCloud Update(this IPrivateCloudsOperations operations, stri
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// The cancellation token.
///
- public static async Task UpdateAsync(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateAsync(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloud, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloudUpdate, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -222,7 +222,7 @@ public static PrivateCloud Update(this IPrivateCloudsOperations operations, stri
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -239,7 +239,7 @@ public static void Delete(this IPrivateCloudsOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -259,7 +259,7 @@ public static void Delete(this IPrivateCloudsOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -276,7 +276,7 @@ public static AdminCredentials ListAdminCredentials(this IPrivateCloudsOperation
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -299,7 +299,7 @@ public static AdminCredentials ListAdminCredentials(this IPrivateCloudsOperation
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -319,7 +319,7 @@ public static PrivateCloud BeginCreateOrUpdate(this IPrivateCloudsOperations ope
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -345,17 +345,17 @@ public static PrivateCloud BeginCreateOrUpdate(this IPrivateCloudsOperations ope
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
- public static PrivateCloud BeginUpdate(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloud privateCloud)
+ public static PrivateCloud BeginUpdate(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate)
{
- return operations.BeginUpdateAsync(resourceGroupName, privateCloudName, privateCloud).GetAwaiter().GetResult();
+ return operations.BeginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).GetAwaiter().GetResult();
}
///
@@ -365,20 +365,20 @@ public static PrivateCloud BeginUpdate(this IPrivateCloudsOperations operations,
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
///
- ///
- /// The private cloud
+ ///
+ /// The private cloud properties to be updated
///
///
/// The cancellation token.
///
- public static async Task BeginUpdateAsync(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloud privateCloud, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginUpdateAsync(this IPrivateCloudsOperations operations, string resourceGroupName, string privateCloudName, PrivateCloudUpdate privateCloudUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloud, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, privateCloudName, privateCloudUpdate, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -391,7 +391,7 @@ public static PrivateCloud BeginUpdate(this IPrivateCloudsOperations operations,
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
@@ -408,7 +408,7 @@ public static void BeginDelete(this IPrivateCloudsOperations operations, string
/// The operations group for this extension method.
///
///
- /// Name of the resource group within the Azure subscription
+ /// The name of the resource group. The name is case insensitive.
///
///
/// Name of the private cloud
diff --git a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/SdkInfo_AzureVMwareSolutionAPI.cs b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/SdkInfo_AzureVMwareSolutionAPI.cs
index 6484feeb1757..a7b8f49a8575 100644
--- a/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/SdkInfo_AzureVMwareSolutionAPI.cs
+++ b/sdk/avs/Microsoft.Azure.Management.Avs/src/Generated/SdkInfo_AzureVMwareSolutionAPI.cs
@@ -19,10 +19,12 @@ public static IEnumerable> ApiInfo_AzureVMwareSolu
{
return new Tuple[]
{
- new Tuple("AVS", "Clusters", "2019-08-09-preview"),
- new Tuple("AVS", "Locations", "2019-08-09-preview"),
- new Tuple("AVS", "Operations", "2019-08-09-preview"),
- new Tuple("AVS", "PrivateClouds", "2019-08-09-preview"),
+ new Tuple("AVS", "Authorizations", "2020-03-20"),
+ new Tuple("AVS", "Clusters", "2020-03-20"),
+ new Tuple("AVS", "HcxEnterpriseSites", "2020-03-20"),
+ new Tuple("AVS", "Locations", "2020-03-20"),
+ new Tuple("AVS", "Operations", "2020-03-20"),
+ new Tuple("AVS", "PrivateClouds", "2020-03-20"),
}.AsEnumerable();
}
}