diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperations.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperations.cs
new file mode 100644
index 000000000000..a965fba21bbb
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperations.cs
@@ -0,0 +1,1335 @@
+//
+// 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.PowerBIDedicated
+{
+ 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;
+
+ ///
+ /// AutoScaleVCoresOperations operations.
+ ///
+ internal partial class AutoScaleVCoresOperations : IServiceOperations, IAutoScaleVCoresOperations
+ {
+ ///
+ /// Initializes a new instance of the AutoScaleVCoresOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AutoScaleVCoresOperations(PowerBIDedicatedManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PowerBIDedicatedManagementClient
+ ///
+ public PowerBIDedicatedManagementClient Client { get; private set; }
+
+ ///
+ /// Gets details about the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// 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 vcoreName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 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 (vcoreName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vcoreName");
+ }
+ if (vcoreName != null)
+ {
+ if (vcoreName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "vcoreName", 63);
+ }
+ if (vcoreName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "vcoreName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(vcoreName, "^[-a-zA-Z0-9_]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "vcoreName", "^[-a-zA-Z0-9_]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vcoreName", vcoreName);
+ 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.PowerBIDedicated/autoScaleVCores/{vcoreName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vcoreName}", System.Uri.EscapeDataString(vcoreName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Provisions the specified auto scale v-core based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Contains the information used to provision the auto scale v-core.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string vcoreName, AutoScaleVCore vCoreParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 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 (vcoreName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vcoreName");
+ }
+ if (vcoreName != null)
+ {
+ if (vcoreName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "vcoreName", 63);
+ }
+ if (vcoreName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "vcoreName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(vcoreName, "^[-a-zA-Z0-9_]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "vcoreName", "^[-a-zA-Z0-9_]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (vCoreParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vCoreParameters");
+ }
+ if (vCoreParameters != null)
+ {
+ vCoreParameters.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vcoreName", vcoreName);
+ tracingParameters.Add("vCoreParameters", vCoreParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Create", 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.PowerBIDedicated/autoScaleVCores/{vcoreName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vcoreName}", System.Uri.EscapeDataString(vcoreName));
+ 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(vCoreParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vCoreParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// 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 vcoreName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 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 (vcoreName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vcoreName");
+ }
+ if (vcoreName != null)
+ {
+ if (vcoreName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "vcoreName", 63);
+ }
+ if (vcoreName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "vcoreName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(vcoreName, "^[-a-zA-Z0-9_]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "vcoreName", "^[-a-zA-Z0-9_]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vcoreName", vcoreName);
+ 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.PowerBIDedicated/autoScaleVCores/{vcoreName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vcoreName}", System.Uri.EscapeDataString(vcoreName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates the current state of the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Request object that contains the updated information for the auto scale
+ /// v-core.
+ ///
+ ///
+ /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 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 (vcoreName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vcoreName");
+ }
+ if (vcoreName != null)
+ {
+ if (vcoreName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "vcoreName", 63);
+ }
+ if (vcoreName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "vcoreName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(vcoreName, "^[-a-zA-Z0-9_]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "vcoreName", "^[-a-zA-Z0-9_]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (vCoreUpdateParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vCoreUpdateParameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vcoreName", vcoreName);
+ tracingParameters.Add("vCoreUpdateParameters", vCoreUpdateParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", 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.PowerBIDedicated/autoScaleVCores/{vcoreName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vcoreName}", System.Uri.EscapeDataString(vcoreName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(vCoreUpdateParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vCoreUpdateParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets all the auto scale v-cores for the given resource group.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 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");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all the auto scale v-cores for the given subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperationsExtensions.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperationsExtensions.cs
new file mode 100644
index 000000000000..059e7b22300f
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/AutoScaleVCoresOperationsExtensions.cs
@@ -0,0 +1,290 @@
+//
+// 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.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for AutoScaleVCoresOperations.
+ ///
+ public static partial class AutoScaleVCoresOperationsExtensions
+ {
+ ///
+ /// Gets details about the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ public static AutoScaleVCore Get(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName)
+ {
+ return operations.GetAsync(resourceGroupName, vcoreName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets details about the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vcoreName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Provisions the specified auto scale v-core based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Contains the information used to provision the auto scale v-core.
+ ///
+ public static AutoScaleVCore Create(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, AutoScaleVCore vCoreParameters)
+ {
+ return operations.CreateAsync(resourceGroupName, vcoreName, vCoreParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Provisions the specified auto scale v-core based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Contains the information used to provision the auto scale v-core.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, AutoScaleVCore vCoreParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vcoreName, vCoreParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ public static void Delete(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName)
+ {
+ operations.DeleteAsync(resourceGroupName, vcoreName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vcoreName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates the current state of the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Request object that contains the updated information for the auto scale
+ /// v-core.
+ ///
+ public static AutoScaleVCore Update(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters)
+ {
+ return operations.UpdateAsync(resourceGroupName, vcoreName, vCoreUpdateParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates the current state of the specified auto scale v-core.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3 characters,
+ /// and a maximum of 63.
+ ///
+ ///
+ /// Request object that contains the updated information for the auto scale
+ /// v-core.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IAutoScaleVCoresOperations operations, string resourceGroupName, string vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vcoreName, vCoreUpdateParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets all the auto scale v-cores for the given resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ public static IEnumerable ListByResourceGroup(this IAutoScaleVCoresOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets all the auto scale v-cores for the given resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given PowerBIDedicated
+ /// capacity is part. This name must be at least 1 character in length, and no
+ /// more than 90.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IAutoScaleVCoresOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the auto scale v-cores for the given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IEnumerable ListBySubscription(this IAutoScaleVCoresOperations operations)
+ {
+ return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the auto scale v-cores for the given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionAsync(this IAutoScaleVCoresOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperations.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperations.cs
index 927c2afbfbe8..ea09d2d6aef6 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperations.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperations.cs
@@ -68,7 +68,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -214,14 +214,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -231,10 +230,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -425,7 +420,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -550,14 +545,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -567,10 +561,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -624,7 +614,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -728,14 +718,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -745,10 +734,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -802,7 +787,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -906,14 +891,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -923,10 +907,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -989,7 +969,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1135,14 +1115,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1152,10 +1131,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -1200,6 +1175,206 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
return _result;
}
+ ///
+ /// Check the name availability in the target location.
+ ///
+ ///
+ /// The region name which the operation will lookup into.
+ ///
+ ///
+ /// The name of the capacity.
+ ///
+ ///
+ /// 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> CheckNameAvailabilityWithHttpMessagesAsync(string location, CheckCapacityNameAvailabilityParameters capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (capacityParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "capacityParameters");
+ }
+ if (capacityParameters != null)
+ {
+ capacityParameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("capacityParameters", capacityParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability").ToString();
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(capacityParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(capacityParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Provisions the specified Dedicated capacity based on the configuration
/// specified in the request.
@@ -1222,7 +1397,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1383,14 +1558,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1400,10 +1574,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -1484,7 +1654,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1627,14 +1797,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
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));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1644,10 +1813,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -1695,7 +1860,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1852,14 +2017,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1869,10 +2033,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -1953,7 +2113,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -2096,14 +2256,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2113,10 +2272,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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);
@@ -2161,7 +2316,7 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -2304,14 +2459,13 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(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);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2321,10 +2475,6 @@ internal CapacitiesOperations(PowerBIDedicatedManagementClient 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/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperationsExtensions.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperationsExtensions.cs
index 10a9a5f779ef..a5a02d0d3748 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperationsExtensions.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/CapacitiesOperationsExtensions.cs
@@ -444,6 +444,46 @@ public static SkuEnumerationForExistingResourceResult ListSkusForCapacity(this I
}
}
+ ///
+ /// Check the name availability in the target location.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The region name which the operation will lookup into.
+ ///
+ ///
+ /// The name of the capacity.
+ ///
+ public static CheckCapacityNameAvailabilityResult CheckNameAvailability(this ICapacitiesOperations operations, string location, CheckCapacityNameAvailabilityParameters capacityParameters)
+ {
+ return operations.CheckNameAvailabilityAsync(location, capacityParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Check the name availability in the target location.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The region name which the operation will lookup into.
+ ///
+ ///
+ /// The name of the capacity.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CheckNameAvailabilityAsync(this ICapacitiesOperations operations, string location, CheckCapacityNameAvailabilityParameters capacityParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, capacityParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Provisions the specified Dedicated capacity based on the configuration
/// specified in the request.
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IAutoScaleVCoresOperations.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IAutoScaleVCoresOperations.cs
new file mode 100644
index 000000000000..25bb8dddf893
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IAutoScaleVCoresOperations.cs
@@ -0,0 +1,187 @@
+//
+// 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.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// AutoScaleVCoresOperations operations.
+ ///
+ public partial interface IAutoScaleVCoresOperations
+ {
+ ///
+ /// Gets details about the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given
+ /// PowerBIDedicated capacity is part. This name must be at least 1
+ /// character in length, and no more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3
+ /// characters, and a maximum of 63.
+ ///
+ ///
+ /// 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 vcoreName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Provisions the specified auto scale v-core based on the
+ /// configuration specified in the request.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given
+ /// PowerBIDedicated capacity is part. This name must be at least 1
+ /// character in length, and no more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3
+ /// characters, and a maximum of 63.
+ ///
+ ///
+ /// Contains the information used to provision the auto scale v-core.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string vcoreName, AutoScaleVCore vCoreParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given
+ /// PowerBIDedicated capacity is part. This name must be at least 1
+ /// character in length, and no more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3
+ /// characters, and a maximum of 63.
+ ///
+ ///
+ /// 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 vcoreName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates the current state of the specified auto scale v-core.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given
+ /// PowerBIDedicated capacity is part. This name must be at least 1
+ /// character in length, and no more than 90.
+ ///
+ ///
+ /// The name of the auto scale v-core. It must be a minimum of 3
+ /// characters, and a maximum of 63.
+ ///
+ ///
+ /// Request object that contains the updated information for the auto
+ /// scale v-core.
+ ///
+ ///
+ /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all the auto scale v-cores for the given resource group.
+ ///
+ ///
+ /// The name of the Azure Resource group of which a given
+ /// PowerBIDedicated capacity is part. This name must be at least 1
+ /// character in length, and no more than 90.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the auto scale v-cores for the given subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/ICapacitiesOperations.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/ICapacitiesOperations.cs
index 985174e0c941..009d86f2cdc0 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/ICapacitiesOperations.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/ICapacitiesOperations.cs
@@ -41,7 +41,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -73,7 +73,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -101,7 +101,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -130,7 +130,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -158,7 +158,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -183,7 +183,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -204,7 +204,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -223,7 +223,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -242,7 +242,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -270,7 +270,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -281,6 +281,31 @@ public partial interface ICapacitiesOperations
///
Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Check the name availability in the target location.
+ ///
+ ///
+ /// The region name which the operation will lookup into.
+ ///
+ ///
+ /// The name of the capacity.
+ ///
+ ///
+ /// 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> CheckNameAvailabilityWithHttpMessagesAsync(string location, CheckCapacityNameAvailabilityParameters capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Provisions the specified Dedicated capacity based on the
/// configuration specified in the request.
///
@@ -302,7 +327,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -330,7 +355,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -359,7 +384,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -387,7 +412,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -412,7 +437,7 @@ public partial interface ICapacitiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IPowerBIDedicatedManagementClient.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IPowerBIDedicatedManagementClient.cs
index 46ceca37c946..96f5a64a1709 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IPowerBIDedicatedManagementClient.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/IPowerBIDedicatedManagementClient.cs
@@ -82,5 +82,10 @@ public partial interface IPowerBIDedicatedManagementClient : System.IDisposable
///
IOperations Operations { get; }
+ ///
+ /// Gets the IAutoScaleVCoresOperations.
+ ///
+ IAutoScaleVCoresOperations AutoScaleVCores { get; }
+
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCore.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCore.cs
new file mode 100644
index 000000000000..6fadb8d4d3b3
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCore.cs
@@ -0,0 +1,120 @@
+//
+// 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.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Represents an instance of an auto scale v-core resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class AutoScaleVCore : Resource
+ {
+ ///
+ /// Initializes a new instance of the AutoScaleVCore class.
+ ///
+ public AutoScaleVCore()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AutoScaleVCore class.
+ ///
+ /// Location of the PowerBI Dedicated
+ /// resource.
+ /// The SKU of the auto scale v-core
+ /// resource.
+ /// An identifier that represents the PowerBI
+ /// Dedicated resource.
+ /// The name of the PowerBI Dedicated
+ /// resource.
+ /// The type of the PowerBI Dedicated
+ /// resource.
+ /// Key-value pairs of additional resource
+ /// provisioning properties.
+ /// Metadata pertaining to creation and last
+ /// modification of the resource.
+ /// The maximum capacity of an auto scale
+ /// v-core resource.
+ /// The object ID of the capacity
+ /// resource associated with the auto scale v-core resource.
+ /// The current deployment state of an
+ /// auto scale v-core resource. The provisioningState is to indicate
+ /// states for resource provisioning. Possible values include:
+ /// 'Succeeded'
+ public AutoScaleVCore(string location, AutoScaleVCoreSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), int? capacityLimit = default(int?), string capacityObjectId = default(string), string provisioningState = default(string))
+ : base(location, id, name, type, tags, systemData)
+ {
+ Sku = sku;
+ CapacityLimit = capacityLimit;
+ CapacityObjectId = capacityObjectId;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the SKU of the auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public AutoScaleVCoreSku Sku { get; set; }
+
+ ///
+ /// Gets or sets the maximum capacity of an auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "properties.capacityLimit")]
+ public int? CapacityLimit { get; set; }
+
+ ///
+ /// Gets or sets the object ID of the capacity resource associated with
+ /// the auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "properties.capacityObjectId")]
+ public string CapacityObjectId { get; set; }
+
+ ///
+ /// Gets the current deployment state of an auto scale v-core resource.
+ /// The provisioningState is to indicate states for resource
+ /// provisioning. Possible values include: 'Succeeded'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreSku.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreSku.cs
new file mode 100644
index 000000000000..7d3c2462a6fd
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreSku.cs
@@ -0,0 +1,85 @@
+//
+// 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.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Represents the SKU name and Azure pricing tier for auto scale v-core
+ /// resource.
+ ///
+ public partial class AutoScaleVCoreSku
+ {
+ ///
+ /// Initializes a new instance of the AutoScaleVCoreSku class.
+ ///
+ public AutoScaleVCoreSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AutoScaleVCoreSku class.
+ ///
+ /// Name of the SKU level.
+ /// The name of the Azure pricing tier to which the
+ /// SKU applies. Possible values include: 'AutoScale'
+ /// The capacity of an auto scale v-core
+ /// resource.
+ public AutoScaleVCoreSku(string name, string tier = default(string), int? capacity = default(int?))
+ {
+ Name = name;
+ Tier = tier;
+ Capacity = capacity;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the SKU level.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the name of the Azure pricing tier to which the SKU
+ /// applies. Possible values include: 'AutoScale'
+ ///
+ [JsonProperty(PropertyName = "tier")]
+ public string Tier { get; set; }
+
+ ///
+ /// Gets or sets the capacity of an auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "capacity")]
+ public int? Capacity { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreUpdateParameters.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreUpdateParameters.cs
new file mode 100644
index 000000000000..f14b8252aeba
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreUpdateParameters.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.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Update request specification
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class AutoScaleVCoreUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the AutoScaleVCoreUpdateParameters
+ /// class.
+ ///
+ public AutoScaleVCoreUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AutoScaleVCoreUpdateParameters
+ /// class.
+ ///
+ /// The SKU of the auto scale v-core
+ /// resource.
+ /// Key-value pairs of additional provisioning
+ /// properties.
+ /// The maximum capacity of an auto scale
+ /// v-core resource.
+ public AutoScaleVCoreUpdateParameters(AutoScaleVCoreSku sku = default(AutoScaleVCoreSku), IDictionary tags = default(IDictionary), int? capacityLimit = default(int?))
+ {
+ Sku = sku;
+ Tags = tags;
+ CapacityLimit = capacityLimit;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the SKU of the auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public AutoScaleVCoreSku Sku { get; set; }
+
+ ///
+ /// Gets or sets key-value pairs of additional provisioning properties.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets the maximum capacity of an auto scale v-core resource.
+ ///
+ [JsonProperty(PropertyName = "properties.capacityLimit")]
+ public int? CapacityLimit { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ProvisioningState.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacityProvisioningState.cs
similarity index 91%
rename from sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ProvisioningState.cs
rename to sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacityProvisioningState.cs
index 7296bd306616..5bad9dbcf04e 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ProvisioningState.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacityProvisioningState.cs
@@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.PowerBIDedicated.Models
{
///
- /// Defines values for ProvisioningState.
+ /// Defines values for CapacityProvisioningState.
///
- public static class ProvisioningState
+ public static class CapacityProvisioningState
{
public const string Deleting = "Deleting";
public const string Succeeded = "Succeeded";
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ResourceSku.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySku.cs
similarity index 70%
rename from sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ResourceSku.cs
rename to sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySku.cs
index 1518b79bdd06..fc53f9bab3e5 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ResourceSku.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySku.cs
@@ -16,28 +16,31 @@ namespace Microsoft.Azure.Management.PowerBIDedicated.Models
///
/// Represents the SKU name and Azure pricing tier for PowerBI Dedicated
- /// resource.
+ /// capacity resource.
///
- public partial class ResourceSku
+ public partial class CapacitySku
{
///
- /// Initializes a new instance of the ResourceSku class.
+ /// Initializes a new instance of the CapacitySku class.
///
- public ResourceSku()
+ public CapacitySku()
{
CustomInit();
}
///
- /// Initializes a new instance of the ResourceSku class.
+ /// Initializes a new instance of the CapacitySku class.
///
/// Name of the SKU level.
/// The name of the Azure pricing tier to which the
- /// SKU applies. Possible values include: 'PBIE_Azure'
- public ResourceSku(string name, string tier = default(string))
+ /// SKU applies. Possible values include: 'PBIE_Azure', 'Premium',
+ /// 'AutoPremiumHost'
+ /// The capacity of the SKU.
+ public CapacitySku(string name, string tier = default(string), int? capacity = default(int?))
{
Name = name;
Tier = tier;
+ Capacity = capacity;
CustomInit();
}
@@ -54,11 +57,18 @@ public ResourceSku()
///
/// Gets or sets the name of the Azure pricing tier to which the SKU
- /// applies. Possible values include: 'PBIE_Azure'
+ /// applies. Possible values include: 'PBIE_Azure', 'Premium',
+ /// 'AutoPremiumHost'
///
[JsonProperty(PropertyName = "tier")]
public string Tier { get; set; }
+ ///
+ /// Gets or sets the capacity of the SKU.
+ ///
+ [JsonProperty(PropertyName = "capacity")]
+ public int? Capacity { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySkuTier.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySkuTier.cs
new file mode 100644
index 000000000000..68959971dd74
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CapacitySkuTier.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.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for CapacitySkuTier.
+ ///
+ public static class CapacitySkuTier
+ {
+ public const string PBIEAzure = "PBIE_Azure";
+ public const string Premium = "Premium";
+ public const string AutoPremiumHost = "AutoPremiumHost";
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityParameters.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityParameters.cs
new file mode 100644
index 000000000000..aa391123f62a
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityParameters.cs
@@ -0,0 +1,86 @@
+//
+// 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.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Details of capacity name request body.
+ ///
+ public partial class CheckCapacityNameAvailabilityParameters
+ {
+ ///
+ /// Initializes a new instance of the
+ /// CheckCapacityNameAvailabilityParameters class.
+ ///
+ public CheckCapacityNameAvailabilityParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// CheckCapacityNameAvailabilityParameters class.
+ ///
+ /// Name for checking availability.
+ /// The resource type of PowerBI dedicated.
+ public CheckCapacityNameAvailabilityParameters(string name = default(string), string type = default(string))
+ {
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name for checking availability.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the resource type of PowerBI dedicated.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name != null)
+ {
+ if (Name.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "Name", 63);
+ }
+ if (Name.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Name", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "Name", "^[a-z][a-z0-9]*$");
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityResult.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityResult.cs
new file mode 100644
index 000000000000..ffc163466a67
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/CheckCapacityNameAvailabilityResult.cs
@@ -0,0 +1,71 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The checking result of capacity name availability.
+ ///
+ public partial class CheckCapacityNameAvailabilityResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// CheckCapacityNameAvailabilityResult class.
+ ///
+ public CheckCapacityNameAvailabilityResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// CheckCapacityNameAvailabilityResult class.
+ ///
+ /// Indicator of availability of the
+ /// capacity name.
+ /// The reason of unavailability.
+ /// The detailed message of the request
+ /// unavailability.
+ public CheckCapacityNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
+ {
+ NameAvailable = nameAvailable;
+ Reason = reason;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicator of availability of the capacity name.
+ ///
+ [JsonProperty(PropertyName = "nameAvailable")]
+ public bool? NameAvailable { get; set; }
+
+ ///
+ /// Gets or sets the reason of unavailability.
+ ///
+ [JsonProperty(PropertyName = "reason")]
+ public string Reason { get; set; }
+
+ ///
+ /// Gets or sets the detailed message of the request unavailability.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacity.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacity.cs
index 0fec40850ab1..280287d5eb25 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacity.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacity.cs
@@ -36,7 +36,7 @@ public DedicatedCapacity()
///
/// Location of the PowerBI Dedicated
/// resource.
- /// The SKU of the PowerBI Dedicated
+ /// The SKU of the PowerBI Dedicated capacity
/// resource.
/// An identifier that represents the PowerBI
/// Dedicated resource.
@@ -46,23 +46,37 @@ public DedicatedCapacity()
/// resource.
/// Key-value pairs of additional resource
/// provisioning properties.
+ /// Metadata pertaining to creation and last
+ /// modification of the resource.
/// A collection of Dedicated capacity
/// administrators
+ /// Specifies the generation of the Power BI
+ /// Embedded capacity. If no value is specified, the default value
+ /// 'Gen2' is used. [Learn
+ /// More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ /// Possible values include: 'Gen1', 'Gen2'
+ /// Tenant ID for the capacity. Used for
+ /// creating Pro Plus capacity.
+ /// Capacity name
/// The current state of PowerBI Dedicated
/// resource. The state is to indicate more states outside of resource
/// provisioning. Possible values include: 'Deleting', 'Succeeded',
/// 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating',
/// 'Suspending', 'Pausing', 'Resuming', 'Preparing', 'Scaling'
/// The current deployment state of
- /// PowerBI Dedicatedresource. The provisioningState is to indicate
+ /// PowerBI Dedicated resource. The provisioningState is to indicate
/// states for resource provisioning. Possible values include:
/// 'Deleting', 'Succeeded', 'Failed', 'Paused', 'Suspended',
/// 'Provisioning', 'Updating', 'Suspending', 'Pausing', 'Resuming',
/// 'Preparing', 'Scaling'
- public DedicatedCapacity(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators), string state = default(string), string provisioningState = default(string))
- : base(location, sku, id, name, type, tags)
+ public DedicatedCapacity(string location, CapacitySku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators), string mode = default(string), string tenantId = default(string), string friendlyName = default(string), string state = default(string), string provisioningState = default(string))
+ : base(location, id, name, type, tags, systemData)
{
+ Sku = sku;
Administration = administration;
+ Mode = mode;
+ TenantId = tenantId;
+ FriendlyName = friendlyName;
State = state;
ProvisioningState = provisioningState;
CustomInit();
@@ -73,12 +87,41 @@ public DedicatedCapacity()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the SKU of the PowerBI Dedicated capacity resource.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public CapacitySku Sku { get; set; }
+
///
/// Gets or sets a collection of Dedicated capacity administrators
///
[JsonProperty(PropertyName = "properties.administration")]
public DedicatedCapacityAdministrators Administration { get; set; }
+ ///
+ /// Gets or sets specifies the generation of the Power BI Embedded
+ /// capacity. If no value is specified, the default value 'Gen2' is
+ /// used. [Learn
+ /// More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ /// Possible values include: 'Gen1', 'Gen2'
+ ///
+ [JsonProperty(PropertyName = "properties.mode")]
+ public string Mode { get; set; }
+
+ ///
+ /// Gets tenant ID for the capacity. Used for creating Pro Plus
+ /// capacity.
+ ///
+ [JsonProperty(PropertyName = "properties.tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets capacity name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; private set; }
+
///
/// Gets the current state of PowerBI Dedicated resource. The state is
/// to indicate more states outside of resource provisioning. Possible
@@ -90,11 +133,11 @@ public DedicatedCapacity()
public string State { get; private set; }
///
- /// Gets the current deployment state of PowerBI Dedicatedresource. The
- /// provisioningState is to indicate states for resource provisioning.
- /// Possible values include: 'Deleting', 'Succeeded', 'Failed',
- /// 'Paused', 'Suspended', 'Provisioning', 'Updating', 'Suspending',
- /// 'Pausing', 'Resuming', 'Preparing', 'Scaling'
+ /// Gets the current deployment state of PowerBI Dedicated resource.
+ /// The provisioningState is to indicate states for resource
+ /// provisioning. Possible values include: 'Deleting', 'Succeeded',
+ /// 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating',
+ /// 'Suspending', 'Pausing', 'Resuming', 'Preparing', 'Scaling'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
@@ -108,6 +151,14 @@ public DedicatedCapacity()
public override void Validate()
{
base.Validate();
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
}
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacityUpdateParameters.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacityUpdateParameters.cs
index 72381dbcc672..3f7945f5cd2b 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacityUpdateParameters.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/DedicatedCapacityUpdateParameters.cs
@@ -42,11 +42,22 @@ public DedicatedCapacityUpdateParameters()
/// properties.
/// A collection of Dedicated capacity
/// administrators
- public DedicatedCapacityUpdateParameters(ResourceSku sku = default(ResourceSku), IDictionary tags = default(IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators))
+ /// Specifies the generation of the Power BI
+ /// Embedded capacity. If no value is specified, the default value
+ /// 'Gen2' is used. [Learn
+ /// More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ /// Possible values include: 'Gen1', 'Gen2'
+ /// Tenant ID for the capacity. Used for
+ /// creating Pro Plus capacity.
+ /// Capacity name
+ public DedicatedCapacityUpdateParameters(CapacitySku sku = default(CapacitySku), IDictionary tags = default(IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators), string mode = default(string), string tenantId = default(string), string friendlyName = default(string))
{
Sku = sku;
Tags = tags;
Administration = administration;
+ Mode = mode;
+ TenantId = tenantId;
+ FriendlyName = friendlyName;
CustomInit();
}
@@ -59,7 +70,7 @@ public DedicatedCapacityUpdateParameters()
/// Gets or sets the SKU of the Dedicated capacity resource.
///
[JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
+ public CapacitySku Sku { get; set; }
///
/// Gets or sets key-value pairs of additional provisioning properties.
@@ -73,6 +84,29 @@ public DedicatedCapacityUpdateParameters()
[JsonProperty(PropertyName = "properties.administration")]
public DedicatedCapacityAdministrators Administration { get; set; }
+ ///
+ /// Gets or sets specifies the generation of the Power BI Embedded
+ /// capacity. If no value is specified, the default value 'Gen2' is
+ /// used. [Learn
+ /// More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ /// Possible values include: 'Gen1', 'Gen2'
+ ///
+ [JsonProperty(PropertyName = "properties.mode")]
+ public string Mode { get; set; }
+
+ ///
+ /// Gets tenant ID for the capacity. Used for creating Pro Plus
+ /// capacity.
+ ///
+ [JsonProperty(PropertyName = "properties.tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets capacity name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponse.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponse.cs
index cdecd42c60a4..8fc46e29940b 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponse.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponse.cs
@@ -29,13 +29,10 @@ public ErrorResponse()
///
/// Initializes a new instance of the ErrorResponse class.
///
- /// Error code
- /// Error message indicating why the operation
- /// failed.
- public ErrorResponse(string code = default(string), string message = default(string))
+ /// The error object
+ public ErrorResponse(ErrorResponseError error = default(ErrorResponseError))
{
- Code = code;
- Message = message;
+ Error = error;
CustomInit();
}
@@ -45,16 +42,10 @@ public ErrorResponse()
partial void CustomInit();
///
- /// Gets or sets error code
+ /// Gets or sets the error object
///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets error message indicating why the operation failed.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
+ [JsonProperty(PropertyName = "error")]
+ public ErrorResponseError Error { get; set; }
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponseError.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponseError.cs
new file mode 100644
index 000000000000..d80c7b4e1dc9
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ErrorResponseError.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.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The error object
+ ///
+ public partial class ErrorResponseError
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponseError class.
+ ///
+ public ErrorResponseError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseError class.
+ ///
+ /// Error code
+ /// Error message indicating why the operation
+ /// failed.
+ public ErrorResponseError(string code = default(string), string message = default(string))
+ {
+ Code = code;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message indicating why the operation failed.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/IdentityType.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/IdentityType.cs
new file mode 100644
index 000000000000..04907e336c32
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/IdentityType.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.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for IdentityType.
+ ///
+ public static class IdentityType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/LogSpecification.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/LogSpecification.cs
new file mode 100644
index 000000000000..4112ca58ae09
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/LogSpecification.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Log specification for exposing diagnostic logs to shoebox.
+ ///
+ 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
+ /// Localizable name of the log
+ /// Blob duration for 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 name of the log
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets localizable name of the log
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets blob duration for the log
+ ///
+ [JsonProperty(PropertyName = "blobDuration")]
+ public string BlobDuration { get; private set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecification.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecification.cs
new file mode 100644
index 000000000000..9d6b68be6fdf
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecification.cs
@@ -0,0 +1,105 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Metric specification for exposing performance metrics to shoebox.
+ ///
+ public partial class MetricSpecification
+ {
+ ///
+ /// Initializes a new instance of the MetricSpecification class.
+ ///
+ public MetricSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MetricSpecification class.
+ ///
+ /// Metric name
+ /// Localizable metric name
+ /// Localizable description of
+ /// metric
+ /// Unit for the metric
+ /// Aggregation type for the
+ /// metric
+ /// Pattern used to filter the
+ /// metric
+ /// For describing multi dimensional
+ /// metrics
+ public MetricSpecification(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string aggregationType = default(string), string metricFilterPattern = default(string), IList dimensions = default(IList))
+ {
+ Name = name;
+ DisplayName = displayName;
+ DisplayDescription = displayDescription;
+ Unit = unit;
+ AggregationType = aggregationType;
+ MetricFilterPattern = metricFilterPattern;
+ Dimensions = dimensions;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets metric name
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets localizable metric name
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets localizable description of metric
+ ///
+ [JsonProperty(PropertyName = "displayDescription")]
+ public string DisplayDescription { get; set; }
+
+ ///
+ /// Gets unit for the metric
+ ///
+ [JsonProperty(PropertyName = "unit")]
+ public string Unit { get; private set; }
+
+ ///
+ /// Gets aggregation type for the metric
+ ///
+ [JsonProperty(PropertyName = "aggregationType")]
+ public string AggregationType { get; private set; }
+
+ ///
+ /// Gets pattern used to filter the metric
+ ///
+ [JsonProperty(PropertyName = "metricFilterPattern")]
+ public string MetricFilterPattern { get; private set; }
+
+ ///
+ /// Gets or sets for describing multi dimensional metrics
+ ///
+ [JsonProperty(PropertyName = "dimensions")]
+ public IList Dimensions { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecificationDimensionsItem.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecificationDimensionsItem.cs
new file mode 100644
index 000000000000..badb724c01a8
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/MetricSpecificationDimensionsItem.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.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class MetricSpecificationDimensionsItem
+ {
+ ///
+ /// Initializes a new instance of the MetricSpecificationDimensionsItem
+ /// class.
+ ///
+ public MetricSpecificationDimensionsItem()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MetricSpecificationDimensionsItem
+ /// class.
+ ///
+ /// Dimension of the metric
+ /// Localizable dimension of the
+ /// metric
+ public MetricSpecificationDimensionsItem(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 dimension of the metric
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets localizable dimension of the metric
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Mode.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Mode.cs
new file mode 100644
index 000000000000..91f43df1889d
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Mode.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for Mode.
+ ///
+ public static class Mode
+ {
+ public const string Gen1 = "Gen1";
+ public const string Gen2 = "Gen2";
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Operation.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Operation.cs
index 9b3aa76597e4..604e30d23295 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Operation.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Operation.cs
@@ -33,10 +33,15 @@ public Operation()
/// {provider}/{resource}/{operation}.
/// The object that represents the
/// operation.
- public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay))
+ /// Origin of the operation.
+ /// Additional properties to expose
+ /// performance metrics to shoebox.
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay), string origin = default(string), OperationProperties properties = default(OperationProperties))
{
Name = name;
Display = display;
+ Origin = origin;
+ Properties = properties;
CustomInit();
}
@@ -57,5 +62,18 @@ public Operation()
[JsonProperty(PropertyName = "display")]
public OperationDisplay Display { get; set; }
+ ///
+ /// Gets origin of the operation.
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; private set; }
+
+ ///
+ /// Gets or sets additional properties to expose performance metrics to
+ /// shoebox.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public OperationProperties Properties { get; set; }
+
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationDisplay.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationDisplay.cs
index ab9378af4e1c..80337f5f4551 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationDisplay.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationDisplay.cs
@@ -35,11 +35,14 @@ public OperationDisplay()
/// performed: capacity, etc.
/// Operation type: create, update, delete,
/// etc.
- public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string))
+ /// Localized description of the
+ /// operation.
+ public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string))
{
Provider = provider;
Resource = resource;
Operation = operation;
+ Description = description;
CustomInit();
}
@@ -66,5 +69,11 @@ public OperationDisplay()
[JsonProperty(PropertyName = "operation")]
public string Operation { get; private set; }
+ ///
+ /// Gets or sets localized description of the operation.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationProperties.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationProperties.cs
new file mode 100644
index 000000000000..c343b058a8fe
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/OperationProperties.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Additional properties to expose performance metrics to shoebox.
+ ///
+ public partial class OperationProperties
+ {
+ ///
+ /// Initializes a new instance of the OperationProperties class.
+ ///
+ public OperationProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationProperties class.
+ ///
+ /// Service specification for
+ /// exposing performance metrics to shoebox.
+ public OperationProperties(ServiceSpecification serviceSpecification = default(ServiceSpecification))
+ {
+ ServiceSpecification = serviceSpecification;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets service specification for exposing performance metrics
+ /// to shoebox.
+ ///
+ [JsonProperty(PropertyName = "serviceSpecification")]
+ public ServiceSpecification ServiceSpecification { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Resource.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Resource.cs
index b17cd1ef1108..21c0e60ae6d8 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Resource.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/Resource.cs
@@ -35,8 +35,6 @@ public Resource()
///
/// Location of the PowerBI Dedicated
/// resource.
- /// The SKU of the PowerBI Dedicated
- /// resource.
/// An identifier that represents the PowerBI
/// Dedicated resource.
/// The name of the PowerBI Dedicated
@@ -45,14 +43,16 @@ public Resource()
/// resource.
/// Key-value pairs of additional resource
/// provisioning properties.
- public Resource(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ /// Metadata pertaining to creation and last
+ /// modification of the resource.
+ public Resource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData))
{
Id = id;
Name = name;
Type = type;
Location = location;
- Sku = sku;
Tags = tags;
+ SystemData = systemData;
CustomInit();
}
@@ -85,12 +85,6 @@ public Resource()
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }
- ///
- /// Gets or sets the SKU of the PowerBI Dedicated resource.
- ///
- [JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
-
///
/// Gets or sets key-value pairs of additional resource provisioning
/// properties.
@@ -98,6 +92,13 @@ public Resource()
[JsonProperty(PropertyName = "tags")]
public IDictionary Tags { get; set; }
+ ///
+ /// Gets or sets metadata pertaining to creation and last modification
+ /// of the resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; set; }
+
///
/// Validate the object.
///
@@ -110,14 +111,6 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "Location");
}
- if (Sku == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
- }
- if (Sku != null)
- {
- Sku.Validate();
- }
}
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ServiceSpecification.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ServiceSpecification.cs
new file mode 100644
index 000000000000..8057c80e6784
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/ServiceSpecification.cs
@@ -0,0 +1,65 @@
+//
+// 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.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Service specification for exposing performance metrics to shoebox.
+ ///
+ public partial class ServiceSpecification
+ {
+ ///
+ /// Initializes a new instance of the ServiceSpecification class.
+ ///
+ public ServiceSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServiceSpecification class.
+ ///
+ /// Metric specifications for
+ /// exposing performance metrics to shoebox.
+ /// Log specifications for exposing
+ /// diagnostic logs to shoebox.
+ public ServiceSpecification(IList metricSpecifications = default(IList), IList logSpecifications = default(IList))
+ {
+ MetricSpecifications = metricSpecifications;
+ LogSpecifications = logSpecifications;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets metric specifications for exposing performance metrics
+ /// to shoebox.
+ ///
+ [JsonProperty(PropertyName = "metricSpecifications")]
+ public IList MetricSpecifications { get; set; }
+
+ ///
+ /// Gets or sets log specifications for exposing diagnostic logs to
+ /// shoebox.
+ ///
+ [JsonProperty(PropertyName = "logSpecifications")]
+ public IList LogSpecifications { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuDetailsForExistingResource.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuDetailsForExistingResource.cs
index 4880d366e38e..e9f0777b32c5 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuDetailsForExistingResource.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuDetailsForExistingResource.cs
@@ -31,10 +31,12 @@ public SkuDetailsForExistingResource()
/// Initializes a new instance of the SkuDetailsForExistingResource
/// class.
///
+ /// The resource type
/// The SKU in SKU details for existing
/// resources.
- public SkuDetailsForExistingResource(ResourceSku sku = default(ResourceSku))
+ public SkuDetailsForExistingResource(string resourceType = default(string), CapacitySku sku = default(CapacitySku))
{
+ ResourceType = resourceType;
Sku = sku;
CustomInit();
}
@@ -44,11 +46,17 @@ public SkuDetailsForExistingResource()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the resource type
+ ///
+ [JsonProperty(PropertyName = "resourceType")]
+ public string ResourceType { get; set; }
+
///
/// Gets or sets the SKU in SKU details for existing resources.
///
[JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
+ public CapacitySku Sku { get; set; }
///
/// Validate the object.
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuEnumerationForNewResourceResult.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuEnumerationForNewResourceResult.cs
index 540b0ee7e973..1387b01261e2 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuEnumerationForNewResourceResult.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuEnumerationForNewResourceResult.cs
@@ -35,7 +35,7 @@ public SkuEnumerationForNewResourceResult()
///
/// The collection of available SKUs for new
/// resources
- public SkuEnumerationForNewResourceResult(IList value = default(IList))
+ public SkuEnumerationForNewResourceResult(IList value = default(IList))
{
Value = value;
CustomInit();
@@ -50,7 +50,7 @@ public SkuEnumerationForNewResourceResult()
/// Gets or sets the collection of available SKUs for new resources
///
[JsonProperty(PropertyName = "value")]
- public IList Value { get; set; }
+ public IList Value { get; set; }
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SystemData.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SystemData.cs
new file mode 100644
index 000000000000..5d48652582cc
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SystemData.cs
@@ -0,0 +1,105 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// An identifier for the identity that created
+ /// the resource
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC)
+ /// An identifier for the identity that
+ /// last modified the resource
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets an identifier for the identity that created the
+ /// resource
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC)
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets an identifier for the identity that last modified the
+ /// resource
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreProvisioningState.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreProvisioningState.cs
new file mode 100644
index 000000000000..7061350d8c8b
--- /dev/null
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreProvisioningState.cs
@@ -0,0 +1,21 @@
+//
+// 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.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for VCoreProvisioningState.
+ ///
+ public static class VCoreProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ }
+}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuTier.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreSkuTier.cs
similarity index 78%
rename from sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuTier.cs
rename to sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreSkuTier.cs
index f7af61d620d1..8232cda50de7 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/SkuTier.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/Models/VCoreSkuTier.cs
@@ -12,10 +12,10 @@ namespace Microsoft.Azure.Management.PowerBIDedicated.Models
{
///
- /// Defines values for SkuTier.
+ /// Defines values for VCoreSkuTier.
///
- public static class SkuTier
+ public static class VCoreSkuTier
{
- public const string PBIEAzure = "PBIE_Azure";
+ public const string AutoScale = "AutoScale";
}
}
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/PowerBIDedicatedManagementClient.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/PowerBIDedicatedManagementClient.cs
index db15520849d0..b1b9bf6c4f06 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/PowerBIDedicatedManagementClient.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/PowerBIDedicatedManagementClient.cs
@@ -87,6 +87,24 @@ public partial class PowerBIDedicatedManagementClient : ServiceClient
public virtual IOperations Operations { get; private set; }
+ ///
+ /// Gets the IAutoScaleVCoresOperations.
+ ///
+ public virtual IAutoScaleVCoresOperations AutoScaleVCores { get; private set; }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling PowerBIDedicatedManagementClient.Dispose(). False: will not dispose provided httpClient
+ protected PowerBIDedicatedManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
///
/// Initializes a new instance of the PowerBIDedicatedManagementClient class.
///
@@ -182,6 +200,33 @@ public PowerBIDedicatedManagementClient(ServiceClientCredentials credentials, pa
}
}
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling PowerBIDedicatedManagementClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
///
/// Initializes a new instance of the PowerBIDedicatedManagementClient class.
///
@@ -290,8 +335,9 @@ private void Initialize()
{
Capacities = new CapacitiesOperations(this);
Operations = new Operations(this);
+ AutoScaleVCores = new AutoScaleVCoresOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2017-10-01";
+ ApiVersion = "2021-01-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/SdkInfo_PowerBIDedicated.cs b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/SdkInfo_PowerBIDedicated.cs
index 29cefc19f816..eba60cb4dc91 100644
--- a/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/SdkInfo_PowerBIDedicated.cs
+++ b/sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated/src/Generated/SdkInfo_PowerBIDedicated.cs
@@ -19,8 +19,9 @@ public static IEnumerable> ApiInfo_PowerBIDedicate
{
return new Tuple[]
{
- new Tuple("PowerBIDedicated", "Capacities", "2017-10-01"),
- new Tuple("PowerBIDedicated", "Operations", "2017-10-01"),
+ new Tuple("PowerBIDedicated", "AutoScaleVCores", "2021-01-01"),
+ new Tuple("PowerBIDedicated", "Capacities", "2021-01-01"),
+ new Tuple("PowerBIDedicated", "Operations", "2021-01-01"),
}.AsEnumerable();
}
}