diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperations.cs new file mode 100644 index 000000000000..e8a4332d38c4 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperations.cs @@ -0,0 +1,239 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// CapabilitiesOperations operations. + /// + internal partial class CapabilitiesOperations : IServiceOperations, ICapabilitiesOperations + { + /// + /// Initializes a new instance of the CapabilitiesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CapabilitiesOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets the capabilities available for the specified location. + /// + /// + /// The location id whose capabilities are retrieved. + /// + /// + /// 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> ListByLocationWithHttpMessagesAsync(string locationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (locationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "locationId"); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("locationId", locationId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByLocation", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationId}/capabilities").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{locationId}", System.Uri.EscapeDataString(locationId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperationsExtensions.cs new file mode 100644 index 000000000000..c181fbbc14f0 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/CapabilitiesOperationsExtensions.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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for CapabilitiesOperations. + /// + public static partial class CapabilitiesOperationsExtensions + { + /// + /// Gets the capabilities available for the specified location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location id whose capabilities are retrieved. + /// + public static LocationCapabilities ListByLocation(this ICapabilitiesOperations operations, string locationId) + { + return operations.ListByLocationAsync(locationId).GetAwaiter().GetResult(); + } + + /// + /// Gets the capabilities available for the specified location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location id whose capabilities are retrieved. + /// + /// + /// The cancellation token. + /// + public static async Task ListByLocationAsync(this ICapabilitiesOperations operations, string locationId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByLocationWithHttpMessagesAsync(locationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperations.cs index 92363832961e..41488d743cc0 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -51,8 +51,34 @@ internal DatabasesOperations(SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Imports a bacpac into a new database. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -73,10 +99,10 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -102,10 +128,10 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -199,9 +225,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + 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) @@ -216,6 +242,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -253,11 +281,19 @@ internal DatabasesOperations(SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -384,9 +420,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -401,6 +437,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -448,7 +486,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -485,7 +523,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -645,9 +683,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -662,6 +700,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -709,7 +749,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -746,7 +786,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -782,10 +822,10 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task PauseDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task PauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginPauseDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -808,10 +848,10 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task ResumeDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginResumeDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -899,9 +939,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -916,6 +956,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -963,7 +1005,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1000,7 +1042,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1129,9 +1171,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + 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) @@ -1146,6 +1188,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1183,11 +1227,19 @@ internal DatabasesOperations(SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -1236,7 +1288,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, upgradeHint, transparentDataEncryption. + /// properties: serviceTierAdvisors, transparentDataEncryption. /// /// /// Headers that will be added to request. @@ -1314,9 +1366,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1331,6 +1383,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1378,7 +1432,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1415,7 +1469,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1442,6 +1496,10 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. + /// /// /// An OData filter expression that describes a subset of databases to return. /// @@ -1466,7 +1524,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1491,6 +1549,7 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); + tracingParameters.Add("expand", expand); tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters); @@ -1506,6 +1565,10 @@ internal DatabasesOperations(SqlManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } if (filter != null) { _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); @@ -1515,9 +1578,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1532,6 +1595,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1579,7 +1644,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1616,7 +1681,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1717,9 +1782,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1734,6 +1799,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1781,7 +1848,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1818,7 +1885,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1928,9 +1995,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1945,6 +2012,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1992,7 +2061,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2029,7 +2098,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2130,9 +2199,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -2147,6 +2216,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2194,7 +2265,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2231,7 +2302,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2262,9 +2333,9 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the database for which setting the transparent data encryption /// applies. /// - /// - /// The status of the database transparent data encryption. Possible values - /// include: 'Enabled', 'Disabled' + /// + /// The required parameters for creating or updating transparent data + /// encryption. /// /// /// Headers that will be added to request. @@ -2287,7 +2358,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionStates? status = default(TransparentDataEncryptionStates?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, TransparentDataEncryption parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -2305,12 +2376,11 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - string apiVersion = "2014-04-01"; - TransparentDataEncryption parameters = new TransparentDataEncryption(); - if (status != null) + if (parameters == null) { - parameters.Status = status; + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } + string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2343,9 +2413,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + 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) @@ -2360,6 +2430,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2377,7 +2449,7 @@ internal DatabasesOperations(SqlManagementClient client) if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -2413,7 +2485,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2450,7 +2522,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2468,7 +2540,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2569,9 +2641,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -2586,6 +2658,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2633,7 +2707,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2670,7 +2744,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2771,9 +2845,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -2788,6 +2862,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2835,7 +2911,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2872,7 +2948,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2890,8 +2966,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Gets a database's threat detection policy. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2901,10 +2976,8 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to import into - /// - /// - /// The required parameters for importing a Bacpac into a database. + /// The name of the database for which database Threat Detection policy is + /// defined. /// /// /// Headers that will be added to request. @@ -2927,7 +3000,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetThreatDetectionPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -2945,19 +3018,7 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } string apiVersion = "2014-04-01"; - if (parameters == null) - { - parameters = new ImportExtensionRequestParameters(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2965,17 +3026,16 @@ internal DatabasesOperations(SqlManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginImport", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetThreatDetectionPolicy", 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.Sql/servers/{serverName}/databases/{databaseName}/extensions/import").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); @@ -2990,9 +3050,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + 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) @@ -3007,6 +3067,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3021,12 +3083,6 @@ internal DatabasesOperations(SqlManagementClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.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) { @@ -3047,7 +3103,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3060,7 +3116,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -3082,7 +3138,7 @@ internal DatabasesOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3095,9 +3151,9 @@ internal DatabasesOperations(SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -3115,7 +3171,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Exports a database to a bacpac. + /// Creates or updates a database's threat detection policy. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3125,10 +3181,11 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database for which database Threat Detection policy is + /// defined. /// /// - /// The required parameters for exporting a database. + /// The database Threat Detection policy. /// /// /// Headers that will be added to request. @@ -3151,7 +3208,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateThreatDetectionPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseSecurityAlertPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3185,17 +3242,17 @@ internal DatabasesOperations(SqlManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginExport", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateThreatDetectionPolicy", 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.Sql/servers/{serverName}/databases/{databaseName}/export").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); @@ -3210,9 +3267,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -3227,6 +3284,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3244,7 +3303,7 @@ internal DatabasesOperations(SqlManagementClient client) if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -3267,7 +3326,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3280,7 +3339,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -3302,7 +3361,7 @@ internal DatabasesOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3315,9 +3374,27 @@ internal DatabasesOperations(SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -3335,7 +3412,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Failover the database replication link. + /// Gets a database's blob auditing policy. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3345,10 +3422,7 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database that has the replication link to be failed over. - /// - /// - /// The ID of the replication link to be failed over. + /// The name of the database for which database blob audit policy is defined. /// /// /// Headers that will be added to request. @@ -3359,6 +3433,9 @@ internal DatabasesOperations(SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -3368,7 +3445,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginFailoverReplicationLinkWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetBlobAuditingPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3386,11 +3463,7 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - if (linkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "linkId"); - } - string apiVersion = "2014-04-01"; + string apiVersion = "2015-05-01-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3398,22 +3471,20 @@ internal DatabasesOperations(SqlManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("linkId", linkId); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverReplicationLink", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetBlobAuditingPolicy", 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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); - _url = _url.Replace("{linkId}", System.Uri.EscapeDataString(linkId)); List _queryParameters = new List(); if (apiVersion != null) { @@ -3424,9 +3495,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -3441,6 +3512,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3475,14 +3548,22 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -3502,13 +3583,31 @@ internal DatabasesOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -3517,8 +3616,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Force failover the database replication link, which may result in data - /// loss. + /// Creates or updates a database's blob auditing policy. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3528,10 +3626,11 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database that has the replication link to be failed over. + /// The name of the database for which database blob audit policy will be + /// defined. /// - /// - /// The ID of the replication link to be failed over. + /// + /// The database blob auditing policy. /// /// /// Headers that will be added to request. @@ -3542,6 +3641,9 @@ internal DatabasesOperations(SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -3551,7 +3653,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginFailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateBlobAuditingPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3569,11 +3671,15 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - if (linkId == null) + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "linkId"); + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2014-04-01"; + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2015-05-01-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3581,22 +3687,21 @@ internal DatabasesOperations(SqlManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("linkId", linkId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverReplicationLinkAllowDataLoss", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateBlobAuditingPolicy", 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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); - _url = _url.Replace("{linkId}", System.Uri.EscapeDataString(linkId)); List _queryParameters = new List(); if (apiVersion != null) { @@ -3607,9 +3712,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -3624,6 +3729,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3638,6 +3745,12 @@ internal DatabasesOperations(SqlManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -3658,14 +3771,22 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -3685,22 +3806,1105 @@ internal DatabasesOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - if (_shouldTrace) + // Deserialize Response + if ((int)_statusCode == 200) { - ServiceClientTracing.Exit(_invocationId, _result); + _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); + } } - return _result; - } - - /// - /// Pauses a data warehouse. + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Imports a bacpac into a new database. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// 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> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginImport", 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.Sql/servers/{serverName}/import").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 201 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database to import into + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// 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> BeginCreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (databaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2014-04-01"; + if (parameters == null) + { + parameters = new ImportExtensionRequest(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateImportOperation", 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.Sql/servers/{serverName}/databases/{databaseName}/extensions/import").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Exports a database to a bacpac. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database to be exported. + /// + /// + /// The required parameters for exporting a database. + /// + /// + /// 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> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (databaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginExport", 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.Sql/servers/{serverName}/databases/{databaseName}/export").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Failover the database replication link. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database that has the replication link to be failed over. + /// + /// + /// The ID of the replication link to be failed over. + /// + /// + /// 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 BeginFailoverReplicationLinkWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (databaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + } + if (linkId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkId"); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("linkId", linkId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverReplicationLink", 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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + _url = _url.Replace("{linkId}", System.Uri.EscapeDataString(linkId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Force failover the database replication link, which may result in data + /// loss. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database that has the replication link to be failed over. + /// + /// + /// The ID of the replication link to be failed over. + /// + /// + /// 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 BeginFailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (databaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + } + if (linkId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkId"); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("linkId", linkId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverReplicationLinkAllowDataLoss", 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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + _url = _url.Replace("{linkId}", System.Uri.EscapeDataString(linkId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Pauses a data warehouse. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3730,7 +4934,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginPauseDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3761,7 +4965,7 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPauseDataWarehouse", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginPause", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -3780,9 +4984,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -3797,6 +5001,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3834,11 +5040,19 @@ internal DatabasesOperations(SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -3903,7 +5117,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginResumeDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3934,7 +5148,7 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResumeDataWarehouse", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -3953,9 +5167,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -3970,6 +5184,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4007,11 +5223,19 @@ internal DatabasesOperations(SqlManagementClient client) if ((int)_statusCode != 202 && (int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -4143,9 +5367,9 @@ internal DatabasesOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + 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) @@ -4160,6 +5384,8 @@ internal DatabasesOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4177,7 +5403,7 @@ internal DatabasesOperations(SqlManagementClient client) if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -4213,7 +5439,7 @@ internal DatabasesOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -4250,7 +5476,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -4268,7 +5494,7 @@ internal DatabasesOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -4287,4 +5513,3 @@ internal DatabasesOperations(SqlManagementClient client) } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperationsExtensions.cs index a4ac85caca0e..62eaef545577 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperationsExtensions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/DatabasesOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -24,8 +24,56 @@ namespace Microsoft.Azure.Management.Sql public static partial class DatabasesOperationsExtensions { /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Imports a bacpac into a new database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + public static ImportExportResponse Import(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) + { + return operations.ImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Imports a bacpac into a new database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// The cancellation token. + /// + public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The operations group for this extension method. @@ -43,14 +91,14 @@ public static partial class DatabasesOperationsExtensions /// /// The required parameters for importing a Bacpac into a database. /// - public static ImportExportOperationResponse Import(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters) + public static ImportExportResponse CreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) { - return operations.ImportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.CreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The operations group for this extension method. @@ -71,9 +119,9 @@ public static ImportExportOperationResponse Import(this IDatabasesOperations ope /// /// The cancellation token. /// - public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateImportOperationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ImportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -98,7 +146,7 @@ public static ImportExportOperationResponse Import(this IDatabasesOperations ope /// /// The required parameters for exporting a database. /// - public static ImportExportOperationResponse Export(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters) + public static ImportExportResponse Export(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) { return operations.ExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } @@ -125,7 +173,7 @@ public static ImportExportOperationResponse Export(this IDatabasesOperations ope /// /// The cancellation token. /// - public static async Task ExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { @@ -181,7 +229,7 @@ public static void DeleteReplicationLink(this IDatabasesOperations operations, s /// public static async Task DeleteReplicationLinkAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -286,7 +334,7 @@ public static void FailoverReplicationLink(this IDatabasesOperations operations, /// public static async Task FailoverReplicationLinkAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.FailoverReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false); + (await operations.FailoverReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -339,7 +387,7 @@ public static void FailoverReplicationLinkAllowDataLoss(this IDatabasesOperation /// public static async Task FailoverReplicationLinkAllowDataLossAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.FailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false); + (await operations.FailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -406,9 +454,9 @@ public static IEnumerable ListReplicationLinks(this IDatabasesO /// /// The name of the data warehouse to pause. /// - public static void PauseDataWarehouse(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static void Pause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - operations.PauseDataWarehouseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + operations.PauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// @@ -430,9 +478,9 @@ public static void PauseDataWarehouse(this IDatabasesOperations operations, stri /// /// The cancellation token. /// - public static async Task PauseDataWarehouseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.PauseDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false); + (await operations.PauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -451,9 +499,9 @@ public static void PauseDataWarehouse(this IDatabasesOperations operations, stri /// /// The name of the data warehouse to resume. /// - public static void ResumeDataWarehouse(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static void Resume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - operations.ResumeDataWarehouseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + operations.ResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// @@ -475,9 +523,9 @@ public static void ResumeDataWarehouse(this IDatabasesOperations operations, str /// /// The cancellation token. /// - public static async Task ResumeDataWarehouseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.ResumeDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false); + (await operations.ResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -628,7 +676,7 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// public static async Task DeleteAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -649,7 +697,7 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, upgradeHint, transparentDataEncryption. + /// properties: serviceTierAdvisors, transparentDataEncryption. /// public static Database Get(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string)) { @@ -674,7 +722,7 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, upgradeHint, transparentDataEncryption. + /// properties: serviceTierAdvisors, transparentDataEncryption. /// /// /// The cancellation token. @@ -700,12 +748,16 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. + /// /// /// An OData filter expression that describes a subset of databases to return. /// - public static IEnumerable ListByServer(this IDatabasesOperations operations, string resourceGroupName, string serverName, string filter = default(string)) + public static IEnumerable ListByServer(this IDatabasesOperations operations, string resourceGroupName, string serverName, string expand = default(string), string filter = default(string)) { - return operations.ListByServerAsync(resourceGroupName, serverName, filter).GetAwaiter().GetResult(); + return operations.ListByServerAsync(resourceGroupName, serverName, expand, filter).GetAwaiter().GetResult(); } /// @@ -721,15 +773,19 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. + /// /// /// An OData filter expression that describes a subset of databases to return. /// /// /// The cancellation token. /// - public static async Task> ListByServerAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByServerAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, filter, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, expand, filter, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -902,13 +958,13 @@ public static IEnumerable ListServiceTierAdvisors(this IData /// The name of the database for which setting the transparent data encryption /// applies. /// - /// - /// The status of the database transparent data encryption. Possible values - /// include: 'Enabled', 'Disabled' + /// + /// The required parameters for creating or updating transparent data + /// encryption. /// - public static TransparentDataEncryption CreateOrUpdateTransparentDataEncryptionConfiguration(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionStates? status = default(TransparentDataEncryptionStates?)) + public static TransparentDataEncryption CreateOrUpdateTransparentDataEncryptionConfiguration(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryption parameters) { - return operations.CreateOrUpdateTransparentDataEncryptionConfigurationAsync(resourceGroupName, serverName, databaseName, status).GetAwaiter().GetResult(); + return operations.CreateOrUpdateTransparentDataEncryptionConfigurationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// @@ -928,16 +984,16 @@ public static IEnumerable ListServiceTierAdvisors(this IData /// The name of the database for which setting the transparent data encryption /// applies. /// - /// - /// The status of the database transparent data encryption. Possible values - /// include: 'Enabled', 'Disabled' + /// + /// The required parameters for creating or updating transparent data + /// encryption. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateTransparentDataEncryptionConfigurationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionStates? status = default(TransparentDataEncryptionStates?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateTransparentDataEncryptionConfigurationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryption parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, status, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -1040,8 +1096,266 @@ public static IEnumerable ListTransparentData } /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Gets a database's threat detection policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy is + /// defined. + /// + public static DatabaseSecurityAlertPolicy GetThreatDetectionPolicy(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + { + return operations.GetThreatDetectionPolicyAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Gets a database's threat detection policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy is + /// defined. + /// + /// + /// The cancellation token. + /// + public static async Task GetThreatDetectionPolicyAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetThreatDetectionPolicyWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a database's threat detection policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy is + /// defined. + /// + /// + /// The database Threat Detection policy. + /// + public static DatabaseSecurityAlertPolicy CreateOrUpdateThreatDetectionPolicy(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseSecurityAlertPolicy parameters) + { + return operations.CreateOrUpdateThreatDetectionPolicyAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a database's threat detection policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy is + /// defined. + /// + /// + /// The database Threat Detection policy. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateThreatDetectionPolicyAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseSecurityAlertPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateThreatDetectionPolicyWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a database's blob auditing policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy is defined. + /// + public static DatabaseBlobAuditingPolicy GetBlobAuditingPolicy(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + { + return operations.GetBlobAuditingPolicyAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Gets a database's blob auditing policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy is defined. + /// + /// + /// The cancellation token. + /// + public static async Task GetBlobAuditingPolicyAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetBlobAuditingPolicyWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a database's blob auditing policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy will be + /// defined. + /// + /// + /// The database blob auditing policy. + /// + public static DatabaseBlobAuditingPolicy CreateOrUpdateBlobAuditingPolicy(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy parameters) + { + return operations.CreateOrUpdateBlobAuditingPolicyAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a database's blob auditing policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy will be + /// defined. + /// + /// + /// The database blob auditing policy. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateBlobAuditingPolicyAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateBlobAuditingPolicyWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Imports a bacpac into a new database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + public static ImportExportResponse BeginImport(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) + { + return operations.BeginImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Imports a bacpac into a new database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// The cancellation token. + /// + public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The operations group for this extension method. @@ -1059,14 +1373,14 @@ public static IEnumerable ListTransparentData /// /// The required parameters for importing a Bacpac into a database. /// - public static ImportExportOperationResponse BeginImport(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters) + public static ImportExportResponse BeginCreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) { - return operations.BeginImportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.BeginCreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Imports a bacpac into an existing database. The existing database must be - /// empty. + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The operations group for this extension method. @@ -1087,9 +1401,9 @@ public static ImportExportOperationResponse BeginImport(this IDatabasesOperation /// /// The cancellation token. /// - public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCreateImportOperationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -1114,7 +1428,7 @@ public static ImportExportOperationResponse BeginImport(this IDatabasesOperation /// /// The required parameters for exporting a database. /// - public static ImportExportOperationResponse BeginExport(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters) + public static ImportExportResponse BeginExport(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) { return operations.BeginExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } @@ -1141,7 +1455,7 @@ public static ImportExportOperationResponse BeginExport(this IDatabasesOperation /// /// The cancellation token. /// - public static async Task BeginExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { @@ -1197,7 +1511,7 @@ public static void BeginFailoverReplicationLink(this IDatabasesOperations operat /// public static async Task BeginFailoverReplicationLinkAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.BeginFailoverReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false); + (await operations.BeginFailoverReplicationLinkWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1250,7 +1564,7 @@ public static void BeginFailoverReplicationLinkAllowDataLoss(this IDatabasesOper /// public static async Task BeginFailoverReplicationLinkAllowDataLossAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.BeginFailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false); + (await operations.BeginFailoverReplicationLinkAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1269,9 +1583,9 @@ public static void BeginFailoverReplicationLinkAllowDataLoss(this IDatabasesOper /// /// The name of the data warehouse to pause. /// - public static void BeginPauseDataWarehouse(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static void BeginPause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - operations.BeginPauseDataWarehouseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + operations.BeginPauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// @@ -1293,9 +1607,9 @@ public static void BeginPauseDataWarehouse(this IDatabasesOperations operations, /// /// The cancellation token. /// - public static async Task BeginPauseDataWarehouseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginPauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.BeginPauseDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false); + (await operations.BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1314,9 +1628,9 @@ public static void BeginPauseDataWarehouse(this IDatabasesOperations operations, /// /// The name of the data warehouse to resume. /// - public static void BeginResumeDataWarehouse(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static void BeginResume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - operations.BeginResumeDataWarehouseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + operations.BeginResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// @@ -1338,9 +1652,9 @@ public static void BeginResumeDataWarehouse(this IDatabasesOperations operations /// /// The cancellation token. /// - public static async Task BeginResumeDataWarehouseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.BeginResumeDataWarehouseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false); + (await operations.BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1403,4 +1717,3 @@ public static Database BeginCreateOrUpdate(this IDatabasesOperations operations, } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperations.cs index b13ca86960b2..c32acd9fd7fe 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -160,9 +160,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + 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) @@ -177,6 +177,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -214,11 +216,19 @@ internal ElasticPoolsOperations(SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -336,9 +346,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -353,6 +363,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -400,7 +412,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -437,7 +449,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -529,9 +541,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -546,6 +558,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -593,7 +607,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -630,7 +644,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -731,9 +745,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -748,6 +762,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -795,7 +811,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -832,7 +848,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -933,9 +949,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -950,6 +966,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -997,7 +1015,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1034,7 +1052,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1144,9 +1162,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1161,6 +1179,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1208,7 +1228,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1245,7 +1265,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1346,9 +1366,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1363,6 +1383,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1410,7 +1432,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1447,7 +1469,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1560,9 +1582,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + 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) @@ -1577,6 +1599,8 @@ internal ElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1594,7 +1618,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -1630,7 +1654,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1667,7 +1691,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1685,7 +1709,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1704,4 +1728,3 @@ internal ElasticPoolsOperations(SqlManagementClient client) } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs index 032d79fb0997..5b0f1409861c 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -119,7 +119,7 @@ public static void Delete(this IElasticPoolsOperations operations, string resour /// public static async Task DeleteAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -466,4 +466,3 @@ public static ElasticPool BeginCreateOrUpdate(this IElasticPoolsOperations opera } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperations.cs similarity index 65% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperations.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperations.cs index 9f4bc0efd326..eadef528ad4a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Sql using System.Threading.Tasks; /// - /// ImportExportOperations operations. + /// FirewallRulesOperations operations. /// - internal partial class ImportExportOperations : IServiceOperations, IImportExportOperations + internal partial class FirewallRulesOperations : IServiceOperations, IFirewallRulesOperations { /// - /// Initializes a new instance of the ImportExportOperations class. + /// Initializes a new instance of the FirewallRulesOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class ImportExportOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ImportExportOperations(SqlManagementClient client) + internal FirewallRulesOperations(SqlManagementClient client) { if (client == null) { @@ -51,7 +51,7 @@ internal ImportExportOperations(SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// The status of an import operation given the operation ID. + /// Creates or updates a firewall rule. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -60,6 +60,12 @@ internal ImportExportOperations(SqlManagementClient client) /// /// The name of the server. /// + /// + /// The name of the firewall rule. + /// + /// + /// The required parameters for creating or updating a firewall rule. + /// /// /// Headers that will be added to request. /// @@ -81,7 +87,7 @@ internal ImportExportOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -95,6 +101,18 @@ internal ImportExportOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } + if (firewallRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -106,15 +124,18 @@ internal ImportExportOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); + tracingParameters.Add("firewallRuleName", firewallRuleName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/importExportOperationResults").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -125,9 +146,9 @@ internal ImportExportOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -142,6 +163,8 @@ internal ImportExportOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,6 +179,12 @@ internal ImportExportOperations(SqlManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -176,7 +205,7 @@ internal ImportExportOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -189,7 +218,7 @@ internal ImportExportOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -211,7 +240,7 @@ internal ImportExportOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -224,9 +253,27 @@ internal ImportExportOperations(SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -244,7 +291,190 @@ internal ImportExportOperations(SqlManagementClient client) } /// - /// The of an import operation given the operation ID. + /// Deletes a firewall rule. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// 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 serverName, string firewallRuleName, 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 (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (firewallRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); + } + string apiVersion = "2014-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("firewallRuleName", firewallRuleName); + 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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a firewall rule. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -253,8 +483,8 @@ internal ImportExportOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The operation ID associated with the operation. + /// + /// The name of the firewall rule. /// /// /// Headers that will be added to request. @@ -277,7 +507,7 @@ internal ImportExportOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -291,6 +521,10 @@ internal ImportExportOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } + if (firewallRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -302,17 +536,17 @@ internal ImportExportOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("firewallRuleName", firewallRuleName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByServer", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/importExportOperationResults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(operationId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -323,9 +557,9 @@ internal ImportExportOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -340,6 +574,8 @@ internal ImportExportOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -387,7 +623,7 @@ internal ImportExportOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -409,7 +645,7 @@ internal ImportExportOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -422,9 +658,9 @@ internal ImportExportOperations(SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -442,8 +678,7 @@ internal ImportExportOperations(SqlManagementClient client) } /// - /// The status of an import or export operation on a database given the - /// operation ID. + /// Returns a list of firewall rules. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -452,12 +687,6 @@ internal ImportExportOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the database - /// - /// - /// The operation ID associated with the operation. - /// /// /// Headers that will be added to request. /// @@ -479,7 +708,7 @@ internal ImportExportOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -493,10 +722,6 @@ internal ImportExportOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (databaseName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); - } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -508,19 +733,15 @@ internal ImportExportOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByDatabase", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByServer", 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.Sql/servers/{serverName}/databases/{databaseName}/importExportOperationResults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(operationId, Client.SerializationSettings).Trim('"'))); List _queryParameters = new List(); if (apiVersion != null) { @@ -531,9 +752,9 @@ internal ImportExportOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -548,6 +769,8 @@ internal ImportExportOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -595,7 +818,7 @@ internal ImportExportOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -617,7 +840,7 @@ internal ImportExportOperations(SqlManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -630,9 +853,9 @@ internal ImportExportOperations(SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -651,4 +874,3 @@ internal ImportExportOperations(SqlManagementClient client) } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperationsExtensions.cs new file mode 100644 index 000000000000..4246d5728b3d --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/FirewallRulesOperationsExtensions.cs @@ -0,0 +1,216 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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 FirewallRulesOperations. + /// + public static partial class FirewallRulesOperationsExtensions + { + /// + /// Creates or updates a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// The required parameters for creating or updating a firewall rule. + /// + public static FirewallRule CreateOrUpdate(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, firewallRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// The required parameters for creating or updating a firewall rule. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + public static void Delete(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName) + { + operations.DeleteAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + public static FirewallRule Get(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName) + { + return operations.GetAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult(); + } + + /// + /// Gets a firewall rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a list of firewall rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + public static IEnumerable ListByServer(this IFirewallRulesOperations operations, string resourceGroupName, string serverName) + { + return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of firewall rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServerAsync(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ICapabilitiesOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ICapabilitiesOperations.cs new file mode 100644 index 000000000000..153262fa1851 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ICapabilitiesOperations.cs @@ -0,0 +1,49 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// CapabilitiesOperations operations. + /// + public partial interface ICapabilitiesOperations + { + /// + /// Gets the capabilities available for the specified location. + /// + /// + /// The location id whose capabilities are retrieved. + /// + /// + /// 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> ListByLocationWithHttpMessagesAsync(string locationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IDatabasesOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IDatabasesOperations.cs index dbf23eee5e6a..900aff386484 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IDatabasesOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IDatabasesOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -24,8 +24,38 @@ namespace Microsoft.Azure.Management.Sql public partial interface IDatabasesOperations { /// - /// Imports a bacpac into an existing database. The existing database - /// must be empty. + /// Imports a bacpac into a new database. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// 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> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The name of the resource group that contains the resource. You can @@ -56,7 +86,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Exports a database to a bacpac. /// @@ -89,7 +119,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a database replication link. Cannot be done during /// failover. @@ -274,7 +304,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task PauseDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task PauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Resumes a data warehouse. /// @@ -301,7 +331,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task ResumeDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns a list of database restore points. /// @@ -411,7 +441,7 @@ public partial interface IDatabasesOperations /// /// /// A comma separated list of child objects to expand in the response. - /// Possible properties: serviceTierAdvisors, upgradeHint, + /// Possible properties: serviceTierAdvisors, /// transparentDataEncryption. /// /// @@ -441,6 +471,11 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// + /// + /// A comma separated list of child objects to expand in the response. + /// Possible properties: serviceTierAdvisors, + /// transparentDataEncryption. + /// /// /// An OData filter expression that describes a subset of databases to /// return. @@ -460,7 +495,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns database usages. /// @@ -570,9 +605,9 @@ public partial interface IDatabasesOperations /// The name of the database for which setting the transparent data /// encryption applies. /// - /// - /// The status of the database transparent data encryption. Possible - /// values include: 'Enabled', 'Disabled' + /// + /// The required parameters for creating or updating transparent data + /// encryption. /// /// /// The headers that will be added to request. @@ -589,7 +624,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionStates? status = default(TransparentDataEncryptionStates?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateTransparentDataEncryptionConfigurationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, TransparentDataEncryption parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a database's transparent data encryption configuration. /// @@ -653,8 +688,168 @@ public partial interface IDatabasesOperations /// Task>> ListTransparentDataEncryptionActivityWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Imports a bacpac into an existing database. The existing database - /// must be empty. + /// Gets a database's threat detection policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy + /// is defined. + /// + /// + /// 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> GetThreatDetectionPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a database's threat detection policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database Threat Detection policy + /// is defined. + /// + /// + /// The database Threat Detection policy. + /// + /// + /// 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> CreateOrUpdateThreatDetectionPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseSecurityAlertPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a database's blob auditing policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy is + /// defined. + /// + /// + /// 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> GetBlobAuditingPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a database's blob auditing policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which database blob audit policy will + /// be defined. + /// + /// + /// The database blob auditing policy. + /// + /// + /// 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> CreateOrUpdateBlobAuditingPolicyWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Imports a bacpac into a new database. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// 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> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates an import operation that imports a bacpac into an existing + /// database. The existing database must be empty. /// /// /// The name of the resource group that contains the resource. You can @@ -685,7 +880,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Exports a database to a bacpac. /// @@ -718,7 +913,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Failover the database replication link. /// @@ -808,7 +1003,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task BeginPauseDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Resumes a data warehouse. /// @@ -835,7 +1030,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task BeginResumeDataWarehouseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates a new database or updates an existing database. Location is /// a required property in the request body, and it must be the same as @@ -873,4 +1068,3 @@ public partial interface IDatabasesOperations Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IElasticPoolsOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IElasticPoolsOperations.cs index 59eb6694f9cc..15506976935d 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IElasticPoolsOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IElasticPoolsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -300,4 +300,3 @@ public partial interface IElasticPoolsOperations Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IImportExportOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IFirewallRulesOperations.cs similarity index 56% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IImportExportOperations.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IFirewallRulesOperations.cs index fd5e4d8b4204..7b4c5fd810e3 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IImportExportOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IFirewallRulesOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -19,12 +19,12 @@ namespace Microsoft.Azure.Management.Sql using System.Threading.Tasks; /// - /// ImportExportOperations operations. + /// FirewallRulesOperations operations. /// - public partial interface IImportExportOperations + public partial interface IFirewallRulesOperations { /// - /// The status of an import operation given the operation ID. + /// Creates or updates a firewall rule. /// /// /// The name of the resource group that contains the resource. You can @@ -34,6 +34,12 @@ public partial interface IImportExportOperations /// /// The name of the server. /// + /// + /// The name of the firewall rule. + /// + /// + /// The required parameters for creating or updating a firewall rule. + /// /// /// The headers that will be added to request. /// @@ -49,9 +55,36 @@ public partial interface IImportExportOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a firewall rule. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the firewall rule. + /// + /// + /// 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 serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// The of an import operation given the operation ID. + /// Gets a firewall rule. /// /// /// The name of the resource group that contains the resource. You can @@ -61,8 +94,8 @@ public partial interface IImportExportOperations /// /// The name of the server. /// - /// - /// The operation ID associated with the operation. + /// + /// The name of the firewall rule. /// /// /// The headers that will be added to request. @@ -79,10 +112,9 @@ public partial interface IImportExportOperations /// /// Thrown when a required parameter is null /// - Task> GetByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// The status of an import or export operation on a database given the - /// operation ID. + /// Returns a list of firewall rules. /// /// /// The name of the resource group that contains the resource. You can @@ -92,12 +124,6 @@ public partial interface IImportExportOperations /// /// The name of the server. /// - /// - /// The name of the database - /// - /// - /// The operation ID associated with the operation. - /// /// /// The headers that will be added to request. /// @@ -113,7 +139,6 @@ public partial interface IImportExportOperations /// /// Thrown when a required parameter is null /// - Task> GetByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IRecommendedElasticPoolsOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IRecommendedElasticPoolsOperations.cs index ec15efa53477..9ab1b842bfcd 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IRecommendedElasticPoolsOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IRecommendedElasticPoolsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -112,7 +112,7 @@ public partial interface IRecommendedElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns a list of databases inside a recommented elastic pool. /// @@ -175,4 +175,3 @@ public partial interface IRecommendedElasticPoolsOperations Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IServersOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IServersOperations.cs index a10ece32416b..0fd9073a8ae5 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IServersOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/IServersOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -23,153 +23,6 @@ namespace Microsoft.Azure.Management.Sql /// public partial interface IServersOperations { - /// - /// Creates or updates a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The required parameters for creating or updating a firewall rule. - /// - /// - /// 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> CreateOrUpdateFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, ServerFirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// 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 DeleteFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// 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> GetFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns a list of firewall rules. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// 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>> ListFirewallRulesWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Imports a bacpac into a new database. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// 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> ImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns a list of servers. /// @@ -269,7 +122,7 @@ public partial interface IServersOperations /// /// Thrown when a required parameter is null /// - Task> GetByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns a list of servers in a resource group. /// @@ -378,36 +231,5 @@ public partial interface IServersOperations /// Thrown when a required parameter is null /// Task>> ListServiceObjectivesWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Imports a bacpac into a new database. - /// - /// - /// The name of the resource group that contains the resource. You can - /// obtain this value from the Azure Resource Manager API or the - /// portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// 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> BeginImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ISqlManagementClient.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ISqlManagementClient.cs index 4a84ce395ad8..93b598e8f297 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ISqlManagementClient.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ISqlManagementClient.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -35,12 +35,12 @@ public partial interface ISqlManagementClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } + JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } + JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. @@ -71,9 +71,14 @@ public partial interface ISqlManagementClient : System.IDisposable /// - /// Gets the IServersOperations. + /// Gets the ICapabilitiesOperations. /// - IServersOperations Servers { get; } + ICapabilitiesOperations Capabilities { get; } + + /// + /// Gets the IFirewallRulesOperations. + /// + IFirewallRulesOperations FirewallRules { get; } /// /// Gets the IDatabasesOperations. @@ -81,9 +86,9 @@ public partial interface ISqlManagementClient : System.IDisposable IDatabasesOperations Databases { get; } /// - /// Gets the IImportExportOperations. + /// Gets the IServersOperations. /// - IImportExportOperations ImportExportOperations { get; } + IServersOperations Servers { get; } /// /// Gets the IElasticPoolsOperations. @@ -108,4 +113,3 @@ public partial interface ISqlManagementClient : System.IDisposable } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperationsExtensions.cs deleted file mode 100644 index aebe5e1d9166..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ImportExportOperationsExtensions.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql -{ - using Azure; - using Management; - using Rest; - using Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ImportExportOperations. - /// - public static partial class ImportExportOperationsExtensions - { - /// - /// The status of an import operation given the operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - public static IEnumerable ListByServer(this IImportExportOperations operations, string resourceGroupName, string serverName) - { - return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); - } - - /// - /// The status of an import operation given the operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByServerAsync(this IImportExportOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The of an import operation given the operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The operation ID associated with the operation. - /// - public static ImportExportOperationResponse GetByServer(this IImportExportOperations operations, string resourceGroupName, string serverName, System.Guid operationId) - { - return operations.GetByServerAsync(resourceGroupName, serverName, operationId).GetAwaiter().GetResult(); - } - - /// - /// The of an import operation given the operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The operation ID associated with the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetByServerAsync(this IImportExportOperations operations, string resourceGroupName, string serverName, System.Guid operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetByServerWithHttpMessagesAsync(resourceGroupName, serverName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The status of an import or export operation on a database given the - /// operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database - /// - /// - /// The operation ID associated with the operation. - /// - public static ImportExportOperationResponse GetByDatabase(this IImportExportOperations operations, string resourceGroupName, string serverName, string databaseName, System.Guid operationId) - { - return operations.GetByDatabaseAsync(resourceGroupName, serverName, databaseName, operationId).GetAwaiter().GetResult(); - } - - /// - /// The status of an import or export operation on a database given the - /// operation ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database - /// - /// - /// The operation ID associated with the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetByDatabaseAsync(this IImportExportOperations operations, string resourceGroupName, string serverName, string databaseName, System.Guid operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/AuthenticationType.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/AuthenticationType.cs index f3d71bbe3f4e..ef037c17ef81 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/AuthenticationType.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/AuthenticationType.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for AuthenticationType. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum AuthenticationType { [EnumMember(Value = "SQL")] @@ -28,4 +28,3 @@ public enum AuthenticationType ADPassword } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStates.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/BlobAuditingPolicyState.cs similarity index 65% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStates.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/BlobAuditingPolicyState.cs index c52653ac7e3b..aa1d3ae54663 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStates.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/BlobAuditingPolicyState.cs @@ -2,25 +2,25 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for TransparentDataEncryptionStates. + /// Defines values for BlobAuditingPolicyState. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum TransparentDataEncryptionStates + [JsonConverter(typeof(StringEnumConverter))] + public enum BlobAuditingPolicyState { [EnumMember(Value = "Enabled")] Enabled, @@ -28,4 +28,3 @@ public enum TransparentDataEncryptionStates Disabled } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CapabilityStatus.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CapabilityStatus.cs new file mode 100644 index 000000000000..c22f9be9545f --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CapabilityStatus.cs @@ -0,0 +1,34 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for CapabilityStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum CapabilityStatus + { + [EnumMember(Value = "Visible")] + Visible, + [EnumMember(Value = "Available")] + Available, + [EnumMember(Value = "Default")] + Default, + [EnumMember(Value = "Disabled")] + Disabled + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Column.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Column.cs deleted file mode 100644 index 77bd14ad14bd..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Column.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a database table column. - /// - [JsonTransformation] - public partial class Column : Resource - { - /// - /// Initializes a new instance of the Column class. - /// - public Column() { } - - /// - /// Initializes a new instance of the Column class. - /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags - /// The type of database table column. - public Column(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), string columnType = default(string)) - : base(location, name, id, type, tags) - { - ColumnType = columnType; - } - - /// - /// Gets the type of database table column. - /// - [JsonProperty(PropertyName = "properties.columnType")] - public string ColumnType { get; protected set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CreateMode.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CreateMode.cs index fba03890bbb5..e58644e02248 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CreateMode.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/CreateMode.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for CreateMode. @@ -24,6 +24,6 @@ public static class CreateMode public const string PointInTimeRestore = "PointInTimeRestore"; public const string Recovery = "Recovery"; public const string Restore = "Restore"; + public const string RestoreLongTermRetentionBackup = "RestoreLongTermRetentionBackup"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Database.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Database.cs index 6676a199ee94..4d182d173fcd 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Database.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Database.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,22 +21,25 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a database. /// - [JsonTransformation] - public partial class Database : Resource + [Rest.Serialization.JsonTransformation] + public partial class Database : TrackedResource { /// /// Initializes a new instance of the Database class. /// - public Database() { } + public Database() + { + CustomInit(); + } /// /// Initializes a new instance of the Database class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource location. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource tags. /// Kind of database. This is metadata used for the /// Azure portal experience. /// The collation of the database. If @@ -52,35 +55,82 @@ public Database() { } /// This records the earliest start /// date and time that restore is available for this database (ISO8601 /// format). - /// Specifies the type of database to create. - /// If createMode is not set to Default, sourceDatabaseId must be - /// specified. If createMode is set to PointInTimeRestore, then - /// restorePointInTime must be specified. If createMode is set to - /// Restore, then sourceDatabaseDeletionDate must be specified. - /// Possible values include: 'Copy', 'Default', 'NonReadableSecondary', - /// 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', - /// 'Restore' - /// Conditional. If createMode is not - /// set to Default, then this value must be specified. Specifies the + /// Specifies the mode of database creation. + /// + /// Default: regular database creation. + /// + /// Copy: creates a database as a copy of an existing database. + /// sourceDatabaseId must be specified as the resource ID of the source + /// database. + /// + /// OnlineSecondary/NonReadableSecondary: creates a database as a + /// (readable or nonreadable) secondary replica of an existing + /// database. sourceDatabaseId must be specified as the resource ID of + /// the existing primary database. + /// + /// PointInTimeRestore: Creates a database by restoring a point in time + /// backup of an existing database. sourceDatabaseId must be specified + /// as the resource ID of the existing database, and restorePointInTime + /// must be specified. + /// + /// Recovery: Creates a database by restoring a geo-replicated backup. + /// sourceDatabaseId must be specified as the recoverable database + /// resource ID to restore. + /// + /// Restore: Creates a database by restoring a backup of a deleted + /// database. sourceDatabaseId must be specified. If sourceDatabaseId + /// is the database's original resource ID, then + /// sourceDatabaseDeletionDate must be specified. Otherwise + /// sourceDatabaseId must be the restorable dropped database resource + /// ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + /// may also be specified to restore from an earlier point in time. + /// + /// RestoreLongTermRetentionBackup: Creates a database by restoring + /// from a long term retention vault. + /// recoveryServicesRecoveryPointResourceId must be specified as the + /// recovery point resource ID. + /// + /// Copy, NonReadableSecondary, OnlineSecondary and + /// RestoreLongTermRetentionBackup are not supported for DataWarehouse + /// edition. Possible values include: 'Copy', 'Default', + /// 'NonReadableSecondary', 'OnlineSecondary', 'PointInTimeRestore', + /// 'Recovery', 'Restore', 'RestoreLongTermRetentionBackup' + /// Conditional. If createMode is Copy, + /// NonReadableSecondary, OnlineSecondary, PointInTimeRestore, + /// Recovery, or Restore, then this value is required. Specifies the /// resource ID of the source database. If createMode is /// NonReadableSecondary or OnlineSecondary, the name of the source - /// database must be the same as this new database. - /// Conditional. If createMode is set - /// to PointInTimeRestore, then this value must be specified. Specifies - /// the point in time (ISO8601 format) of the source database that will - /// be restored to create the new database. Must be greater than or - /// equal to the source database's earliestRestoreDate value. + /// database must be the same as the new database being + /// created. + /// Conditional. If createMode + /// is Restore and sourceDatabaseId is the deleted database's original + /// resource id when it existed (as opposed to its current restorable + /// dropped database id), then this value is required. Specifies the + /// time that the database was deleted. + /// Conditional. If createMode is + /// PointInTimeRestore, this value is required. If createMode is + /// Restore, this value is optional. Specifies the point in time + /// (ISO8601 format) of the source database that will be restored to + /// create the new database. Must be greater than or equal to the + /// source database's earliestRestoreDate value. + /// Conditional. + /// If createMode is RestoreLongTermRetentionBackup, then this value is + /// required. Specifies the resource ID of the recovery point to + /// restore from. /// The edition of the database. The /// DatabaseEditions enumeration contains all the valid editions. If /// createMode is NonReadableSecondary or OnlineSecondary, this value - /// is ignored. Possible values include: 'Web', 'Business', 'Basic', - /// 'Standard', 'Premium', 'Free', 'Stretch', 'DataWarehouse', - /// 'System' + /// is ignored. To see possible values, query the capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation.". + /// Possible values include: 'Web', 'Business', 'Basic', 'Standard', + /// 'Premium', 'Free', 'Stretch', 'DataWarehouse', 'System', + /// 'System2' /// The max size of the database expressed - /// in bytes. If createMode is not Default, this value is ignored. - /// Note: Only the following sizes are supported (in addition to - /// limitations being placed on each edition): { 100 MB | 500 MB |1 GB - /// | 5 GB | 10 GB | 20 GB | 30 GB … 150 GB | 200 GB … 500 GB } + /// in bytes. If createMode is not Default, this value is ignored. To + /// see possible values, query the capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation." /// The configured service /// level objective ID of the database. This is the service level /// objective that is in the process of being applied to the database. @@ -88,44 +138,52 @@ public Database() { } /// currentServiceObjectiveId property. If requestedServiceObjectiveId /// and requestedServiceObjectiveName are both updated, the value of /// requestedServiceObjectiveId overrides the value of - /// requestedServiceObjectiveName. + /// requestedServiceObjectiveName. To see possible values, query the + /// capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation." /// The name of the /// configured service level objective of the database. This is the /// service level objective that is in the process of being applied to /// the database. Once successfully updated, it will match the value of - /// serviceLevelObjective property. Possible values include: 'Basic', - /// 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', - /// 'System', 'ElasticPool' + /// serviceLevelObjective property. To see possible values, query the + /// capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation.". + /// Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', + /// 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', + /// 'ElasticPool' /// The current service level /// objective of the database. Possible values include: 'Basic', 'S0', /// 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', - /// 'System', 'ElasticPool' + /// 'System', 'System2', 'ElasticPool' /// The status of the database. /// The name of the elastic pool the /// database is in. If elasticPoolName and /// requestedServiceObjectiveName are both updated, the value of - /// requestedServiceObjectiveName is ignored. + /// requestedServiceObjectiveName is ignored. Not supported for + /// DataWarehouse edition. /// The default secondary region /// for this database. /// The list of service tier advisors /// for this database. Expanded property - /// The schemas from this database. /// The transparent data /// encryption info for this database. /// The recommended indices for this /// database. /// The id indicating the failover group /// containing this database. - /// Conditional. If the database is a + /// Conditional. If the database is a /// geo-secondary, readScale indicates whether read-only connections - /// are allowed to this database or not. Possible values include: - /// 'Enabled', 'Disabled' + /// are allowed to this database or not. Not supported for + /// DataWarehouse edition. Possible values include: 'Enabled', + /// 'Disabled' /// Indicates the name of the sample schema to /// apply when creating this database. If createMode is not Default, - /// this value is ignored. Possible values include: - /// 'AdventureWorksLT' - public Database(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), string kind = default(string), string collation = default(string), System.DateTime? creationDate = default(System.DateTime?), long? containmentState = default(long?), System.Guid? currentServiceObjectiveId = default(System.Guid?), string databaseId = default(string), System.DateTime? earliestRestoreDate = default(System.DateTime?), string createMode = default(string), string sourceDatabaseId = default(string), System.DateTime? restorePointInTime = default(System.DateTime?), string edition = default(string), string maxSizeBytes = default(string), System.Guid? requestedServiceObjectiveId = default(System.Guid?), string requestedServiceObjectiveName = default(string), string serviceLevelObjective = default(string), string status = default(string), string elasticPoolName = default(string), string defaultSecondaryLocation = default(string), IList serviceTierAdvisors = default(IList), IList schemas = default(IList), IList transparentDataEncryption = default(IList), IList recommendedIndex = default(IList), System.Guid? failoverGroupId = default(System.Guid?), ReadScale? readScale = default(ReadScale?), string sampleName = default(string)) - : base(location, name, id, type, tags) + /// this value is ignored. Not supported for DataWarehouse edition. + /// Possible values include: 'AdventureWorksLT' + public Database(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string kind = default(string), string collation = default(string), System.DateTime? creationDate = default(System.DateTime?), long? containmentState = default(long?), System.Guid? currentServiceObjectiveId = default(System.Guid?), string databaseId = default(string), System.DateTime? earliestRestoreDate = default(System.DateTime?), string createMode = default(string), string sourceDatabaseId = default(string), System.DateTime? sourceDatabaseDeletionDate = default(System.DateTime?), System.DateTime? restorePointInTime = default(System.DateTime?), System.DateTime? recoveryServicesRecoveryPointResourceId = default(System.DateTime?), string edition = default(string), string maxSizeBytes = default(string), System.Guid? requestedServiceObjectiveId = default(System.Guid?), string requestedServiceObjectiveName = default(string), string serviceLevelObjective = default(string), string status = default(string), string elasticPoolName = default(string), string defaultSecondaryLocation = default(string), IList serviceTierAdvisors = default(IList), IList transparentDataEncryption = default(IList), IList recommendedIndex = default(IList), System.Guid? failoverGroupId = default(System.Guid?), ReadScale? readScale = default(ReadScale?), string sampleName = default(string)) + : base(location, id, name, type, tags) { Kind = kind; Collation = collation; @@ -136,7 +194,9 @@ public Database() { } EarliestRestoreDate = earliestRestoreDate; CreateMode = createMode; SourceDatabaseId = sourceDatabaseId; + SourceDatabaseDeletionDate = sourceDatabaseDeletionDate; RestorePointInTime = restorePointInTime; + RecoveryServicesRecoveryPointResourceId = recoveryServicesRecoveryPointResourceId; Edition = edition; MaxSizeBytes = maxSizeBytes; RequestedServiceObjectiveId = requestedServiceObjectiveId; @@ -146,20 +206,25 @@ public Database() { } ElasticPoolName = elasticPoolName; DefaultSecondaryLocation = defaultSecondaryLocation; ServiceTierAdvisors = serviceTierAdvisors; - Schemas = schemas; TransparentDataEncryption = transparentDataEncryption; RecommendedIndex = recommendedIndex; FailoverGroupId = failoverGroupId; ReadScale = readScale; SampleName = sampleName; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets kind of database. This is metadata used for the Azure portal /// experience. /// [JsonProperty(PropertyName = "kind")] - public string Kind { get; protected set; } + public string Kind { get; private set; } /// /// Gets or sets the collation of the database. If createMode is not @@ -172,82 +237,138 @@ public Database() { } /// Gets the creation date of the database (ISO8601 format). /// [JsonProperty(PropertyName = "properties.creationDate")] - public System.DateTime? CreationDate { get; protected set; } + public System.DateTime? CreationDate { get; private set; } /// /// Gets the containment state of the database. /// [JsonProperty(PropertyName = "properties.containmentState")] - public long? ContainmentState { get; protected set; } + public long? ContainmentState { get; private set; } /// /// Gets the current service level objective ID of the database. This /// is the ID of the service level objective that is currently active. /// [JsonProperty(PropertyName = "properties.currentServiceObjectiveId")] - public System.Guid? CurrentServiceObjectiveId { get; protected set; } + public System.Guid? CurrentServiceObjectiveId { get; private set; } /// /// Gets the ID of the database. /// [JsonProperty(PropertyName = "properties.databaseId")] - public string DatabaseId { get; protected set; } + public string DatabaseId { get; private set; } /// /// Gets this records the earliest start date and time that restore is /// available for this database (ISO8601 format). /// [JsonProperty(PropertyName = "properties.earliestRestoreDate")] - public System.DateTime? EarliestRestoreDate { get; protected set; } + public System.DateTime? EarliestRestoreDate { get; private set; } /// - /// Gets or sets specifies the type of database to create. If - /// createMode is not set to Default, sourceDatabaseId must be - /// specified. If createMode is set to PointInTimeRestore, then - /// restorePointInTime must be specified. If createMode is set to - /// Restore, then sourceDatabaseDeletionDate must be specified. - /// Possible values include: 'Copy', 'Default', 'NonReadableSecondary', - /// 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', 'Restore' + /// Gets or sets specifies the mode of database creation. + /// + /// Default: regular database creation. + /// + /// Copy: creates a database as a copy of an existing database. + /// sourceDatabaseId must be specified as the resource ID of the source + /// database. + /// + /// OnlineSecondary/NonReadableSecondary: creates a database as a + /// (readable or nonreadable) secondary replica of an existing + /// database. sourceDatabaseId must be specified as the resource ID of + /// the existing primary database. + /// + /// PointInTimeRestore: Creates a database by restoring a point in time + /// backup of an existing database. sourceDatabaseId must be specified + /// as the resource ID of the existing database, and restorePointInTime + /// must be specified. + /// + /// Recovery: Creates a database by restoring a geo-replicated backup. + /// sourceDatabaseId must be specified as the recoverable database + /// resource ID to restore. + /// + /// Restore: Creates a database by restoring a backup of a deleted + /// database. sourceDatabaseId must be specified. If sourceDatabaseId + /// is the database's original resource ID, then + /// sourceDatabaseDeletionDate must be specified. Otherwise + /// sourceDatabaseId must be the restorable dropped database resource + /// ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + /// may also be specified to restore from an earlier point in time. + /// + /// RestoreLongTermRetentionBackup: Creates a database by restoring + /// from a long term retention vault. + /// recoveryServicesRecoveryPointResourceId must be specified as the + /// recovery point resource ID. + /// + /// Copy, NonReadableSecondary, OnlineSecondary and + /// RestoreLongTermRetentionBackup are not supported for DataWarehouse + /// edition. Possible values include: 'Copy', 'Default', + /// 'NonReadableSecondary', 'OnlineSecondary', 'PointInTimeRestore', + /// 'Recovery', 'Restore', 'RestoreLongTermRetentionBackup' /// [JsonProperty(PropertyName = "properties.createMode")] public string CreateMode { get; set; } /// - /// Gets or sets conditional. If createMode is not set to Default, then - /// this value must be specified. Specifies the resource ID of the - /// source database. If createMode is NonReadableSecondary or - /// OnlineSecondary, the name of the source database must be the same - /// as this new database. + /// Gets or sets conditional. If createMode is Copy, + /// NonReadableSecondary, OnlineSecondary, PointInTimeRestore, + /// Recovery, or Restore, then this value is required. Specifies the + /// resource ID of the source database. If createMode is + /// NonReadableSecondary or OnlineSecondary, the name of the source + /// database must be the same as the new database being created. /// [JsonProperty(PropertyName = "properties.sourceDatabaseId")] public string SourceDatabaseId { get; set; } /// - /// Gets or sets conditional. If createMode is set to - /// PointInTimeRestore, then this value must be specified. Specifies - /// the point in time (ISO8601 format) of the source database that will - /// be restored to create the new database. Must be greater than or - /// equal to the source database's earliestRestoreDate value. + /// Gets or sets conditional. If createMode is Restore and + /// sourceDatabaseId is the deleted database's original resource id + /// when it existed (as opposed to its current restorable dropped + /// database id), then this value is required. Specifies the time that + /// the database was deleted. + /// + [JsonProperty(PropertyName = "properties.sourceDatabaseDeletionDate")] + public System.DateTime? SourceDatabaseDeletionDate { get; set; } + + /// + /// Gets or sets conditional. If createMode is PointInTimeRestore, this + /// value is required. If createMode is Restore, this value is + /// optional. Specifies the point in time (ISO8601 format) of the + /// source database that will be restored to create the new database. + /// Must be greater than or equal to the source database's + /// earliestRestoreDate value. /// [JsonProperty(PropertyName = "properties.restorePointInTime")] public System.DateTime? RestorePointInTime { get; set; } + /// + /// Gets or sets conditional. If createMode is + /// RestoreLongTermRetentionBackup, then this value is required. + /// Specifies the resource ID of the recovery point to restore from. + /// + [JsonProperty(PropertyName = "properties.recoveryServicesRecoveryPointResourceId")] + public System.DateTime? RecoveryServicesRecoveryPointResourceId { get; set; } + /// /// Gets or sets the edition of the database. The DatabaseEditions /// enumeration contains all the valid editions. If createMode is - /// NonReadableSecondary or OnlineSecondary, this value is ignored. + /// NonReadableSecondary or OnlineSecondary, this value is ignored. To + /// see possible values, query the capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation.". /// Possible values include: 'Web', 'Business', 'Basic', 'Standard', - /// 'Premium', 'Free', 'Stretch', 'DataWarehouse', 'System' + /// 'Premium', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' /// [JsonProperty(PropertyName = "properties.edition")] public string Edition { get; set; } /// /// Gets or sets the max size of the database expressed in bytes. If - /// createMode is not Default, this value is ignored. Note: Only the - /// following sizes are supported (in addition to limitations being - /// placed on each edition): { 100 MB | 500 MB |1 GB | 5 GB | 10 GB | - /// 20 GB | 30 GB … 150 GB | 200 GB … 500 GB } + /// createMode is not Default, this value is ignored. To see possible + /// values, query the capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation." /// [JsonProperty(PropertyName = "properties.maxSizeBytes")] public string MaxSizeBytes { get; set; } @@ -260,7 +381,10 @@ public Database() { } /// property. If requestedServiceObjectiveId and /// requestedServiceObjectiveName are both updated, the value of /// requestedServiceObjectiveId overrides the value of - /// requestedServiceObjectiveName. + /// requestedServiceObjectiveName. To see possible values, query the + /// capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation." /// [JsonProperty(PropertyName = "properties.requestedServiceObjectiveId")] public System.Guid? RequestedServiceObjectiveId { get; set; } @@ -270,8 +394,12 @@ public Database() { } /// the database. This is the service level objective that is in the /// process of being applied to the database. Once successfully /// updated, it will match the value of serviceLevelObjective property. + /// To see possible values, query the capabilities API + /// (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) + /// referred to by operationId: "Capabilities_ListByLocation.". /// Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', - /// 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'ElasticPool' + /// 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', + /// 'ElasticPool' /// [JsonProperty(PropertyName = "properties.requestedServiceObjectiveName")] public string RequestedServiceObjectiveName { get; set; } @@ -279,21 +407,22 @@ public Database() { } /// /// Gets the current service level objective of the database. Possible /// values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', - /// 'P4', 'P6', 'P11', 'P15', 'System', 'ElasticPool' + /// 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' /// [JsonProperty(PropertyName = "properties.serviceLevelObjective")] - public string ServiceLevelObjective { get; protected set; } + public string ServiceLevelObjective { get; private set; } /// /// Gets the status of the database. /// [JsonProperty(PropertyName = "properties.status")] - public string Status { get; protected set; } + public string Status { get; private set; } /// /// Gets or sets the name of the elastic pool the database is in. If /// elasticPoolName and requestedServiceObjectiveName are both updated, - /// the value of requestedServiceObjectiveName is ignored. + /// the value of requestedServiceObjectiveName is ignored. Not + /// supported for DataWarehouse edition. /// [JsonProperty(PropertyName = "properties.elasticPoolName")] public string ElasticPoolName { get; set; } @@ -302,44 +431,38 @@ public Database() { } /// Gets the default secondary region for this database. /// [JsonProperty(PropertyName = "properties.defaultSecondaryLocation")] - public string DefaultSecondaryLocation { get; protected set; } + public string DefaultSecondaryLocation { get; private set; } /// /// Gets the list of service tier advisors for this database. Expanded /// property /// [JsonProperty(PropertyName = "properties.serviceTierAdvisors")] - public IList ServiceTierAdvisors { get; protected set; } - - /// - /// Gets the schemas from this database. - /// - [JsonProperty(PropertyName = "properties.schemas")] - public IList Schemas { get; protected set; } + public IList ServiceTierAdvisors { get; private set; } /// /// Gets the transparent data encryption info for this database. /// [JsonProperty(PropertyName = "properties.transparentDataEncryption")] - public IList TransparentDataEncryption { get; protected set; } + public IList TransparentDataEncryption { get; private set; } /// /// Gets the recommended indices for this database. /// [JsonProperty(PropertyName = "properties.recommendedIndex")] - public IList RecommendedIndex { get; protected set; } + public IList RecommendedIndex { get; private set; } /// /// Gets the id indicating the failover group containing this database. /// [JsonProperty(PropertyName = "properties.failoverGroupId")] - public System.Guid? FailoverGroupId { get; protected set; } + public System.Guid? FailoverGroupId { get; private set; } /// - /// Gets or sets conditional. If the database is a geo-secondary, + /// Gets or sets conditional. If the database is a geo-secondary, /// readScale indicates whether read-only connections are allowed to - /// this database or not. Possible values include: 'Enabled', - /// 'Disabled' + /// this database or not. Not supported for DataWarehouse edition. + /// Possible values include: 'Enabled', 'Disabled' /// [JsonProperty(PropertyName = "properties.readScale")] public ReadScale? ReadScale { get; set; } @@ -347,7 +470,8 @@ public Database() { } /// /// Gets or sets indicates the name of the sample schema to apply when /// creating this database. If createMode is not Default, this value is - /// ignored. Possible values include: 'AdventureWorksLT' + /// ignored. Not supported for DataWarehouse edition. Possible values + /// include: 'AdventureWorksLT' /// [JsonProperty(PropertyName = "properties.sampleName")] public string SampleName { get; set; } @@ -361,27 +485,6 @@ public Database() { } public override void Validate() { base.Validate(); - if (Schemas != null) - { - foreach (var element in Schemas) - { - if (element != null) - { - element.Validate(); - } - } - } - if (RecommendedIndex != null) - { - foreach (var element1 in RecommendedIndex) - { - if (element1 != null) - { - element1.Validate(); - } - } - } } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseBlobAuditingPolicy.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseBlobAuditingPolicy.cs new file mode 100644 index 000000000000..11081c0dafe2 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseBlobAuditingPolicy.cs @@ -0,0 +1,153 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Contains information about a database Blob Auditing policy. + /// + [Rest.Serialization.JsonTransformation] + public partial class DatabaseBlobAuditingPolicy : ProxyResource + { + /// + /// Initializes a new instance of the DatabaseBlobAuditingPolicy class. + /// + public DatabaseBlobAuditingPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabaseBlobAuditingPolicy class. + /// + /// Specifies the state of the policy. If state is + /// Enabled, storageEndpoint and storageAccountAccessKey are required. + /// Possible values include: 'Enabled', 'Disabled' + /// Resource ID. + /// Resource name. + /// Resource type. + /// The geo-location where the resource + /// lives + /// Resource kind. + /// Specifies the blob storage endpoint + /// (e.g. https://MyAccount.blob.core.windows.net). If state is + /// Enabled, storageEndpoint is required. + /// Specifies the identifier key + /// of the auditing storage account. If state is Enabled, + /// storageAccountAccessKey is required. + /// Specifies the number of days to keep in + /// the audit logs. + /// Specifies the Actions and + /// Actions-Groups to audit. + /// Specifies the blob + /// storage subscription Id. + /// Specifies whether + /// storageAccountAccessKey value is the storage’s secondary + /// key. + public DatabaseBlobAuditingPolicy(BlobAuditingPolicyState state, string id = default(string), string name = default(string), string type = default(string), string location = default(string), string kind = default(string), string storageEndpoint = default(string), string storageAccountAccessKey = default(string), int? retentionDays = default(int?), IList auditActionsAndGroups = default(IList), string storageAccountSubscriptionId = default(string), bool? isStorageSecondaryKeyInUse = default(bool?)) + : base(id, name, type) + { + Location = location; + Kind = kind; + State = state; + StorageEndpoint = storageEndpoint; + StorageAccountAccessKey = storageAccountAccessKey; + RetentionDays = retentionDays; + AuditActionsAndGroups = auditActionsAndGroups; + StorageAccountSubscriptionId = storageAccountSubscriptionId; + IsStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets resource kind. + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; private set; } + + /// + /// Gets or sets specifies the state of the policy. If state is + /// Enabled, storageEndpoint and storageAccountAccessKey are required. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.state")] + public BlobAuditingPolicyState State { get; set; } + + /// + /// Gets or sets specifies the blob storage endpoint (e.g. + /// https://MyAccount.blob.core.windows.net). If state is Enabled, + /// storageEndpoint is required. + /// + [JsonProperty(PropertyName = "properties.storageEndpoint")] + public string StorageEndpoint { get; set; } + + /// + /// Gets or sets specifies the identifier key of the auditing storage + /// account. If state is Enabled, storageAccountAccessKey is required. + /// + [JsonProperty(PropertyName = "properties.storageAccountAccessKey")] + public string StorageAccountAccessKey { get; set; } + + /// + /// Gets or sets specifies the number of days to keep in the audit + /// logs. + /// + [JsonProperty(PropertyName = "properties.retentionDays")] + public int? RetentionDays { get; set; } + + /// + /// Gets or sets specifies the Actions and Actions-Groups to audit. + /// + [JsonProperty(PropertyName = "properties.auditActionsAndGroups")] + public IList AuditActionsAndGroups { get; set; } + + /// + /// Gets or sets specifies the blob storage subscription Id. + /// + [JsonProperty(PropertyName = "properties.storageAccountSubscriptionId")] + public string StorageAccountSubscriptionId { get; set; } + + /// + /// Gets or sets specifies whether storageAccountAccessKey value is the + /// storage’s secondary key. + /// + [JsonProperty(PropertyName = "properties.isStorageSecondaryKeyInUse")] + public bool? IsStorageSecondaryKeyInUse { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEditions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEdition.cs similarity index 72% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEditions.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEdition.cs index 36d268b7b4dd..ce917741917b 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEditions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseEdition.cs @@ -2,20 +2,20 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// - /// Defines values for DatabaseEditions. + /// Defines values for DatabaseEdition. /// - public static class DatabaseEditions + public static class DatabaseEdition { public const string Web = "Web"; public const string Business = "Business"; @@ -26,6 +26,6 @@ public static class DatabaseEditions public const string Stretch = "Stretch"; public const string DataWarehouse = "DataWarehouse"; public const string System = "System"; + public const string System2 = "System2"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseMetric.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseMetric.cs index ab228a99cbf6..261b7ca03351 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseMetric.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseMetric.cs @@ -2,27 +2,30 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; /// /// Represents database metrics. /// - public partial class DatabaseMetric : SqlSubResource + public partial class DatabaseMetric : SubResource { /// /// Initializes a new instance of the DatabaseMetric class. /// - public DatabaseMetric() { } + public DatabaseMetric() + { + CustomInit(); + } /// /// Initializes a new instance of the DatabaseMetric class. @@ -45,44 +48,49 @@ public DatabaseMetric() { } Limit = limit; Unit = unit; NextResetTime = nextResetTime; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the name of the resource. /// [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; protected set; } + public string ResourceName { get; private set; } /// /// Gets the metric display name. /// [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; protected set; } + public string DisplayName { get; private set; } /// /// Gets the current value of the metric. /// [JsonProperty(PropertyName = "currentValue")] - public double? CurrentValue { get; protected set; } + public double? CurrentValue { get; private set; } /// /// Gets the current limit of the metric. /// [JsonProperty(PropertyName = "limit")] - public double? Limit { get; protected set; } + public double? Limit { get; private set; } /// /// Gets the units of the metric. /// [JsonProperty(PropertyName = "unit")] - public string Unit { get; protected set; } + public string Unit { get; private set; } /// /// Gets the next reset time for the metric (ISO8601 format). /// [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; protected set; } + public System.DateTime? NextResetTime { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseSecurityAlertPolicy.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseSecurityAlertPolicy.cs new file mode 100644 index 000000000000..ec7cba770e5a --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/DatabaseSecurityAlertPolicy.cs @@ -0,0 +1,173 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Contains information about a database Threat Detection policy. + /// + [Rest.Serialization.JsonTransformation] + public partial class DatabaseSecurityAlertPolicy : ProxyResource + { + /// + /// Initializes a new instance of the DatabaseSecurityAlertPolicy + /// class. + /// + public DatabaseSecurityAlertPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabaseSecurityAlertPolicy + /// class. + /// + /// Specifies the state of the policy. If state is + /// Enabled, storageEndpoint and storageAccountAccessKey are required. + /// Possible values include: 'New', 'Enabled', 'Disabled' + /// Resource ID. + /// Resource name. + /// Resource type. + /// The geo-location where the resource + /// lives + /// Resource kind. + /// Specifies the semicolon-separated list + /// of alerts that are disabled, or empty string to disable no alerts. + /// Possible values: Sql_Injection; Sql_Injection_Vulnerability; + /// Access_Anomaly; Usage_Anomaly. + /// Specifies the semicolon-separated list + /// of e-mail addresses to which the alert is sent. + /// Specifies that the alert is sent + /// to the account administrators. Possible values include: 'Enabled', + /// 'Disabled' + /// Specifies the blob storage endpoint + /// (e.g. https://MyAccount.blob.core.windows.net). This blob storage + /// will hold all Threat Detection audit logs. If state is Enabled, + /// storageEndpoint is required. + /// Specifies the identifier key + /// of the Threat Detection audit storage account. If state is Enabled, + /// storageAccountAccessKey is required. + /// Specifies the number of days to keep in + /// the Threat Detection audit logs. + /// Specifies whether to use the default + /// server policy. Possible values include: 'Enabled', + /// 'Disabled' + public DatabaseSecurityAlertPolicy(SecurityAlertPolicyState state, string id = default(string), string name = default(string), string type = default(string), string location = default(string), string kind = default(string), string disabledAlerts = default(string), string emailAddresses = default(string), SecurityAlertPolicyEmailAccountAdmins? emailAccountAdmins = default(SecurityAlertPolicyEmailAccountAdmins?), string storageEndpoint = default(string), string storageAccountAccessKey = default(string), int? retentionDays = default(int?), SecurityAlertPolicyUseServerDefault? useServerDefault = default(SecurityAlertPolicyUseServerDefault?)) + : base(id, name, type) + { + Location = location; + Kind = kind; + State = state; + DisabledAlerts = disabledAlerts; + EmailAddresses = emailAddresses; + EmailAccountAdmins = emailAccountAdmins; + StorageEndpoint = storageEndpoint; + StorageAccountAccessKey = storageAccountAccessKey; + RetentionDays = retentionDays; + UseServerDefault = useServerDefault; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets resource kind. + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; private set; } + + /// + /// Gets or sets specifies the state of the policy. If state is + /// Enabled, storageEndpoint and storageAccountAccessKey are required. + /// Possible values include: 'New', 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.state")] + public SecurityAlertPolicyState State { get; set; } + + /// + /// Gets or sets specifies the semicolon-separated list of alerts that + /// are disabled, or empty string to disable no alerts. Possible + /// values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + /// Usage_Anomaly. + /// + [JsonProperty(PropertyName = "properties.disabledAlerts")] + public string DisabledAlerts { get; set; } + + /// + /// Gets or sets specifies the semicolon-separated list of e-mail + /// addresses to which the alert is sent. + /// + [JsonProperty(PropertyName = "properties.emailAddresses")] + public string EmailAddresses { get; set; } + + /// + /// Gets or sets specifies that the alert is sent to the account + /// administrators. Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.emailAccountAdmins")] + public SecurityAlertPolicyEmailAccountAdmins? EmailAccountAdmins { get; set; } + + /// + /// Gets or sets specifies the blob storage endpoint (e.g. + /// https://MyAccount.blob.core.windows.net). This blob storage will + /// hold all Threat Detection audit logs. If state is Enabled, + /// storageEndpoint is required. + /// + [JsonProperty(PropertyName = "properties.storageEndpoint")] + public string StorageEndpoint { get; set; } + + /// + /// Gets or sets specifies the identifier key of the Threat Detection + /// audit storage account. If state is Enabled, storageAccountAccessKey + /// is required. + /// + [JsonProperty(PropertyName = "properties.storageAccountAccessKey")] + public string StorageAccountAccessKey { get; set; } + + /// + /// Gets or sets specifies the number of days to keep in the Threat + /// Detection audit logs. + /// + [JsonProperty(PropertyName = "properties.retentionDays")] + public int? RetentionDays { get; set; } + + /// + /// Gets or sets specifies whether to use the default server policy. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.useServerDefault")] + public SecurityAlertPolicyUseServerDefault? UseServerDefault { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/EditionCapability.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/EditionCapability.cs new file mode 100644 index 000000000000..b92c36f30947 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/EditionCapability.cs @@ -0,0 +1,74 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The server edition capabilities. + /// + public partial class EditionCapability + { + /// + /// Initializes a new instance of the EditionCapability class. + /// + public EditionCapability() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EditionCapability class. + /// + /// The edition name. + /// The status of the server edition. Possible + /// values include: 'Visible', 'Available', 'Default', + /// 'Disabled' + /// The list of supported + /// service objectives for the edition. + public EditionCapability(string name = default(string), CapabilityStatus? status = default(CapabilityStatus?), IList supportedServiceLevelObjectives = default(IList)) + { + Name = name; + Status = status; + SupportedServiceLevelObjectives = supportedServiceLevelObjectives; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the edition name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the status of the server edition. Possible values include: + /// 'Visible', 'Available', 'Default', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public CapabilityStatus? Status { get; private set; } + + /// + /// Gets the list of supported service objectives for the edition. + /// + [JsonProperty(PropertyName = "supportedServiceLevelObjectives")] + public IList SupportedServiceLevelObjectives { get; private set; } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPool.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPool.cs index 3f947de63680..c0f8f0b30f00 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPool.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPool.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,22 +21,25 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a database elastic pool. /// - [JsonTransformation] - public partial class ElasticPool : Resource + [Rest.Serialization.JsonTransformation] + public partial class ElasticPool : TrackedResource { /// /// Initializes a new instance of the ElasticPool class. /// - public ElasticPool() { } + public ElasticPool() + { + CustomInit(); + } /// /// Initializes a new instance of the ElasticPool class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource location. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource tags. /// The creation date of the elastic pool /// (ISO8601 format). /// The state of the elastic pool. Possible values @@ -53,8 +56,8 @@ public ElasticPool() { } /// pool in MB. /// Kind of elastic pool. This is metadata used for /// the Azure portal experience. - public ElasticPool(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.DateTime? creationDate = default(System.DateTime?), string state = default(string), string edition = default(string), int? dtu = default(int?), int? databaseDtuMax = default(int?), int? databaseDtuMin = default(int?), int? storageMB = default(int?), string kind = default(string)) - : base(location, name, id, type, tags) + public ElasticPool(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.DateTime? creationDate = default(System.DateTime?), string state = default(string), string edition = default(string), int? dtu = default(int?), int? databaseDtuMax = default(int?), int? databaseDtuMin = default(int?), int? storageMB = default(int?), string kind = default(string)) + : base(location, id, name, type, tags) { CreationDate = creationDate; State = state; @@ -64,20 +67,26 @@ public ElasticPool() { } DatabaseDtuMin = databaseDtuMin; StorageMB = storageMB; Kind = kind; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the creation date of the elastic pool (ISO8601 format). /// [JsonProperty(PropertyName = "properties.creationDate")] - public System.DateTime? CreationDate { get; protected set; } + public System.DateTime? CreationDate { get; private set; } /// /// Gets the state of the elastic pool. Possible values include: /// 'Creating', 'Ready', 'Disabled' /// [JsonProperty(PropertyName = "properties.state")] - public string State { get; protected set; } + public string State { get; private set; } /// /// Gets or sets the edition of the elastic pool. Possible values @@ -115,7 +124,7 @@ public ElasticPool() { } /// portal experience. /// [JsonProperty(PropertyName = "kind")] - public string Kind { get; protected set; } + public string Kind { get; private set; } /// /// Validate the object. @@ -129,4 +138,3 @@ public override void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolActivity.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolActivity.cs index 5b4802a0d06c..1ff2dab1c974 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolActivity.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolActivity.cs @@ -2,41 +2,42 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Represents the activity on an elastic pool. /// - [JsonTransformation] - public partial class ElasticPoolActivity : Resource + [Rest.Serialization.JsonTransformation] + public partial class ElasticPoolActivity : ProxyResource { /// /// Initializes a new instance of the ElasticPoolActivity class. /// - public ElasticPoolActivity() { } + public ElasticPoolActivity() + { + CustomInit(); + } /// /// Initializes a new instance of the ElasticPoolActivity class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource ID. + /// Resource name. + /// Resource type. + /// The geo-location where the resource + /// lives /// The time the operation finished (ISO8601 /// format). /// The error code if available. @@ -71,9 +72,10 @@ public ElasticPoolActivity() { } /// DTU cap. /// The requested DTU /// guarantee. - public ElasticPoolActivity(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.DateTime? endTime = default(System.DateTime?), int? errorCode = default(int?), string errorMessage = default(string), int? errorSeverity = default(int?), string operation = default(string), string operationId = default(string), int? percentComplete = default(int?), int? requestedDatabaseDtuMax = default(int?), int? requestedDatabaseDtuMin = default(int?), int? requestedDtu = default(int?), string requestedElasticPoolName = default(string), long? requestedStorageLimitInGB = default(long?), string elasticPoolName = default(string), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string), int? requestedStorageLimitInMB = default(int?), int? requestedDatabaseDtuGuarantee = default(int?), int? requestedDatabaseDtuCap = default(int?), int? requestedDtuGuarantee = default(int?)) - : base(location, name, id, type, tags) + public ElasticPoolActivity(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.DateTime? endTime = default(System.DateTime?), int? errorCode = default(int?), string errorMessage = default(string), int? errorSeverity = default(int?), string operation = default(string), string operationId = default(string), int? percentComplete = default(int?), int? requestedDatabaseDtuMax = default(int?), int? requestedDatabaseDtuMin = default(int?), int? requestedDtu = default(int?), string requestedElasticPoolName = default(string), long? requestedStorageLimitInGB = default(long?), string elasticPoolName = default(string), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string), int? requestedStorageLimitInMB = default(int?), int? requestedDatabaseDtuGuarantee = default(int?), int? requestedDatabaseDtuCap = default(int?), int? requestedDtuGuarantee = default(int?)) + : base(id, name, type) { + Location = location; EndTime = endTime; ErrorCode = errorCode; ErrorMessage = errorMessage; @@ -94,138 +96,139 @@ public ElasticPoolActivity() { } RequestedDatabaseDtuGuarantee = requestedDatabaseDtuGuarantee; RequestedDatabaseDtuCap = requestedDatabaseDtuCap; RequestedDtuGuarantee = requestedDtuGuarantee; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + /// /// Gets the time the operation finished (ISO8601 format). /// [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; protected set; } + public System.DateTime? EndTime { get; private set; } /// /// Gets the error code if available. /// [JsonProperty(PropertyName = "properties.errorCode")] - public int? ErrorCode { get; protected set; } + public int? ErrorCode { get; private set; } /// /// Gets the error message if available. /// [JsonProperty(PropertyName = "properties.errorMessage")] - public string ErrorMessage { get; protected set; } + public string ErrorMessage { get; private set; } /// /// Gets the error severity if available. /// [JsonProperty(PropertyName = "properties.errorSeverity")] - public int? ErrorSeverity { get; protected set; } + public int? ErrorSeverity { get; private set; } /// /// Gets the operation name. /// [JsonProperty(PropertyName = "properties.operation")] - public string Operation { get; protected set; } + public string Operation { get; private set; } /// /// Gets the unique operation ID. /// [JsonProperty(PropertyName = "properties.operationId")] - public string OperationId { get; protected set; } + public string OperationId { get; private set; } /// /// Gets the percentage complete if available. /// [JsonProperty(PropertyName = "properties.percentComplete")] - public int? PercentComplete { get; protected set; } + public int? PercentComplete { get; private set; } /// /// Gets the requested max DTU per database if available. /// [JsonProperty(PropertyName = "properties.requestedDatabaseDtuMax")] - public int? RequestedDatabaseDtuMax { get; protected set; } + public int? RequestedDatabaseDtuMax { get; private set; } /// /// Gets the requested min DTU per database if available. /// [JsonProperty(PropertyName = "properties.requestedDatabaseDtuMin")] - public int? RequestedDatabaseDtuMin { get; protected set; } + public int? RequestedDatabaseDtuMin { get; private set; } /// /// Gets the requested DTU for the pool if available. /// [JsonProperty(PropertyName = "properties.requestedDtu")] - public int? RequestedDtu { get; protected set; } + public int? RequestedDtu { get; private set; } /// /// Gets the requested name for the elastic pool if available. /// [JsonProperty(PropertyName = "properties.requestedElasticPoolName")] - public string RequestedElasticPoolName { get; protected set; } + public string RequestedElasticPoolName { get; private set; } /// /// Gets the requested storage limit for the pool in GB if available. /// [JsonProperty(PropertyName = "properties.requestedStorageLimitInGB")] - public long? RequestedStorageLimitInGB { get; protected set; } + public long? RequestedStorageLimitInGB { get; private set; } /// /// Gets the name of the elastic pool. /// [JsonProperty(PropertyName = "properties.elasticPoolName")] - public string ElasticPoolName { get; protected set; } + public string ElasticPoolName { get; private set; } /// /// Gets the name of the server the elastic pool is in. /// [JsonProperty(PropertyName = "properties.serverName")] - public string ServerName { get; protected set; } + public string ServerName { get; private set; } /// /// Gets the time the operation started (ISO8601 format). /// [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; protected set; } + public System.DateTime? StartTime { get; private set; } /// /// Gets the current state of the operation. /// [JsonProperty(PropertyName = "properties.state")] - public string State { get; protected set; } + public string State { get; private set; } /// /// Gets the requested storage limit in MB. /// [JsonProperty(PropertyName = "properties.requestedStorageLimitInMB")] - public int? RequestedStorageLimitInMB { get; protected set; } + public int? RequestedStorageLimitInMB { get; private set; } /// /// Gets the requested per database DTU guarantee. /// [JsonProperty(PropertyName = "properties.requestedDatabaseDtuGuarantee")] - public int? RequestedDatabaseDtuGuarantee { get; protected set; } + public int? RequestedDatabaseDtuGuarantee { get; private set; } /// /// Gets the requested per database DTU cap. /// [JsonProperty(PropertyName = "properties.requestedDatabaseDtuCap")] - public int? RequestedDatabaseDtuCap { get; protected set; } + public int? RequestedDatabaseDtuCap { get; private set; } /// /// Gets the requested DTU guarantee. /// [JsonProperty(PropertyName = "properties.requestedDtuGuarantee")] - public int? RequestedDtuGuarantee { get; protected set; } + public int? RequestedDtuGuarantee { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolDatabaseActivity.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolDatabaseActivity.cs index 7131e241be23..fc7f7db514cc 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolDatabaseActivity.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolDatabaseActivity.cs @@ -2,43 +2,44 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Represents the activity on an elastic pool. /// - [JsonTransformation] - public partial class ElasticPoolDatabaseActivity : Resource + [Rest.Serialization.JsonTransformation] + public partial class ElasticPoolDatabaseActivity : ProxyResource { /// /// Initializes a new instance of the ElasticPoolDatabaseActivity /// class. /// - public ElasticPoolDatabaseActivity() { } + public ElasticPoolDatabaseActivity() + { + CustomInit(); + } /// /// Initializes a new instance of the ElasticPoolDatabaseActivity /// class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource ID. + /// Resource name. + /// Resource type. + /// The geo-location where the resource + /// lives /// The database name. /// The time the operation finished (ISO8601 /// format). @@ -63,9 +64,10 @@ public ElasticPoolDatabaseActivity() { } /// The time the operation started (ISO8601 /// format). /// The current state of the operation. - public ElasticPoolDatabaseActivity(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), string databaseName = default(string), System.DateTime? endTime = default(System.DateTime?), int? errorCode = default(int?), string errorMessage = default(string), int? errorSeverity = default(int?), string operation = default(string), string operationId = default(string), int? percentComplete = default(int?), string requestedElasticPoolName = default(string), string currentElasticPoolName = default(string), string currentServiceObjective = default(string), string requestedServiceObjective = default(string), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string)) - : base(location, name, id, type, tags) + public ElasticPoolDatabaseActivity(string id = default(string), string name = default(string), string type = default(string), string location = default(string), string databaseName = default(string), System.DateTime? endTime = default(System.DateTime?), int? errorCode = default(int?), string errorMessage = default(string), int? errorSeverity = default(int?), string operation = default(string), System.Guid? operationId = default(System.Guid?), int? percentComplete = default(int?), string requestedElasticPoolName = default(string), string currentElasticPoolName = default(string), string currentServiceObjective = default(string), string requestedServiceObjective = default(string), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string)) + : base(id, name, type) { + Location = location; DatabaseName = databaseName; EndTime = endTime; ErrorCode = errorCode; @@ -81,110 +83,111 @@ public ElasticPoolDatabaseActivity() { } ServerName = serverName; StartTime = startTime; State = state; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + /// /// Gets the database name. /// [JsonProperty(PropertyName = "properties.databaseName")] - public string DatabaseName { get; protected set; } + public string DatabaseName { get; private set; } /// /// Gets the time the operation finished (ISO8601 format). /// [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; protected set; } + public System.DateTime? EndTime { get; private set; } /// /// Gets the error code if available. /// [JsonProperty(PropertyName = "properties.errorCode")] - public int? ErrorCode { get; protected set; } + public int? ErrorCode { get; private set; } /// /// Gets the error message if available. /// [JsonProperty(PropertyName = "properties.errorMessage")] - public string ErrorMessage { get; protected set; } + public string ErrorMessage { get; private set; } /// /// Gets the error severity if available. /// [JsonProperty(PropertyName = "properties.errorSeverity")] - public int? ErrorSeverity { get; protected set; } + public int? ErrorSeverity { get; private set; } /// /// Gets the operation name. /// [JsonProperty(PropertyName = "properties.operation")] - public string Operation { get; protected set; } + public string Operation { get; private set; } /// /// Gets the unique operation ID. /// [JsonProperty(PropertyName = "properties.operationId")] - public string OperationId { get; protected set; } + public System.Guid? OperationId { get; private set; } /// /// Gets the percentage complete if available. /// [JsonProperty(PropertyName = "properties.percentComplete")] - public int? PercentComplete { get; protected set; } + public int? PercentComplete { get; private set; } /// /// Gets the name for the elastic pool the database is moving into if /// available. /// [JsonProperty(PropertyName = "properties.requestedElasticPoolName")] - public string RequestedElasticPoolName { get; protected set; } + public string RequestedElasticPoolName { get; private set; } /// /// Gets the name of the current elastic pool the database is in if /// available. /// [JsonProperty(PropertyName = "properties.currentElasticPoolName")] - public string CurrentElasticPoolName { get; protected set; } + public string CurrentElasticPoolName { get; private set; } /// /// Gets the name of the current service objective if available. /// [JsonProperty(PropertyName = "properties.currentServiceObjective")] - public string CurrentServiceObjective { get; protected set; } + public string CurrentServiceObjective { get; private set; } /// /// Gets the name of the requested service objective if available. /// [JsonProperty(PropertyName = "properties.requestedServiceObjective")] - public string RequestedServiceObjective { get; protected set; } + public string RequestedServiceObjective { get; private set; } /// /// Gets the name of the server the elastic pool is in. /// [JsonProperty(PropertyName = "properties.serverName")] - public string ServerName { get; protected set; } + public string ServerName { get; private set; } /// /// Gets the time the operation started (ISO8601 format). /// [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; protected set; } + public System.DateTime? StartTime { get; private set; } /// /// Gets the current state of the operation. /// [JsonProperty(PropertyName = "properties.state")] - public string State { get; protected set; } + public string State { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEditions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEdition.cs similarity index 65% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEditions.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEdition.cs index a9b2bb8cb68c..8e615016afee 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEditions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolEdition.cs @@ -2,24 +2,23 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// - /// Defines values for ElasticPoolEditions. + /// Defines values for ElasticPoolEdition. /// - public static class ElasticPoolEditions + public static class ElasticPoolEdition { public const string Basic = "Basic"; public const string Standard = "Standard"; public const string Premium = "Premium"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolState.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolState.cs index b7c4a66f4e72..8d7129a1ea00 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolState.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ElasticPoolState.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for ElasticPoolState. @@ -22,4 +22,3 @@ public static class ElasticPoolState public const string Disabled = "Disabled"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequestParameters.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequest.cs similarity index 78% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequestParameters.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequest.cs index 53db0bb7ec6d..2bab235231e4 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequestParameters.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ExportRequest.cs @@ -2,31 +2,34 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; /// /// Export database parameters. /// - public partial class ExportRequestParameters + public partial class ExportRequest { /// - /// Initializes a new instance of the ExportRequestParameters class. + /// Initializes a new instance of the ExportRequest class. /// - public ExportRequestParameters() { } + public ExportRequest() + { + CustomInit(); + } /// - /// Initializes a new instance of the ExportRequestParameters class. + /// Initializes a new instance of the ExportRequest class. /// /// The type of the storage key to use. /// Valid values are StorageAccessKey and SharedAccessKey. Possible @@ -37,10 +40,9 @@ public ExportRequestParameters() { } /// administrator. /// The password of the SQL /// administrator. - /// The authentication type - if not - /// specified, will default to SQL. Possible values include: 'SQL', - /// 'ADPassword' - public ExportRequestParameters(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, AuthenticationType? authenticationType = default(AuthenticationType?)) + /// The authentication type. Possible + /// values include: 'SQL', 'ADPassword' + public ExportRequest(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, AuthenticationType? authenticationType = default(AuthenticationType?)) { StorageKeyType = storageKeyType; StorageKey = storageKey; @@ -48,8 +50,14 @@ public ExportRequestParameters() { } AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; AuthenticationType = authenticationType; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the type of the storage key to use. Valid values are /// StorageAccessKey and SharedAccessKey. Possible values include: @@ -83,8 +91,8 @@ public ExportRequestParameters() { } public string AdministratorLoginPassword { get; set; } /// - /// Gets or sets the authentication type - if not specified, will - /// default to SQL. Possible values include: 'SQL', 'ADPassword' + /// Gets or sets the authentication type. Possible values include: + /// 'SQL', 'ADPassword' /// [JsonProperty(PropertyName = "authenticationType")] public AuthenticationType? AuthenticationType { get; set; } @@ -116,4 +124,3 @@ public virtual void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerFirewallRule.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/FirewallRule.cs similarity index 75% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerFirewallRule.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/FirewallRule.cs index 0d1dafa9a75d..bddc92b6ce5a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerFirewallRule.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/FirewallRule.cs @@ -2,33 +2,36 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Represents a server firewall rule. /// - [JsonTransformation] - public partial class ServerFirewallRule : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class FirewallRule : SubResource { /// - /// Initializes a new instance of the ServerFirewallRule class. + /// Initializes a new instance of the FirewallRule class. /// - public ServerFirewallRule() { } + public FirewallRule() + { + CustomInit(); + } /// - /// Initializes a new instance of the ServerFirewallRule class. + /// Initializes a new instance of the FirewallRule class. /// /// The start IP address of the firewall /// rule. Must be IPv4 format. Use value '0.0.0.0' to represent all @@ -44,7 +47,7 @@ public ServerFirewallRule() { } /// Location of the server that contains this /// firewall rule. /// Type of resource this is. - public ServerFirewallRule(string startIpAddress, string endIpAddress, string name = default(string), string id = default(string), string kind = default(string), string location = default(string), string type = default(string)) + public FirewallRule(string startIpAddress, string endIpAddress, string name = default(string), string id = default(string), string kind = default(string), string location = default(string), string type = default(string)) : base(name, id) { Kind = kind; @@ -52,25 +55,31 @@ public ServerFirewallRule() { } Type = type; StartIpAddress = startIpAddress; EndIpAddress = endIpAddress; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets kind of server that contains this firewall rule. /// [JsonProperty(PropertyName = "kind")] - public string Kind { get; protected set; } + public string Kind { get; private set; } /// /// Gets location of the server that contains this firewall rule. /// [JsonProperty(PropertyName = "location")] - public string Location { get; protected set; } + public string Location { get; private set; } /// /// Gets type of resource this is. /// [JsonProperty(PropertyName = "type")] - public string Type { get; protected set; } + public string Type { get; private set; } /// /// Gets or sets the start IP address of the firewall rule. Must be @@ -107,4 +116,3 @@ public virtual void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponsePropertiesModel.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponsePropertiesModel.cs deleted file mode 100644 index 8d9cef4e18a9..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponsePropertiesModel.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Response for Import/Export Status operation. - /// - public partial class ImportExportOperationResponsePropertiesModel - { - /// - /// Initializes a new instance of the - /// ImportExportOperationResponsePropertiesModel class. - /// - public ImportExportOperationResponsePropertiesModel() { } - - /// - /// Initializes a new instance of the - /// ImportExportOperationResponsePropertiesModel class. - /// - /// The request type of the - /// operation. - /// The request type of the operation. - /// The name of the server. - /// The name of the database. - /// The status message returned from the - /// server. - /// The operation status last modified - /// time. - /// The operation queued time. - /// The blob uri. - /// The error message returned from the - /// server. - public ImportExportOperationResponsePropertiesModel(string requestType = default(string), System.Guid? requestId = default(System.Guid?), string serverName = default(string), string databaseName = default(string), string status = default(string), string lastModifiedTime = default(string), string queuedTime = default(string), string blobUri = default(string), string errorMessage = default(string)) - { - RequestType = requestType; - RequestId = requestId; - ServerName = serverName; - DatabaseName = databaseName; - Status = status; - LastModifiedTime = lastModifiedTime; - QueuedTime = queuedTime; - BlobUri = blobUri; - ErrorMessage = errorMessage; - } - - /// - /// Gets the request type of the operation. - /// - [JsonProperty(PropertyName = "requestType")] - public string RequestType { get; protected set; } - - /// - /// Gets the request type of the operation. - /// - [JsonProperty(PropertyName = "requestId")] - public System.Guid? RequestId { get; protected set; } - - /// - /// Gets the name of the server. - /// - [JsonProperty(PropertyName = "serverName")] - public string ServerName { get; protected set; } - - /// - /// Gets the name of the database. - /// - [JsonProperty(PropertyName = "databaseName")] - public string DatabaseName { get; protected set; } - - /// - /// Gets the status message returned from the server. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; protected set; } - - /// - /// Gets the operation status last modified time. - /// - [JsonProperty(PropertyName = "lastModifiedTime")] - public string LastModifiedTime { get; protected set; } - - /// - /// Gets the operation queued time. - /// - [JsonProperty(PropertyName = "queuedTime")] - public string QueuedTime { get; protected set; } - - /// - /// Gets the blob uri. - /// - [JsonProperty(PropertyName = "blobUri")] - public string BlobUri { get; protected set; } - - /// - /// Gets the error message returned from the server. - /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; protected set; } - - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponse.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportResponse.cs similarity index 57% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponse.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportResponse.cs index 68d3b5554d72..4bcdc8edd0f2 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportOperationResponse.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExportResponse.cs @@ -2,39 +2,40 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Response for Import/Export Get operation. /// - [JsonTransformation] - public partial class ImportExportOperationResponse + [Rest.Serialization.JsonTransformation] + public partial class ImportExportResponse : ProxyResource { /// - /// Initializes a new instance of the ImportExportOperationResponse - /// class. + /// Initializes a new instance of the ImportExportResponse class. /// - public ImportExportOperationResponse() { } + public ImportExportResponse() + { + CustomInit(); + } /// - /// Initializes a new instance of the ImportExportOperationResponse - /// class. + /// Initializes a new instance of the ImportExportResponse class. /// - /// The id returned from the server. - /// The name returned from the server. - /// The type returned from the server. + /// Resource ID. + /// Resource name. + /// Resource type. /// The request type of the /// operation. /// The request type of the operation. @@ -48,11 +49,9 @@ public ImportExportOperationResponse() { } /// The blob uri. /// The error message returned from the /// server. - public ImportExportOperationResponse(string id = default(string), string name = default(string), string type = default(string), string requestType = default(string), System.Guid? requestId = default(System.Guid?), string serverName = default(string), string databaseName = default(string), string status = default(string), string lastModifiedTime = default(string), string queuedTime = default(string), string blobUri = default(string), string errorMessage = default(string)) + public ImportExportResponse(string id = default(string), string name = default(string), string type = default(string), string requestType = default(string), System.Guid? requestId = default(System.Guid?), string serverName = default(string), string databaseName = default(string), string status = default(string), string lastModifiedTime = default(string), string queuedTime = default(string), string blobUri = default(string), string errorMessage = default(string)) + : base(id, name, type) { - Id = id; - Name = name; - Type = type; RequestType = requestType; RequestId = requestId; ServerName = serverName; @@ -62,80 +61,67 @@ public ImportExportOperationResponse() { } QueuedTime = queuedTime; BlobUri = blobUri; ErrorMessage = errorMessage; + CustomInit(); } /// - /// Gets the id returned from the server. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; protected set; } - - /// - /// Gets the name returned from the server. + /// An initialization method that performs custom operations like setting defaults /// - [JsonProperty(PropertyName = "name")] - public string Name { get; protected set; } - - /// - /// Gets the type returned from the server. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; protected set; } + partial void CustomInit(); /// /// Gets the request type of the operation. /// [JsonProperty(PropertyName = "properties.requestType")] - public string RequestType { get; protected set; } + public string RequestType { get; private set; } /// /// Gets the request type of the operation. /// [JsonProperty(PropertyName = "properties.requestId")] - public System.Guid? RequestId { get; protected set; } + public System.Guid? RequestId { get; private set; } /// /// Gets the name of the server. /// [JsonProperty(PropertyName = "properties.serverName")] - public string ServerName { get; protected set; } + public string ServerName { get; private set; } /// /// Gets the name of the database. /// [JsonProperty(PropertyName = "properties.databaseName")] - public string DatabaseName { get; protected set; } + public string DatabaseName { get; private set; } /// /// Gets the status message returned from the server. /// [JsonProperty(PropertyName = "properties.status")] - public string Status { get; protected set; } + public string Status { get; private set; } /// /// Gets the operation status last modified time. /// [JsonProperty(PropertyName = "properties.lastModifiedTime")] - public string LastModifiedTime { get; protected set; } + public string LastModifiedTime { get; private set; } /// /// Gets the operation queued time. /// [JsonProperty(PropertyName = "properties.queuedTime")] - public string QueuedTime { get; protected set; } + public string QueuedTime { get; private set; } /// /// Gets the blob uri. /// [JsonProperty(PropertyName = "properties.blobUri")] - public string BlobUri { get; protected set; } + public string BlobUri { get; private set; } /// /// Gets the error message returned from the server. /// [JsonProperty(PropertyName = "properties.errorMessage")] - public string ErrorMessage { get; protected set; } + public string ErrorMessage { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequestParameters.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequest.cs similarity index 78% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequestParameters.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequest.cs index d3fea5fad863..7eeebd1cdad6 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequestParameters.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportExtensionRequest.cs @@ -2,35 +2,36 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Import database parameters. /// - [JsonTransformation] - public partial class ImportExtensionRequestParameters + [Rest.Serialization.JsonTransformation] + public partial class ImportExtensionRequest { /// - /// Initializes a new instance of the ImportExtensionRequestParameters - /// class. + /// Initializes a new instance of the ImportExtensionRequest class. /// - public ImportExtensionRequestParameters() { } + public ImportExtensionRequest() + { + CustomInit(); + } /// - /// Initializes a new instance of the ImportExtensionRequestParameters - /// class. + /// Initializes a new instance of the ImportExtensionRequest class. /// /// The type of the storage key to use. /// Valid values are StorageAccessKey and SharedAccessKey. Possible @@ -43,10 +44,9 @@ public ImportExtensionRequestParameters() { } /// administrator. /// The name of the extension. /// The type of the extension. - /// The authentication type - if not - /// specified, will default to SQL. Possible values include: 'SQL', - /// 'ADPassword' - public ImportExtensionRequestParameters(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string name = default(string), string type = default(string), AuthenticationType? authenticationType = default(AuthenticationType?)) + /// The authentication type. Possible + /// values include: 'SQL', 'ADPassword' + public ImportExtensionRequest(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string name = default(string), string type = default(string), AuthenticationType? authenticationType = default(AuthenticationType?)) { Name = name; Type = type; @@ -56,15 +56,21 @@ public ImportExtensionRequestParameters() { } AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; AuthenticationType = authenticationType; + CustomInit(); } /// - /// Static constructor for ImportExtensionRequestParameters class. + /// Static constructor for ImportExtensionRequest class. /// - static ImportExtensionRequestParameters() + static ImportExtensionRequest() { OperationMode = "Import"; } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the extension. /// @@ -110,15 +116,15 @@ static ImportExtensionRequestParameters() public string AdministratorLoginPassword { get; set; } /// - /// Gets or sets the authentication type - if not specified, will - /// default to SQL. Possible values include: 'SQL', 'ADPassword' + /// Gets or sets the authentication type. Possible values include: + /// 'SQL', 'ADPassword' /// [JsonProperty(PropertyName = "properties.authenticationType")] public AuthenticationType? AuthenticationType { get; set; } /// - /// The type of Import/Export operation being performed. This is - /// always Import. + /// The type of import operation being performed. This is always + /// Import. /// [JsonProperty(PropertyName = "properties.operationMode")] public static string OperationMode { get; private set; } @@ -150,4 +156,3 @@ public virtual void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequestParameters.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequest.cs similarity index 66% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequestParameters.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequest.cs index 49bea5820b3d..6df04fcd3655 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequestParameters.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ImportRequest.cs @@ -2,31 +2,34 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; /// /// Import database parameters. /// - public partial class ImportRequestParameters : ExportRequestParameters + public partial class ImportRequest : ExportRequest { /// - /// Initializes a new instance of the ImportRequestParameters class. + /// Initializes a new instance of the ImportRequest class. /// - public ImportRequestParameters() { } + public ImportRequest() + { + CustomInit(); + } /// - /// Initializes a new instance of the ImportRequestParameters class. + /// Initializes a new instance of the ImportRequest class. /// /// The type of the storage key to use. /// Valid values are StorageAccessKey and SharedAccessKey. Possible @@ -39,24 +42,33 @@ public ImportRequestParameters() { } /// administrator. /// The name of the database to /// import. - /// The edition for the database being - /// created. + /// The edition for the database being created. + /// Possible values include: 'Web', 'Business', 'Basic', 'Standard', + /// 'Premium', 'Free', 'Stretch', 'DataWarehouse', 'System', + /// 'System2' /// The name of the service - /// objective to assign to the database. + /// objective to assign to the database. Possible values include: + /// 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', + /// 'P11', 'P15', 'System', 'System2', 'ElasticPool' /// The maximum size for the newly imported /// database. - /// The authentication type - if not - /// specified, will default to SQL. Possible values include: 'SQL', - /// 'ADPassword' - public ImportRequestParameters(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string databaseName, string edition, string serviceObjectiveName, string maxSizeBytes, AuthenticationType? authenticationType = default(AuthenticationType?)) + /// The authentication type. Possible + /// values include: 'SQL', 'ADPassword' + public ImportRequest(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string databaseName, string edition, string serviceObjectiveName, string maxSizeBytes, AuthenticationType? authenticationType = default(AuthenticationType?)) : base(storageKeyType, storageKey, storageUri, administratorLogin, administratorLoginPassword, authenticationType) { DatabaseName = databaseName; Edition = edition; ServiceObjectiveName = serviceObjectiveName; MaxSizeBytes = maxSizeBytes; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the database to import. /// @@ -64,14 +76,18 @@ public ImportRequestParameters() { } public string DatabaseName { get; set; } /// - /// Gets or sets the edition for the database being created. + /// Gets or sets the edition for the database being created. Possible + /// values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', + /// 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' /// [JsonProperty(PropertyName = "edition")] public string Edition { get; set; } /// /// Gets or sets the name of the service objective to assign to the - /// database. + /// database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', + /// 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', + /// 'ElasticPool' /// [JsonProperty(PropertyName = "serviceObjectiveName")] public string ServiceObjectiveName { get; set; } @@ -110,4 +126,3 @@ public override void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/LocationCapabilities.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/LocationCapabilities.cs new file mode 100644 index 000000000000..6e44298edbca --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/LocationCapabilities.cs @@ -0,0 +1,74 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The capabilities for a location. + /// + public partial class LocationCapabilities + { + /// + /// Initializes a new instance of the LocationCapabilities class. + /// + public LocationCapabilities() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LocationCapabilities class. + /// + /// The location name. + /// Azure SQL Database's status for the location. + /// Possible values include: 'Visible', 'Available', 'Default', + /// 'Disabled' + /// The list of supported server + /// versions. + public LocationCapabilities(string name = default(string), CapabilityStatus? status = default(CapabilityStatus?), IList supportedServerVersions = default(IList)) + { + Name = name; + Status = status; + SupportedServerVersions = supportedServerVersions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the location name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets azure SQL Database's status for the location. Possible values + /// include: 'Visible', 'Available', 'Default', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public CapabilityStatus? Status { get; private set; } + + /// + /// Gets the list of supported server versions. + /// + [JsonProperty(PropertyName = "supportedServerVersions")] + public IList SupportedServerVersions { get; private set; } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeCapability.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeCapability.cs new file mode 100644 index 000000000000..da1999e31263 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeCapability.cs @@ -0,0 +1,75 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The maximum size limits for a database. + /// + public partial class MaxSizeCapability + { + /// + /// Initializes a new instance of the MaxSizeCapability class. + /// + public MaxSizeCapability() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaxSizeCapability class. + /// + /// The maximum size of the database (see 'unit' + /// for the units). + /// The units that the limit is expressed in. + /// Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + /// 'Petabytes' + /// The status of the maximum size capability. + /// Possible values include: 'Visible', 'Available', 'Default', + /// 'Disabled' + public MaxSizeCapability(long? limit = default(long?), MaxSizeUnits? unit = default(MaxSizeUnits?), CapabilityStatus? status = default(CapabilityStatus?)) + { + Limit = limit; + Unit = unit; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the maximum size of the database (see 'unit' for the units). + /// + [JsonProperty(PropertyName = "limit")] + public long? Limit { get; private set; } + + /// + /// Gets the units that the limit is expressed in. Possible values + /// include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + /// + [JsonProperty(PropertyName = "unit")] + public MaxSizeUnits? Unit { get; private set; } + + /// + /// Gets the status of the maximum size capability. Possible values + /// include: 'Visible', 'Available', 'Default', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public CapabilityStatus? Status { get; private set; } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeUnits.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeUnits.cs new file mode 100644 index 000000000000..ea4306a303b8 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/MaxSizeUnits.cs @@ -0,0 +1,34 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for MaxSizeUnits. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum MaxSizeUnits + { + [EnumMember(Value = "Megabytes")] + Megabytes, + [EnumMember(Value = "Gigabytes")] + Gigabytes, + [EnumMember(Value = "Terabytes")] + Terabytes, + [EnumMember(Value = "Petabytes")] + Petabytes + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Operation.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Operation.cs index 8eedbe7180e3..fc6216ab7fd6 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Operation.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Operation.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class Operation /// /// Initializes a new instance of the Operation class. /// - public Operation() { } + public Operation() + { + CustomInit(); + } /// /// Initializes a new instance of the Operation class. @@ -35,8 +38,14 @@ public Operation() { } { Name = name; Display = display; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets operation name: {provider}/{resource}/{operation} /// @@ -51,4 +60,3 @@ public Operation() { } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationDisplay.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationDisplay.cs index c99d3ec23c7b..4bb1babe51d8 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationDisplay.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationDisplay.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class OperationDisplay /// /// Initializes a new instance of the OperationDisplay class. /// - public OperationDisplay() { } + public OperationDisplay() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationDisplay class. @@ -38,8 +41,14 @@ public OperationDisplay() { } Provider = provider; Resource = resource; Operation = operation; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets service provider: Microsoft SQL Database. /// @@ -61,4 +70,3 @@ public OperationDisplay() { } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationImpact.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationImpact.cs index 2b0560d98607..b4357304e49f 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationImpact.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationImpact.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class OperationImpact /// /// Initializes a new instance of the OperationImpact class. /// - public OperationImpact() { } + public OperationImpact() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationImpact class. @@ -40,32 +43,37 @@ public OperationImpact() { } Unit = unit; ChangeValueAbsolute = changeValueAbsolute; ChangeValueRelative = changeValueRelative; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the name of the impact dimension. /// [JsonProperty(PropertyName = "name")] - public string Name { get; protected set; } + public string Name { get; private set; } /// /// Gets the unit in which estimated impact to dimension is measured. /// [JsonProperty(PropertyName = "unit")] - public string Unit { get; protected set; } + public string Unit { get; private set; } /// /// Gets the absolute impact to dimension. /// [JsonProperty(PropertyName = "changeValueAbsolute")] - public double? ChangeValueAbsolute { get; protected set; } + public double? ChangeValueAbsolute { get; private set; } /// /// Gets the relative impact to dimension (null if not applicable) /// [JsonProperty(PropertyName = "changeValueRelative")] - public double? ChangeValueRelative { get; protected set; } + public double? ChangeValueRelative { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationListResult.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationListResult.cs index 52311fe57078..bfa59c2e3868 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationListResult.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/OperationListResult.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -25,7 +25,10 @@ public partial class OperationListResult /// /// Initializes a new instance of the OperationListResult class. /// - public OperationListResult() { } + public OperationListResult() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationListResult class. @@ -38,8 +41,14 @@ public OperationListResult() { } { Value = value; NextLink = nextLink; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets list of SQL operations supported by the SQL resource /// provider. @@ -56,4 +65,3 @@ public OperationListResult() { } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Page.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Page.cs index 6874c44162dd..229b1dcf1f69 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Page.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Page.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -52,4 +52,3 @@ IEnumerator IEnumerable.GetEnumerator() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TableType.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/PerformanceLevelUnit.cs similarity index 56% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TableType.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/PerformanceLevelUnit.cs index c6805a2c3320..746fd8598bc1 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TableType.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/PerformanceLevelUnit.cs @@ -2,30 +2,27 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for TableType. + /// Defines values for PerformanceLevelUnit. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum TableType + [JsonConverter(typeof(StringEnumConverter))] + public enum PerformanceLevelUnit { - [EnumMember(Value = "BaseTable")] - BaseTable, - [EnumMember(Value = "View")] - View + [EnumMember(Value = "DTU")] + DTU } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ProxyResource.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ProxyResource.cs new file mode 100644 index 000000000000..868cd172e1d2 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ProxyResource.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using System.Linq; + + /// + /// ARM proxy resource. + /// + public partial class ProxyResource : Resource + { + /// + /// Initializes a new instance of the ProxyResource class. + /// + public ProxyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProxyResource class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + public ProxyResource(string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReadScale.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReadScale.cs index 1adb6c3dc4c4..066c8fef753f 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReadScale.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReadScale.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for ReadScale. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum ReadScale { [EnumMember(Value = "Enabled")] @@ -28,4 +28,3 @@ public enum ReadScale Disabled } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPool.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPool.cs index 2b08d7481216..d0368a3cad01 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPool.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPool.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,24 +21,25 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a recommented elastic pool. /// - [JsonTransformation] - public partial class RecommendedElasticPool : Resource + [Rest.Serialization.JsonTransformation] + public partial class RecommendedElasticPool : ProxyResource { /// /// Initializes a new instance of the RecommendedElasticPool class. /// - public RecommendedElasticPool() { } + public RecommendedElasticPool() + { + CustomInit(); + } /// /// Initializes a new instance of the RecommendedElasticPool class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource ID. + /// Resource name. + /// Resource type. /// The edition of the recommended - /// elastic pool. The ElasticPoolEditions enumeration contains all the + /// elastic pool. The ElasticPoolEdition enumeration contains all the /// valid editions. Possible values include: 'Basic', 'Standard', /// 'Premium' /// The DTU for the recommended elastic pool. @@ -54,12 +55,12 @@ public RecommendedElasticPool() { } /// Gets maximum observed DTU. /// Gets maximum observed storage in /// megabytes. - /// The list of databases in this pool. + /// The list of databases in this pool. /// Expanded property /// The list of databases housed in the server. /// Expanded property - public RecommendedElasticPool(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), string databaseEdition = default(string), double? dtu = default(double?), double? databaseDtuMin = default(double?), double? databaseDtuMax = default(double?), double? storageMB = default(double?), System.DateTime? observationPeriodStart = default(System.DateTime?), System.DateTime? observationPeriodEnd = default(System.DateTime?), double? maxObservedDtu = default(double?), double? maxObservedStorageMB = default(double?), IList databasesProperty = default(IList), IList metrics = default(IList)) - : base(location, name, id, type, tags) + public RecommendedElasticPool(string id = default(string), string name = default(string), string type = default(string), string databaseEdition = default(string), double? dtu = default(double?), double? databaseDtuMin = default(double?), double? databaseDtuMax = default(double?), double? storageMB = default(double?), System.DateTime? observationPeriodStart = default(System.DateTime?), System.DateTime? observationPeriodEnd = default(System.DateTime?), double? maxObservedDtu = default(double?), double? maxObservedStorageMB = default(double?), IList databases = default(IList), IList metrics = default(IList)) + : base(id, name, type) { DatabaseEdition = databaseEdition; Dtu = dtu; @@ -70,17 +71,23 @@ public RecommendedElasticPool() { } ObservationPeriodEnd = observationPeriodEnd; MaxObservedDtu = maxObservedDtu; MaxObservedStorageMB = maxObservedStorageMB; - DatabasesProperty = databasesProperty; + Databases = databases; Metrics = metrics; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the edition of the recommended elastic pool. The - /// ElasticPoolEditions enumeration contains all the valid editions. + /// ElasticPoolEdition enumeration contains all the valid editions. /// Possible values include: 'Basic', 'Standard', 'Premium' /// [JsonProperty(PropertyName = "properties.databaseEdition")] - public string DatabaseEdition { get; protected set; } + public string DatabaseEdition { get; private set; } /// /// Gets or sets the DTU for the recommended elastic pool. @@ -110,58 +117,37 @@ public RecommendedElasticPool() { } /// Gets the observation period start (ISO8601 format). /// [JsonProperty(PropertyName = "properties.observationPeriodStart")] - public System.DateTime? ObservationPeriodStart { get; protected set; } + public System.DateTime? ObservationPeriodStart { get; private set; } /// /// Gets the observation period start (ISO8601 format). /// [JsonProperty(PropertyName = "properties.observationPeriodEnd")] - public System.DateTime? ObservationPeriodEnd { get; protected set; } + public System.DateTime? ObservationPeriodEnd { get; private set; } /// /// Gets maximum observed DTU. /// [JsonProperty(PropertyName = "properties.maxObservedDtu")] - public double? MaxObservedDtu { get; protected set; } + public double? MaxObservedDtu { get; private set; } /// /// Gets maximum observed storage in megabytes. /// [JsonProperty(PropertyName = "properties.maxObservedStorageMB")] - public double? MaxObservedStorageMB { get; protected set; } + public double? MaxObservedStorageMB { get; private set; } /// /// Gets the list of databases in this pool. Expanded property /// [JsonProperty(PropertyName = "properties.databases")] - public IList DatabasesProperty { get; protected set; } + public IList Databases { get; private set; } /// /// Gets the list of databases housed in the server. Expanded property /// [JsonProperty(PropertyName = "properties.metrics")] - public IList Metrics { get; protected set; } + public IList Metrics { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (DatabasesProperty != null) - { - foreach (var element in DatabasesProperty) - { - if (element != null) - { - element.Validate(); - } - } - } - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPoolMetric.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPoolMetric.cs index 9160cebc65bf..4cabdbcd469a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPoolMetric.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedElasticPoolMetric.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -23,7 +23,10 @@ public partial class RecommendedElasticPoolMetric /// Initializes a new instance of the RecommendedElasticPoolMetric /// class. /// - public RecommendedElasticPoolMetric() { } + public RecommendedElasticPoolMetric() + { + CustomInit(); + } /// /// Initializes a new instance of the RecommendedElasticPoolMetric @@ -39,8 +42,14 @@ public RecommendedElasticPoolMetric() { } DateTime = dateTime; Dtu = dtu; SizeGB = sizeGB; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the time of metric (ISO8601 format). /// @@ -62,4 +71,3 @@ public RecommendedElasticPoolMetric() { } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndex.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndex.cs index ecc8d77ce70c..e13505b5523d 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndex.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndex.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,22 +21,23 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a database recommended index. /// - [JsonTransformation] - public partial class RecommendedIndex : Resource + [Rest.Serialization.JsonTransformation] + public partial class RecommendedIndex : ProxyResource { /// /// Initializes a new instance of the RecommendedIndex class. /// - public RecommendedIndex() { } + public RecommendedIndex() + { + CustomInit(); + } /// /// Initializes a new instance of the RecommendedIndex class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource ID. + /// Resource name. + /// Resource type. /// The proposed index action. You can create a /// missing index, drop an unused index, or rebuild an existing index /// to improve its performance. Possible values include: 'Create', @@ -64,8 +65,8 @@ public RecommendedIndex() { } /// recommended index action. /// The values reported after index action /// is complete. - public RecommendedIndex(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), RecommendedIndexActions? action = default(RecommendedIndexActions?), RecommendedIndexStates? state = default(RecommendedIndexStates?), System.DateTime? created = default(System.DateTime?), System.DateTime? lastModified = default(System.DateTime?), RecommendedIndexTypes? indexType = default(RecommendedIndexTypes?), string schema = default(string), string table = default(string), IList columns = default(IList), IList includedColumns = default(IList), string indexScript = default(string), IList estimatedImpact = default(IList), IList reportedImpact = default(IList)) - : base(location, name, id, type, tags) + public RecommendedIndex(string id = default(string), string name = default(string), string type = default(string), RecommendedIndexAction? action = default(RecommendedIndexAction?), RecommendedIndexState? state = default(RecommendedIndexState?), System.DateTime? created = default(System.DateTime?), System.DateTime? lastModified = default(System.DateTime?), RecommendedIndexType? indexType = default(RecommendedIndexType?), string schema = default(string), string table = default(string), IList columns = default(IList), IList includedColumns = default(IList), string indexScript = default(string), IList estimatedImpact = default(IList), IList reportedImpact = default(IList)) + : base(id, name, type) { Action = action; State = state; @@ -79,15 +80,21 @@ public RecommendedIndex() { } IndexScript = indexScript; EstimatedImpact = estimatedImpact; ReportedImpact = reportedImpact; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the proposed index action. You can create a missing index, /// drop an unused index, or rebuild an existing index to improve its /// performance. Possible values include: 'Create', 'Drop', 'Rebuild' /// [JsonProperty(PropertyName = "properties.action")] - public RecommendedIndexActions? Action { get; protected set; } + public RecommendedIndexAction? Action { get; private set; } /// /// Gets the current recommendation state. Possible values include: @@ -95,21 +102,21 @@ public RecommendedIndex() { } /// 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' /// [JsonProperty(PropertyName = "properties.state")] - public RecommendedIndexStates? State { get; protected set; } + public RecommendedIndexState? State { get; private set; } /// /// Gets the UTC datetime showing when this resource was created /// (ISO8601 format). /// [JsonProperty(PropertyName = "properties.created")] - public System.DateTime? Created { get; protected set; } + public System.DateTime? Created { get; private set; } /// /// Gets the UTC datetime of when was this resource last changed /// (ISO8601 format). /// [JsonProperty(PropertyName = "properties.lastModified")] - public System.DateTime? LastModified { get; protected set; } + public System.DateTime? LastModified { get; private set; } /// /// Gets the type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, @@ -117,60 +124,49 @@ public RecommendedIndex() { } /// 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' /// [JsonProperty(PropertyName = "properties.indexType")] - public RecommendedIndexTypes? IndexType { get; protected set; } + public RecommendedIndexType? IndexType { get; private set; } /// /// Gets the schema where table to build index over resides /// [JsonProperty(PropertyName = "properties.schema")] - public string Schema { get; protected set; } + public string Schema { get; private set; } /// /// Gets the table on which to build index. /// [JsonProperty(PropertyName = "properties.table")] - public string Table { get; protected set; } + public string Table { get; private set; } /// /// Gets columns over which to build index /// [JsonProperty(PropertyName = "properties.columns")] - public IList Columns { get; protected set; } + public IList Columns { get; private set; } /// /// Gets the list of column names to be included in the index /// [JsonProperty(PropertyName = "properties.includedColumns")] - public IList IncludedColumns { get; protected set; } + public IList IncludedColumns { get; private set; } /// /// Gets the full build index script /// [JsonProperty(PropertyName = "properties.indexScript")] - public string IndexScript { get; protected set; } + public string IndexScript { get; private set; } /// /// Gets the estimated impact of doing recommended index action. /// [JsonProperty(PropertyName = "properties.estimatedImpact")] - public IList EstimatedImpact { get; protected set; } + public IList EstimatedImpact { get; private set; } /// /// Gets the values reported after index action is complete. /// [JsonProperty(PropertyName = "properties.reportedImpact")] - public IList ReportedImpact { get; protected set; } + public IList ReportedImpact { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexActions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexAction.cs similarity index 67% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexActions.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexAction.cs index a548b1a7038b..a545bef75aae 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexActions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexAction.cs @@ -2,25 +2,25 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for RecommendedIndexActions. + /// Defines values for RecommendedIndexAction. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum RecommendedIndexActions + [JsonConverter(typeof(StringEnumConverter))] + public enum RecommendedIndexAction { [EnumMember(Value = "Create")] Create, @@ -30,4 +30,3 @@ public enum RecommendedIndexActions Rebuild } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexStates.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexState.cs similarity index 78% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexStates.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexState.cs index 238086f39ccd..3da82fd39980 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexStates.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexState.cs @@ -2,25 +2,25 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for RecommendedIndexStates. + /// Defines values for RecommendedIndexState. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum RecommendedIndexStates + [JsonConverter(typeof(StringEnumConverter))] + public enum RecommendedIndexState { [EnumMember(Value = "Active")] Active, @@ -46,4 +46,3 @@ public enum RecommendedIndexStates Success } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexTypes.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexType.cs similarity index 71% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexTypes.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexType.cs index 737d4e5a1d90..6d1503e2aae8 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexTypes.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RecommendedIndexType.cs @@ -2,25 +2,25 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for RecommendedIndexTypes. + /// Defines values for RecommendedIndexType. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum RecommendedIndexTypes + [JsonConverter(typeof(StringEnumConverter))] + public enum RecommendedIndexType { [EnumMember(Value = "CLUSTERED")] CLUSTERED, @@ -32,4 +32,3 @@ public enum RecommendedIndexTypes CLUSTEREDCOLUMNSTORE } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationLink.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationLink.cs index 29c9f64b193a..56a7f3420615 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationLink.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationLink.cs @@ -2,30 +2,33 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Represents a database replication link. /// - [JsonTransformation] - public partial class ReplicationLink : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class ReplicationLink : SubResource { /// /// Initializes a new instance of the ReplicationLink class. /// - public ReplicationLink() { } + public ReplicationLink() + { + CustomInit(); + } /// /// Initializes a new instance of the ReplicationLink class. @@ -73,50 +76,56 @@ public ReplicationLink() { } StartTime = startTime; PercentComplete = percentComplete; ReplicationState = replicationState; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets location of the server that contains this firewall rule. /// [JsonProperty(PropertyName = "location")] - public string Location { get; protected set; } + public string Location { get; private set; } /// /// Gets type of resource this is. /// [JsonProperty(PropertyName = "type")] - public string Type { get; protected set; } + public string Type { get; private set; } /// /// Gets legacy value indicating whether termination is allowed. /// Currently always returns true. /// [JsonProperty(PropertyName = "properties.isTerminationAllowed")] - public bool? IsTerminationAllowed { get; protected set; } + public bool? IsTerminationAllowed { get; private set; } /// /// Gets replication mode of this replication link. /// [JsonProperty(PropertyName = "properties.replicationMode")] - public string ReplicationMode { get; protected set; } + public string ReplicationMode { get; private set; } /// /// Gets the name of the server hosting the partner database. /// [JsonProperty(PropertyName = "properties.partnerServer")] - public string PartnerServer { get; protected set; } + public string PartnerServer { get; private set; } /// /// Gets the name of the partner database. /// [JsonProperty(PropertyName = "properties.partnerDatabase")] - public string PartnerDatabase { get; protected set; } + public string PartnerDatabase { get; private set; } /// /// Gets the Azure Region of the partner database. /// [JsonProperty(PropertyName = "properties.partnerLocation")] - public string PartnerLocation { get; protected set; } + public string PartnerLocation { get; private set; } /// /// Gets the role of the database in the replication link. Possible @@ -124,7 +133,7 @@ public ReplicationLink() { } /// 'Source', 'Copy' /// [JsonProperty(PropertyName = "properties.role")] - public ReplicationRole? Role { get; protected set; } + public ReplicationRole? Role { get; private set; } /// /// Gets the role of the partner database in the replication link. @@ -132,27 +141,26 @@ public ReplicationLink() { } /// 'NonReadableSecondary', 'Source', 'Copy' /// [JsonProperty(PropertyName = "properties.partnerRole")] - public ReplicationRole? PartnerRole { get; protected set; } + public ReplicationRole? PartnerRole { get; private set; } /// /// Gets the start time for the replication link. /// [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; protected set; } + public System.DateTime? StartTime { get; private set; } /// /// Gets the percentage of seeding complete for the replication link. /// [JsonProperty(PropertyName = "properties.percentComplete")] - public int? PercentComplete { get; protected set; } + public int? PercentComplete { get; private set; } /// /// Gets the replication state for the replication link. Possible /// values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' /// [JsonProperty(PropertyName = "properties.replicationState")] - public string ReplicationState { get; protected set; } + public string ReplicationState { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationRole.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationRole.cs index fd99c0cfc0ca..c6ad5ebfe7d6 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationRole.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationRole.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for ReplicationRole. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum ReplicationRole { [EnumMember(Value = "Primary")] @@ -34,4 +34,3 @@ public enum ReplicationRole Copy } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationState.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationState.cs index 9fa5d1db98f6..f4d819c0c36b 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationState.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ReplicationState.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for ReplicationState. @@ -23,4 +23,3 @@ public static class ReplicationState public const string SUSPENDED = "SUSPENDED"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Resource.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Resource.cs index 7e42b810d834..23c795659742 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Resource.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Resource.cs @@ -2,92 +2,69 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Resource properties + /// ARM resource. /// public partial class Resource : IResource { /// /// Initializes a new instance of the Resource class. /// - public Resource() { } + public Resource() + { + CustomInit(); + } /// /// Initializes a new instance of the Resource class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags - public Resource(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + /// Resource ID. + /// Resource name. + /// Resource type. + public Resource(string id = default(string), string name = default(string), string type = default(string)) { - Name = name; Id = id; + Name = name; Type = type; - Location = location; - Tags = tags; + CustomInit(); } /// - /// Gets resource name + /// An initialization method that performs custom operations like setting defaults /// - [JsonProperty(PropertyName = "name")] - public string Name { get; protected set; } + partial void CustomInit(); /// - /// Gets resource ID + /// Gets resource ID. /// [JsonProperty(PropertyName = "id")] - public string Id { get; protected set; } - - /// - /// Gets resource type - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; protected set; } + public string Id { get; private set; } /// - /// Gets or sets resource location + /// Gets resource name. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } /// - /// Gets or sets resource tags + /// Gets resource type. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePoint.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePoint.cs index 653693a2cccf..aaf1b6a58dcf 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePoint.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePoint.cs @@ -2,41 +2,40 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Represents a database restore point. /// - [JsonTransformation] - public partial class RestorePoint : Resource + [Rest.Serialization.JsonTransformation] + public partial class RestorePoint : ProxyResource { /// /// Initializes a new instance of the RestorePoint class. /// - public RestorePoint() { } + public RestorePoint() + { + CustomInit(); + } /// /// Initializes a new instance of the RestorePoint class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource ID. + /// Resource name. + /// Resource type. /// The restore point type of the /// database restore point. Possible values include: 'DISCRETE', /// 'CONTINUOUS' @@ -46,45 +45,40 @@ public RestorePoint() { } /// Earliest restore time (ISO8601 /// format). Populated when restorePointType = DISCRETE. Null /// otherwise. - public RestorePoint(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), RestorePointTypes? restorePointType = default(RestorePointTypes?), System.DateTime? restorePointCreationDate = default(System.DateTime?), System.DateTime? earliestRestoreDate = default(System.DateTime?)) - : base(location, name, id, type, tags) + public RestorePoint(string id = default(string), string name = default(string), string type = default(string), RestorePointTypes? restorePointType = default(RestorePointTypes?), System.DateTime? restorePointCreationDate = default(System.DateTime?), System.DateTime? earliestRestoreDate = default(System.DateTime?)) + : base(id, name, type) { RestorePointType = restorePointType; RestorePointCreationDate = restorePointCreationDate; EarliestRestoreDate = earliestRestoreDate; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the restore point type of the database restore point. Possible /// values include: 'DISCRETE', 'CONTINUOUS' /// [JsonProperty(PropertyName = "properties.restorePointType")] - public RestorePointTypes? RestorePointType { get; protected set; } + public RestorePointTypes? RestorePointType { get; private set; } /// /// Gets restore point creation time (ISO8601 format). Populated when /// restorePointType = CONTINUOUS. Null otherwise. /// [JsonProperty(PropertyName = "properties.restorePointCreationDate")] - public System.DateTime? RestorePointCreationDate { get; protected set; } + public System.DateTime? RestorePointCreationDate { get; private set; } /// /// Gets earliest restore time (ISO8601 format). Populated when /// restorePointType = DISCRETE. Null otherwise. /// [JsonProperty(PropertyName = "properties.earliestRestoreDate")] - public System.DateTime? EarliestRestoreDate { get; protected set; } + public System.DateTime? EarliestRestoreDate { get; private set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePointTypes.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePointTypes.cs index e417275b1001..418d20f5ddd3 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePointTypes.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/RestorePointTypes.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for RestorePointTypes. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum RestorePointTypes { [EnumMember(Value = "DISCRETE")] @@ -28,4 +28,3 @@ public enum RestorePointTypes CONTINUOUS } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SampleName.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SampleName.cs index ad5ad7b2ace7..c29c4a2b71e4 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SampleName.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SampleName.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for SampleName. @@ -20,4 +20,3 @@ public static class SampleName public const string AdventureWorksLT = "AdventureWorksLT"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Schema.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Schema.cs deleted file mode 100644 index 51ba2a2dcded..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Schema.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a database schema. - /// - [JsonTransformation] - public partial class Schema : Resource - { - /// - /// Initializes a new instance of the Schema class. - /// - public Schema() { } - - /// - /// Initializes a new instance of the Schema class. - /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags - /// The tables from this database. - public Schema(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList tables = default(IList
)) - : base(location, name, id, type, tags) - { - Tables = tables; - } - - /// - /// Gets the tables from this database. - /// - [JsonProperty(PropertyName = "properties.tables")] - public IList
Tables { get; protected set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (Tables != null) - { - foreach (var element in Tables) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TargetElasticPoolEditions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyEmailAccountAdmins.cs similarity index 51% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TargetElasticPoolEditions.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyEmailAccountAdmins.cs index 86ea1f0a86bc..fea00eaf6a3b 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TargetElasticPoolEditions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyEmailAccountAdmins.cs @@ -2,32 +2,29 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; using System.Runtime.Serialization; /// - /// Defines values for TargetElasticPoolEditions. + /// Defines values for SecurityAlertPolicyEmailAccountAdmins. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public enum TargetElasticPoolEditions + [JsonConverter(typeof(StringEnumConverter))] + public enum SecurityAlertPolicyEmailAccountAdmins { - [EnumMember(Value = "Basic")] - Basic, - [EnumMember(Value = "Standard")] - Standard, - [EnumMember(Value = "Premium")] - Premium + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyState.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyState.cs new file mode 100644 index 000000000000..fe6fd2f81c89 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyState.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SecurityAlertPolicyState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SecurityAlertPolicyState + { + [EnumMember(Value = "New")] + New, + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyUseServerDefault.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyUseServerDefault.cs new file mode 100644 index 000000000000..9117b18e6102 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SecurityAlertPolicyUseServerDefault.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SecurityAlertPolicyUseServerDefault. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SecurityAlertPolicyUseServerDefault + { + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Server.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Server.cs index 94ce0b3719de..3223eeb4daf0 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Server.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Server.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,22 +21,25 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a server. /// - [JsonTransformation] - public partial class Server : Resource + [Rest.Serialization.JsonTransformation] + public partial class Server : TrackedResource { /// /// Initializes a new instance of the Server class. /// - public Server() { } + public Server() + { + CustomInit(); + } /// /// Initializes a new instance of the Server class. /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags + /// Resource location. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource tags. /// Kind of sql server. This is metadata used for /// the Azure portal experience. /// The fully qualified domain @@ -59,8 +62,8 @@ public Server() { } /// .../servers/{serverName}/administrators /// The state of the server. Possible values /// include: 'Ready', 'Disabled' - public Server(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), string kind = default(string), string fullyQualifiedDomainName = default(string), string version = default(string), string administratorLogin = default(string), string administratorLoginPassword = default(string), System.Guid? externalAdministratorSid = default(System.Guid?), string externalAdministratorLogin = default(string), ServerState? state = default(ServerState?)) - : base(location, name, id, type, tags) + public Server(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string kind = default(string), string fullyQualifiedDomainName = default(string), string version = default(string), string administratorLogin = default(string), string administratorLoginPassword = default(string), System.Guid? externalAdministratorSid = default(System.Guid?), string externalAdministratorLogin = default(string), ServerState? state = default(ServerState?)) + : base(location, id, name, type, tags) { Kind = kind; FullyQualifiedDomainName = fullyQualifiedDomainName; @@ -70,20 +73,26 @@ public Server() { } ExternalAdministratorSid = externalAdministratorSid; ExternalAdministratorLogin = externalAdministratorLogin; State = state; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets kind of sql server. This is metadata used for the Azure /// portal experience. /// [JsonProperty(PropertyName = "kind")] - public string Kind { get; protected set; } + public string Kind { get; private set; } /// /// Gets the fully qualified domain name of the server. /// [JsonProperty(PropertyName = "properties.fullyQualifiedDomainName")] - public string FullyQualifiedDomainName { get; protected set; } + public string FullyQualifiedDomainName { get; private set; } /// /// Gets or sets the version of the server. Possible values include: @@ -114,7 +123,7 @@ public Server() { } /// .../servers/{serverName}/administrators. /// [JsonProperty(PropertyName = "properties.externalAdministratorSid")] - public System.Guid? ExternalAdministratorSid { get; protected set; } + public System.Guid? ExternalAdministratorSid { get; private set; } /// /// Gets the display name of the Azure Active Directory object with @@ -123,14 +132,14 @@ public Server() { } /// .../servers/{serverName}/administrators /// [JsonProperty(PropertyName = "properties.externalAdministratorLogin")] - public string ExternalAdministratorLogin { get; protected set; } + public string ExternalAdministratorLogin { get; private set; } /// /// Gets the state of the server. Possible values include: 'Ready', /// 'Disabled' /// [JsonProperty(PropertyName = "properties.state")] - public ServerState? State { get; protected set; } + public ServerState? State { get; private set; } /// /// Validate the object. @@ -144,4 +153,3 @@ public override void Validate() } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerMetric.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerMetric.cs index 514b443b2e14..165386b6bc0a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerMetric.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerMetric.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class ServerMetric /// /// Initializes a new instance of the ServerMetric class. /// - public ServerMetric() { } + public ServerMetric() + { + CustomInit(); + } /// /// Initializes a new instance of the ServerMetric class. @@ -44,50 +47,55 @@ public ServerMetric() { } Limit = limit; Unit = unit; NextResetTime = nextResetTime; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets name of the server usage metric. /// [JsonProperty(PropertyName = "name")] - public string Name { get; protected set; } + public string Name { get; private set; } /// /// Gets the name of the resource. /// [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; protected set; } + public string ResourceName { get; private set; } /// /// Gets the metric display name. /// [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; protected set; } + public string DisplayName { get; private set; } /// /// Gets the current value of the metric. /// [JsonProperty(PropertyName = "currentValue")] - public double? CurrentValue { get; protected set; } + public double? CurrentValue { get; private set; } /// /// Gets the current limit of the metric. /// [JsonProperty(PropertyName = "limit")] - public double? Limit { get; protected set; } + public double? Limit { get; private set; } /// /// Gets the units of the metric. /// [JsonProperty(PropertyName = "unit")] - public string Unit { get; protected set; } + public string Unit { get; private set; } /// /// Gets the next reset time for the metric (ISO8601 format). /// [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; protected set; } + public System.DateTime? NextResetTime { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerState.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerState.cs index c2669c27745e..db7bcb0552b3 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerState.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerState.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for ServerState. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum ServerState { [EnumMember(Value = "Ready")] @@ -28,4 +28,3 @@ public enum ServerState Disabled } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersion.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersion.cs index 820962c3339e..4f9f632f75ba 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersion.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersion.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for ServerVersion. @@ -21,4 +21,3 @@ public static class ServerVersion public const string OneTwoFullStopZero = "12.0"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersionCapability.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersionCapability.cs new file mode 100644 index 000000000000..0b8db04a770d --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServerVersionCapability.cs @@ -0,0 +1,74 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The server capabilities. + /// + public partial class ServerVersionCapability + { + /// + /// Initializes a new instance of the ServerVersionCapability class. + /// + public ServerVersionCapability() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServerVersionCapability class. + /// + /// The server version name. + /// The status of the server version. Possible + /// values include: 'Visible', 'Available', 'Default', + /// 'Disabled' + /// The list of supported server + /// editions. + public ServerVersionCapability(string name = default(string), CapabilityStatus? status = default(CapabilityStatus?), IList supportedEditions = default(IList)) + { + Name = name; + Status = status; + SupportedEditions = supportedEditions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the server version name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the status of the server version. Possible values include: + /// 'Visible', 'Available', 'Default', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public CapabilityStatus? Status { get; private set; } + + /// + /// Gets the list of supported server editions. + /// + [JsonProperty(PropertyName = "supportedEditions")] + public IList SupportedEditions { get; private set; } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjective.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjective.cs index b2a9f4ab297f..b78063329577 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjective.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjective.cs @@ -2,30 +2,33 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Represents a database service objective. /// - [JsonTransformation] - public partial class ServiceObjective : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class ServiceObjective : SubResource { /// /// Initializes a new instance of the ServiceObjective class. /// - public ServiceObjective() { } + public ServiceObjective() + { + CustomInit(); + } /// /// Initializes a new instance of the ServiceObjective class. @@ -50,40 +53,45 @@ public ServiceObjective() { } IsSystem = isSystem; Description = description; Enabled = enabled; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the name for the service objective. /// [JsonProperty(PropertyName = "properties.serviceObjectiveName")] - public string ServiceObjectiveName { get; protected set; } + public string ServiceObjectiveName { get; private set; } /// /// Gets whether the service level objective is the default service /// objective. /// [JsonProperty(PropertyName = "properties.isDefault")] - public bool? IsDefault { get; protected set; } + public bool? IsDefault { get; private set; } /// /// Gets whether the service level objective is a system service /// objective. /// [JsonProperty(PropertyName = "properties.isSystem")] - public bool? IsSystem { get; protected set; } + public bool? IsSystem { get; private set; } /// /// Gets the description for the service level objective. /// [JsonProperty(PropertyName = "properties.description")] - public string Description { get; protected set; } + public string Description { get; private set; } /// /// Gets whether the service level objective is enabled. /// [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; protected set; } + public bool? Enabled { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveCapability.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveCapability.cs new file mode 100644 index 000000000000..ece14b5ac26f --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveCapability.cs @@ -0,0 +1,104 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The service objectives capabilities. + /// + [Rest.Serialization.JsonTransformation] + public partial class ServiceObjectiveCapability + { + /// + /// Initializes a new instance of the ServiceObjectiveCapability class. + /// + public ServiceObjectiveCapability() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceObjectiveCapability class. + /// + /// The service objective name. + /// The status of the service objective. Possible + /// values include: 'Visible', 'Available', 'Default', + /// 'Disabled' + /// Unit type used to measure service objective + /// performance level. Possible values include: 'DTU' + /// Performance level value. + /// The unique ID of the service objective. + /// The list of supported maximum + /// database sizes for this service objective. + public ServiceObjectiveCapability(string name = default(string), CapabilityStatus? status = default(CapabilityStatus?), PerformanceLevelUnit? unit = default(PerformanceLevelUnit?), int? value = default(int?), string id = default(string), IList supportedMaxSizes = default(IList)) + { + Name = name; + Status = status; + Unit = unit; + Value = value; + Id = id; + SupportedMaxSizes = supportedMaxSizes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the service objective name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the status of the service objective. Possible values include: + /// 'Visible', 'Available', 'Default', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public CapabilityStatus? Status { get; private set; } + + /// + /// Gets unit type used to measure service objective performance level. + /// Possible values include: 'DTU' + /// + [JsonProperty(PropertyName = "performanceLevel.unit")] + public PerformanceLevelUnit? Unit { get; private set; } + + /// + /// Gets performance level value. + /// + [JsonProperty(PropertyName = "performanceLevel.value")] + public int? Value { get; private set; } + + /// + /// Gets the unique ID of the service objective. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the list of supported maximum database sizes for this service + /// objective. + /// + [JsonProperty(PropertyName = "supportedMaxSizes")] + public IList SupportedMaxSizes { get; private set; } + + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveName.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveName.cs index 2d48cb3b9fb5..2fd7e04cf20d 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveName.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceObjectiveName.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// /// Defines values for ServiceObjectiveName. @@ -30,7 +30,7 @@ public static class ServiceObjectiveName public const string P11 = "P11"; public const string P15 = "P15"; public const string System = "System"; + public const string System2 = "System2"; public const string ElasticPool = "ElasticPool"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceTierAdvisor.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceTierAdvisor.cs index 959cf5b3ee56..241948908b8a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceTierAdvisor.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/ServiceTierAdvisor.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,13 +21,16 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Represents a Service Tier Advisor. /// - [JsonTransformation] - public partial class ServiceTierAdvisor : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class ServiceTierAdvisor : SubResource { /// /// Initializes a new instance of the ServiceTierAdvisor class. /// - public ServiceTierAdvisor() { } + public ServiceTierAdvisor() + { + CustomInit(); + } /// /// Initializes a new instance of the ServiceTierAdvisor class. @@ -107,132 +110,137 @@ public ServiceTierAdvisor() { } OverallRecommendationServiceLevelObjective = overallRecommendationServiceLevelObjective; OverallRecommendationServiceLevelObjectiveId = overallRecommendationServiceLevelObjectiveId; Confidence = confidence; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the observation period start (ISO8601 format). /// [JsonProperty(PropertyName = "properties.observationPeriodStart")] - public System.DateTime? ObservationPeriodStart { get; protected set; } + public System.DateTime? ObservationPeriodStart { get; private set; } /// /// Gets the observation period start (ISO8601 format). /// [JsonProperty(PropertyName = "properties.observationPeriodEnd")] - public System.DateTime? ObservationPeriodEnd { get; protected set; } + public System.DateTime? ObservationPeriodEnd { get; private set; } /// /// Gets the activeTimeRatio for service tier advisor. /// [JsonProperty(PropertyName = "properties.activeTimeRatio")] - public double? ActiveTimeRatio { get; protected set; } + public double? ActiveTimeRatio { get; private set; } /// /// Gets or sets minDtu for service tier advisor. /// [JsonProperty(PropertyName = "properties.minDtu")] - public double? MinDtu { get; protected set; } + public double? MinDtu { get; private set; } /// /// Gets or sets avgDtu for service tier advisor. /// [JsonProperty(PropertyName = "properties.avgDtu")] - public double? AvgDtu { get; protected set; } + public double? AvgDtu { get; private set; } /// /// Gets or sets maxDtu for service tier advisor. /// [JsonProperty(PropertyName = "properties.maxDtu")] - public double? MaxDtu { get; protected set; } + public double? MaxDtu { get; private set; } /// /// Gets or sets maxSizeInGB for service tier advisor. /// [JsonProperty(PropertyName = "properties.maxSizeInGB")] - public double? MaxSizeInGB { get; protected set; } + public double? MaxSizeInGB { get; private set; } /// /// Gets or sets serviceLevelObjectiveUsageMetrics for the service tier /// advisor. /// [JsonProperty(PropertyName = "properties.serviceLevelObjectiveUsageMetrics")] - public IList ServiceLevelObjectiveUsageMetrics { get; protected set; } + public IList ServiceLevelObjectiveUsageMetrics { get; private set; } /// /// Gets or sets currentServiceLevelObjective for service tier advisor. /// [JsonProperty(PropertyName = "properties.currentServiceLevelObjective")] - public string CurrentServiceLevelObjective { get; protected set; } + public string CurrentServiceLevelObjective { get; private set; } /// /// Gets or sets currentServiceLevelObjectiveId for service tier /// advisor. /// [JsonProperty(PropertyName = "properties.currentServiceLevelObjectiveId")] - public System.Guid? CurrentServiceLevelObjectiveId { get; protected set; } + public System.Guid? CurrentServiceLevelObjectiveId { get; private set; } /// /// Gets or sets usageBasedRecommendationServiceLevelObjective for /// service tier advisor. /// [JsonProperty(PropertyName = "properties.usageBasedRecommendationServiceLevelObjective")] - public string UsageBasedRecommendationServiceLevelObjective { get; protected set; } + public string UsageBasedRecommendationServiceLevelObjective { get; private set; } /// /// Gets or sets usageBasedRecommendationServiceLevelObjectiveId for /// service tier advisor. /// [JsonProperty(PropertyName = "properties.usageBasedRecommendationServiceLevelObjectiveId")] - public System.Guid? UsageBasedRecommendationServiceLevelObjectiveId { get; protected set; } + public System.Guid? UsageBasedRecommendationServiceLevelObjectiveId { get; private set; } /// /// Gets or sets databaseSizeBasedRecommendationServiceLevelObjective /// for service tier advisor. /// [JsonProperty(PropertyName = "properties.databaseSizeBasedRecommendationServiceLevelObjective")] - public string DatabaseSizeBasedRecommendationServiceLevelObjective { get; protected set; } + public string DatabaseSizeBasedRecommendationServiceLevelObjective { get; private set; } /// /// Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId /// for service tier advisor. /// [JsonProperty(PropertyName = "properties.databaseSizeBasedRecommendationServiceLevelObjectiveId")] - public System.Guid? DatabaseSizeBasedRecommendationServiceLevelObjectiveId { get; protected set; } + public System.Guid? DatabaseSizeBasedRecommendationServiceLevelObjectiveId { get; private set; } /// /// Gets or sets disasterPlanBasedRecommendationServiceLevelObjective /// for service tier advisor. /// [JsonProperty(PropertyName = "properties.disasterPlanBasedRecommendationServiceLevelObjective")] - public string DisasterPlanBasedRecommendationServiceLevelObjective { get; protected set; } + public string DisasterPlanBasedRecommendationServiceLevelObjective { get; private set; } /// /// Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId /// for service tier advisor. /// [JsonProperty(PropertyName = "properties.disasterPlanBasedRecommendationServiceLevelObjectiveId")] - public System.Guid? DisasterPlanBasedRecommendationServiceLevelObjectiveId { get; protected set; } + public System.Guid? DisasterPlanBasedRecommendationServiceLevelObjectiveId { get; private set; } /// /// Gets or sets overallRecommendationServiceLevelObjective for service /// tier advisor. /// [JsonProperty(PropertyName = "properties.overallRecommendationServiceLevelObjective")] - public string OverallRecommendationServiceLevelObjective { get; protected set; } + public string OverallRecommendationServiceLevelObjective { get; private set; } /// /// Gets or sets overallRecommendationServiceLevelObjectiveId for /// service tier advisor. /// [JsonProperty(PropertyName = "properties.overallRecommendationServiceLevelObjectiveId")] - public System.Guid? OverallRecommendationServiceLevelObjectiveId { get; protected set; } + public System.Guid? OverallRecommendationServiceLevelObjectiveId { get; private set; } /// /// Gets or sets confidence for service tier advisor. /// [JsonProperty(PropertyName = "properties.confidence")] - public double? Confidence { get; protected set; } + public double? Confidence { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SloUsageMetric.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SloUsageMetric.cs index c66774c45fdd..0f80348d7317 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SloUsageMetric.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SloUsageMetric.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class SloUsageMetric /// /// Initializes a new instance of the SloUsageMetric class. /// - public SloUsageMetric() { } + public SloUsageMetric() + { + CustomInit(); + } /// /// Initializes a new instance of the SloUsageMetric class. @@ -30,7 +33,7 @@ public SloUsageMetric() { } /// The serviceLevelObjective for /// SLO usage metric. Possible values include: 'Basic', 'S0', 'S1', /// 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', - /// 'ElasticPool' + /// 'System2', 'ElasticPool' /// The serviceLevelObjectiveId /// for SLO usage metric. /// Gets or sets inRangeTimeRatio for @@ -40,12 +43,19 @@ public SloUsageMetric() { } ServiceLevelObjective = serviceLevelObjective; ServiceLevelObjectiveId = serviceLevelObjectiveId; InRangeTimeRatio = inRangeTimeRatio; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the serviceLevelObjective for SLO usage metric. /// Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', - /// 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'ElasticPool' + /// 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', + /// 'ElasticPool' /// [JsonProperty(PropertyName = "serviceLevelObjective")] public string ServiceLevelObjective { get; set; } @@ -64,4 +74,3 @@ public SloUsageMetric() { } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/StorageKeyType.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/StorageKeyType.cs index 0f6972c3ea42..46e88403d8d4 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/StorageKeyType.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/StorageKeyType.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// Defines values for StorageKeyType. /// - [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + [JsonConverter(typeof(StringEnumConverter))] public enum StorageKeyType { [EnumMember(Value = "StorageAccessKey")] @@ -28,4 +28,3 @@ public enum StorageKeyType SharedAccessKey } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SqlSubResource.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SubResource.cs similarity index 54% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SqlSubResource.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SubResource.cs index c5346bf44a6e..bfb412556ef1 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SqlSubResource.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/SubResource.cs @@ -2,51 +2,59 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; using Newtonsoft.Json; using System.Linq; /// /// Subresource properties /// - public partial class SqlSubResource + public partial class SubResource { /// - /// Initializes a new instance of the SqlSubResource class. + /// Initializes a new instance of the SubResource class. /// - public SqlSubResource() { } + public SubResource() + { + CustomInit(); + } /// - /// Initializes a new instance of the SqlSubResource class. + /// Initializes a new instance of the SubResource class. /// /// Resource name /// The resource ID. - public SqlSubResource(string name = default(string), string id = default(string)) + public SubResource(string name = default(string), string id = default(string)) { Name = name; Id = id; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets resource name /// [JsonProperty(PropertyName = "name")] - public string Name { get; protected set; } + public string Name { get; private set; } /// /// Gets the resource ID. /// [JsonProperty(PropertyName = "id")] - public string Id { get; protected set; } + public string Id { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Table.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Table.cs deleted file mode 100644 index 8f1417dbab80..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/Table.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a database table. - /// - [JsonTransformation] - public partial class Table : Resource - { - /// - /// Initializes a new instance of the Table class. - /// - public Table() { } - - /// - /// Initializes a new instance of the Table class. - /// - /// Resource location - /// Resource name - /// Resource ID - /// Resource type - /// Resource tags - /// The type of database table. Possible values - /// include: 'BaseTable', 'View' - /// The columns from this table. - /// The recommended indices for this - /// table. - public Table(string location, string name = default(string), string id = default(string), string type = default(string), IDictionary tags = default(IDictionary), TableType? tableType = default(TableType?), IList columns = default(IList), IList recommendedIndexes = default(IList)) - : base(location, name, id, type, tags) - { - TableType = tableType; - Columns = columns; - RecommendedIndexes = recommendedIndexes; - } - - /// - /// Gets the type of database table. Possible values include: - /// 'BaseTable', 'View' - /// - [JsonProperty(PropertyName = "properties.tableType")] - public TableType? TableType { get; protected set; } - - /// - /// Gets the columns from this table. - /// - [JsonProperty(PropertyName = "properties.columns")] - public IList Columns { get; protected set; } - - /// - /// Gets the recommended indices for this table. - /// - [JsonProperty(PropertyName = "properties.recommendedIndexes")] - public IList RecommendedIndexes { get; protected set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (Columns != null) - { - foreach (var element in Columns) - { - if (element != null) - { - element.Validate(); - } - } - } - if (RecommendedIndexes != null) - { - foreach (var element1 in RecommendedIndexes) - { - if (element1 != null) - { - element1.Validate(); - } - } - } - } - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TrackedResource.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TrackedResource.cs new file mode 100644 index 000000000000..0bce0874fc7f --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TrackedResource.cs @@ -0,0 +1,80 @@ +// 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 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ARM tracked top level resource. + /// + public partial class TrackedResource : Resource + { + /// + /// Initializes a new instance of the TrackedResource class. + /// + public TrackedResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackedResource class. + /// + /// Resource location. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource tags. + public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, type) + { + Tags = tags; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets resource location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryption.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryption.cs index df2de344333c..6016e8c34c8a 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryption.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryption.cs @@ -2,30 +2,33 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Represents a database transparent data encryption . /// - [JsonTransformation] - public partial class TransparentDataEncryption : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class TransparentDataEncryption : SubResource { /// /// Initializes a new instance of the TransparentDataEncryption class. /// - public TransparentDataEncryption() { } + public TransparentDataEncryption() + { + CustomInit(); + } /// /// Initializes a new instance of the TransparentDataEncryption class. @@ -34,19 +37,24 @@ public TransparentDataEncryption() { } /// The resource ID. /// The status of the database transparent data /// encryption. Possible values include: 'Enabled', 'Disabled' - public TransparentDataEncryption(string name = default(string), string id = default(string), TransparentDataEncryptionStates? status = default(TransparentDataEncryptionStates?)) + public TransparentDataEncryption(string name = default(string), string id = default(string), TransparentDataEncryptionStatus? status = default(TransparentDataEncryptionStatus?)) : base(name, id) { Status = status; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the status of the database transparent data /// encryption. Possible values include: 'Enabled', 'Disabled' /// [JsonProperty(PropertyName = "properties.status")] - public TransparentDataEncryptionStates? Status { get; set; } + public TransparentDataEncryptionStatus? Status { get; set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivity.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivity.cs index 110d85cf1a25..c84d1a13f4c9 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivity.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivity.cs @@ -2,31 +2,34 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; - using Rest; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Represents a database transparent data encryption Scan. /// - [JsonTransformation] - public partial class TransparentDataEncryptionActivity : SqlSubResource + [Rest.Serialization.JsonTransformation] + public partial class TransparentDataEncryptionActivity : SubResource { /// /// Initializes a new instance of the TransparentDataEncryptionActivity /// class. /// - public TransparentDataEncryptionActivity() { } + public TransparentDataEncryptionActivity() + { + CustomInit(); + } /// /// Initializes a new instance of the TransparentDataEncryptionActivity @@ -43,22 +46,27 @@ public TransparentDataEncryptionActivity() { } { Status = status; PercentComplete = percentComplete; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the status of the database. Possible values include: /// 'Encrypting', 'Decrypting' /// [JsonProperty(PropertyName = "properties.status")] - public string Status { get; protected set; } + public string Status { get; private set; } /// /// Gets the percent complete of the transparent data encryption scan /// for a database. /// [JsonProperty(PropertyName = "properties.percentComplete")] - public double? PercentComplete { get; protected set; } + public double? PercentComplete { get; private set; } } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStates.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStatus.cs similarity index 68% rename from src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStates.cs rename to src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStatus.cs index ac521bd13c90..f4cfc6ff02bc 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStates.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionActivityStatus.cs @@ -2,23 +2,22 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql.Models { - using Azure; - using Management; - using Sql; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; /// - /// Defines values for TransparentDataEncryptionActivityStates. + /// Defines values for TransparentDataEncryptionActivityStatus. /// - public static class TransparentDataEncryptionActivityStates + public static class TransparentDataEncryptionActivityStatus { public const string Encrypting = "Encrypting"; public const string Decrypting = "Decrypting"; } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStatus.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStatus.cs new file mode 100644 index 000000000000..9a4bef8057ba --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/TransparentDataEncryptionStatus.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Sql; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for TransparentDataEncryptionStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TransparentDataEncryptionStatus + { + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled + } +} diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeHint.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeHint.cs deleted file mode 100644 index db46a3df2ecd..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeHint.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents a Upgrade Hint. - /// - public partial class UpgradeHint - { - /// - /// Initializes a new instance of the UpgradeHint class. - /// - public UpgradeHint() { } - - /// - /// Initializes a new instance of the UpgradeHint class. - /// - /// TargetServiceLevelObjective for - /// upgrade hint. - /// TargetServiceLevelObjectiveId - /// for upgrade hint. - public UpgradeHint(string targetServiceLevelObjective = default(string), System.Guid? targetServiceLevelObjectiveId = default(System.Guid?)) - { - TargetServiceLevelObjective = targetServiceLevelObjective; - TargetServiceLevelObjectiveId = targetServiceLevelObjectiveId; - } - - /// - /// Gets or sets targetServiceLevelObjective for upgrade hint. - /// - [JsonProperty(PropertyName = "targetServiceLevelObjective")] - public string TargetServiceLevelObjective { get; set; } - - /// - /// Gets or sets targetServiceLevelObjectiveId for upgrade hint. - /// - [JsonProperty(PropertyName = "targetServiceLevelObjectiveId")] - public System.Guid? TargetServiceLevelObjectiveId { get; set; } - - } -} - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeRecommendedElasticPoolProperties.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeRecommendedElasticPoolProperties.cs deleted file mode 100644 index f417c610e550..000000000000 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/Models/UpgradeRecommendedElasticPoolProperties.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.Sql.Models -{ - using Azure; - using Management; - using Sql; - using Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents the properties of a recommended elastic pool being upgraded. - /// - public partial class UpgradeRecommendedElasticPoolProperties - { - /// - /// Initializes a new instance of the - /// UpgradeRecommendedElasticPoolProperties class. - /// - public UpgradeRecommendedElasticPoolProperties() { } - - /// - /// Initializes a new instance of the - /// UpgradeRecommendedElasticPoolProperties class. - /// - /// The name of the recommended elastic pool being - /// upgraded. - /// The target edition for the recommended - /// elastic pool being upgraded. Possible values include: 'Basic', - /// 'Standard', 'Premium' - /// The DTU guarantee for the recommended elastic - /// pool being upgraded. - /// The storage limit in MB for the recommended - /// elastic pool being upgraded. - /// The DTU guarantee for database for the - /// recommended elastic pool being upgraded. - /// The DTU cap for database for the - /// recommended elastic pool being upgraded. - /// The list of database names to be - /// put in the recommended elastic pool being upgraded. - /// Gets or sets whether all - /// databases to be put in the recommended elastic pool being - /// upgraded. - public UpgradeRecommendedElasticPoolProperties(string name, TargetElasticPoolEditions edition, int? dtu = default(int?), int? storageMb = default(int?), int? databaseDtuMin = default(int?), int? databaseDtuMax = default(int?), IList databaseCollection = default(IList), bool? includeAllDatabases = default(bool?)) - { - Name = name; - Edition = edition; - Dtu = dtu; - StorageMb = storageMb; - DatabaseDtuMin = databaseDtuMin; - DatabaseDtuMax = databaseDtuMax; - DatabaseCollection = databaseCollection; - IncludeAllDatabases = includeAllDatabases; - } - - /// - /// Gets or sets the name of the recommended elastic pool being - /// upgraded. - /// - [JsonProperty(PropertyName = "Name")] - public string Name { get; set; } - - /// - /// Gets or sets the target edition for the recommended elastic pool - /// being upgraded. Possible values include: 'Basic', 'Standard', - /// 'Premium' - /// - [JsonProperty(PropertyName = "Edition")] - public TargetElasticPoolEditions Edition { get; set; } - - /// - /// Gets or sets the DTU guarantee for the recommended elastic pool - /// being upgraded. - /// - [JsonProperty(PropertyName = "Dtu")] - public int? Dtu { get; set; } - - /// - /// Gets or sets the storage limit in MB for the recommended elastic - /// pool being upgraded. - /// - [JsonProperty(PropertyName = "StorageMb")] - public int? StorageMb { get; set; } - - /// - /// Gets or sets the DTU guarantee for database for the recommended - /// elastic pool being upgraded. - /// - [JsonProperty(PropertyName = "DatabaseDtuMin")] - public int? DatabaseDtuMin { get; set; } - - /// - /// Gets or sets the DTU cap for database for the recommended elastic - /// pool being upgraded. - /// - [JsonProperty(PropertyName = "DatabaseDtuMax")] - public int? DatabaseDtuMax { get; set; } - - /// - /// Gets or sets the list of database names to be put in the - /// recommended elastic pool being upgraded. - /// - [JsonProperty(PropertyName = "DatabaseCollection")] - public IList DatabaseCollection { get; set; } - - /// - /// Gets or sets whether all databases to be put in the recommended - /// elastic pool being upgraded. - /// - [JsonProperty(PropertyName = "IncludeAllDatabases")] - public bool? IncludeAllDatabases { 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/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperations.cs index 193e5e01070e..2c6654fc0635 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -134,9 +134,9 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -151,6 +151,8 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,7 +200,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -235,7 +237,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -345,9 +347,9 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -362,6 +364,8 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -409,7 +413,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -446,7 +450,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -494,7 +498,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -520,7 +524,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -538,9 +542,9 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -555,6 +559,8 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -602,7 +608,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -639,7 +645,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -740,9 +746,9 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -757,6 +763,8 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -804,7 +812,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -841,7 +849,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -942,9 +950,9 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -959,6 +967,8 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1006,7 +1016,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1043,7 +1053,7 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1062,4 +1072,3 @@ internal RecommendedElasticPoolsOperations(SqlManagementClient client) } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperationsExtensions.cs index 2808c1b03aeb..468a88d80e58 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperationsExtensions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/RecommendedElasticPoolsOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -138,9 +138,9 @@ public static Database GetDatabases(this IRecommendedElasticPoolsOperations oper /// /// The name of the server. /// - public static IEnumerable List(this IRecommendedElasticPoolsOperations operations, string resourceGroupName, string serverName) + public static IEnumerable ListByServer(this IRecommendedElasticPoolsOperations operations, string resourceGroupName, string serverName) { - return operations.ListAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); } /// @@ -159,9 +159,9 @@ public static IEnumerable List(this IRecommendedElasticP /// /// The cancellation token. /// - public static async Task> ListAsync(this IRecommendedElasticPoolsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByServerAsync(this IRecommendedElasticPoolsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -265,4 +265,3 @@ public static IEnumerable ListMetrics(this IRecomm } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperations.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperations.cs index 64b56154b5fa..28c0b93d916e 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperations.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -50,838 +50,6 @@ internal ServersOperations(SqlManagementClient client) /// public SqlManagementClient Client { get; private set; } - /// - /// Creates or updates a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The required parameters for creating or updating a firewall rule. - /// - /// - /// 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> CreateOrUpdateFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, ServerFirewallRule parameters, 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 (serverName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); - } - if (firewallRuleName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2014-04-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serverName", serverName); - tracingParameters.Add("firewallRuleName", firewallRuleName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFirewallRule", 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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (Newtonsoft.Json.JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// 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 DeleteFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, 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 (serverName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); - } - if (firewallRuleName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); - } - string apiVersion = "2014-04-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serverName", serverName); - tracingParameters.Add("firewallRuleName", firewallRuleName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFirewallRule", 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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - } - else { - _responseContent = string.Empty; - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a firewall rule. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// 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> GetFirewallRuleWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, 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 (serverName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); - } - if (firewallRuleName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName"); - } - string apiVersion = "2014-04-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serverName", serverName); - tracingParameters.Add("firewallRuleName", firewallRuleName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFirewallRule", 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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (Newtonsoft.Json.JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (Newtonsoft.Json.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; - } - - /// - /// Returns a list of firewall rules. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// 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>> ListFirewallRulesWithHttpMessagesAsync(string resourceGroupName, string serverName, 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 (serverName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); - } - string apiVersion = "2014-04-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serverName", serverName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFirewallRules", 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.Sql/servers/{serverName}/firewallRules").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (Newtonsoft.Json.JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (Newtonsoft.Json.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; - } - - /// - /// Imports a bacpac into a new database. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginImportDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Returns a list of servers. /// @@ -938,9 +106,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -955,6 +123,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1002,7 +172,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1039,7 +209,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1143,9 +313,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + 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) @@ -1160,6 +330,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1177,7 +349,7 @@ internal ServersOperations(SqlManagementClient client) if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -1213,7 +385,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1250,7 +422,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1268,7 +440,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1357,9 +529,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + 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) @@ -1374,6 +546,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1411,11 +585,19 @@ internal ServersOperations(SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - if (_httpResponse.Content != null) { + try + { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } } - else { - _responseContent = string.Empty; + catch (JsonException) + { + // Ignore the exception } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); @@ -1480,7 +662,7 @@ internal ServersOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1506,7 +688,7 @@ internal ServersOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByResourceGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -1524,9 +706,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1541,6 +723,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1588,7 +772,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1625,7 +809,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1708,9 +892,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1725,6 +909,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1772,7 +958,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -1809,7 +995,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -1901,9 +1087,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -1918,6 +1104,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1965,7 +1153,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2002,7 +1190,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2103,9 +1291,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -2120,6 +1308,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2167,7 +1357,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2204,7 +1394,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2296,9 +1486,9 @@ internal ServersOperations(SqlManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + 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) @@ -2313,6 +1503,8 @@ internal ServersOperations(SqlManagementClient client) } _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2360,7 +1552,7 @@ internal ServersOperations(SqlManagementClient client) ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -2397,218 +1589,7 @@ internal ServersOperations(SqlManagementClient client) { _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } - catch (Newtonsoft.Json.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; - } - - /// - /// Imports a bacpac into a new database. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// 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> BeginImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequestParameters parameters, 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 (serverName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2014-04-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serverName", serverName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginImportDatabase", 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.Sql/servers/{serverName}/import").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.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 != 201 && (int)_statusCode != 202) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (Newtonsoft.Json.JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -2627,4 +1608,3 @@ internal ServersOperations(SqlManagementClient client) } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperationsExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperationsExtensions.cs index 542c38da904e..9160fccc5f8e 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperationsExtensions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/ServersOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -23,243 +23,6 @@ namespace Microsoft.Azure.Management.Sql /// public static partial class ServersOperationsExtensions { - /// - /// Creates or updates a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The required parameters for creating or updating a firewall rule. - /// - public static ServerFirewallRule CreateOrUpdateFirewallRule(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName, ServerFirewallRule parameters) - { - return operations.CreateOrUpdateFirewallRuleAsync(resourceGroupName, serverName, firewallRuleName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The required parameters for creating or updating a firewall rule. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateFirewallRuleAsync(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName, ServerFirewallRule parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateFirewallRuleWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - public static void DeleteFirewallRule(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName) - { - operations.DeleteFirewallRuleAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteFirewallRuleAsync(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken)) - { - await operations.DeleteFirewallRuleWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - public static ServerFirewallRule GetFirewallRule(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName) - { - return operations.GetFirewallRuleAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult(); - } - - /// - /// Gets a firewall rule. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the firewall rule. - /// - /// - /// The cancellation token. - /// - public static async Task GetFirewallRuleAsync(this IServersOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFirewallRuleWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns a list of firewall rules. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - public static IEnumerable ListFirewallRules(this IServersOperations operations, string resourceGroupName, string serverName) - { - return operations.ListFirewallRulesAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); - } - - /// - /// Returns a list of firewall rules. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The cancellation token. - /// - public static async Task> ListFirewallRulesAsync(this IServersOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFirewallRulesWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Imports a bacpac into a new database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - public static ImportExportOperationResponse ImportDatabase(this IServersOperations operations, string resourceGroupName, string serverName, ImportRequestParameters parameters) - { - return operations.ImportDatabaseAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Imports a bacpac into a new database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// The cancellation token. - /// - public static async Task ImportDatabaseAsync(this IServersOperations operations, string resourceGroupName, string serverName, ImportRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ImportDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Returns a list of servers. /// @@ -372,7 +135,7 @@ public static void Delete(this IServersOperations operations, string resourceGro /// public static async Task DeleteAsync(this IServersOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -388,9 +151,9 @@ public static void Delete(this IServersOperations operations, string resourceGro /// /// The name of the server. /// - public static Server GetByResourceGroup(this IServersOperations operations, string resourceGroupName, string serverName) + public static Server Get(this IServersOperations operations, string resourceGroupName, string serverName) { - return operations.GetByResourceGroupAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); } /// @@ -409,9 +172,9 @@ public static Server GetByResourceGroup(this IServersOperations operations, stri /// /// The cancellation token. /// - public static async Task GetByResourceGroupAsync(this IServersOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IServersOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetByResourceGroupWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -585,54 +348,5 @@ public static IEnumerable ListServiceObjectives(this IServersO } } - /// - /// Imports a bacpac into a new database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - public static ImportExportOperationResponse BeginImportDatabase(this IServersOperations operations, string resourceGroupName, string serverName, ImportRequestParameters parameters) - { - return operations.BeginImportDatabaseAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Imports a bacpac into a new database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The required parameters for importing a Bacpac into a database. - /// - /// - /// The cancellation token. - /// - public static async Task BeginImportDatabaseAsync(this IServersOperations operations, string resourceGroupName, string serverName, ImportRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginImportDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClient.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClient.cs index f258532d2230..b34b6f6cec3f 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClient.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClient.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; using Models; using Newtonsoft.Json; using System.Collections; @@ -39,12 +39,12 @@ public partial class SqlManagementClient : ServiceClient, I /// /// Gets or sets json serialization settings. /// - public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } + public JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } + public JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. @@ -74,9 +74,14 @@ public partial class SqlManagementClient : ServiceClient, I public bool? GenerateClientRequestId { get; set; } /// - /// Gets the IServersOperations. + /// Gets the ICapabilitiesOperations. /// - public virtual IServersOperations Servers { get; private set; } + public virtual ICapabilitiesOperations Capabilities { get; private set; } + + /// + /// Gets the IFirewallRulesOperations. + /// + public virtual IFirewallRulesOperations FirewallRules { get; private set; } /// /// Gets the IDatabasesOperations. @@ -84,9 +89,9 @@ public partial class SqlManagementClient : ServiceClient, I public virtual IDatabasesOperations Databases { get; private set; } /// - /// Gets the IImportExportOperations. + /// Gets the IServersOperations. /// - public virtual IImportExportOperations ImportExportOperations { get; private set; } + public virtual IServersOperations Servers { get; private set; } /// /// Gets the IElasticPoolsOperations. @@ -104,7 +109,7 @@ public partial class SqlManagementClient : ServiceClient, I /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SqlManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) + protected SqlManagementClient(params DelegatingHandler[] handlers) : base(handlers) { Initialize(); } @@ -118,7 +123,7 @@ protected SqlManagementClient(params System.Net.Http.DelegatingHandler[] handler /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SqlManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected SqlManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { Initialize(); } @@ -135,7 +140,7 @@ protected SqlManagementClient(System.Net.Http.HttpClientHandler rootHandler, par /// /// Thrown when a required parameter is null /// - protected SqlManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + protected SqlManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -159,7 +164,7 @@ protected SqlManagementClient(System.Uri baseUri, params System.Net.Http.Delegat /// /// Thrown when a required parameter is null /// - protected SqlManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected SqlManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -180,7 +185,7 @@ protected SqlManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHand /// /// Thrown when a required parameter is null /// - public SqlManagementClient(ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + public SqlManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -208,7 +213,7 @@ public SqlManagementClient(ServiceClientCredentials credentials, params System.N /// /// Thrown when a required parameter is null /// - public SqlManagementClient(ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SqlManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { @@ -236,7 +241,7 @@ public SqlManagementClient(ServiceClientCredentials credentials, System.Net.Http /// /// Thrown when a required parameter is null /// - public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -272,7 +277,7 @@ public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credenti /// /// Thrown when a required parameter is null /// - public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -299,16 +304,17 @@ public SqlManagementClient(System.Uri baseUri, ServiceClientCredentials credenti /// private void Initialize() { - Servers = new ServersOperations(this); + Capabilities = new CapabilitiesOperations(this); + FirewallRules = new FirewallRulesOperations(this); Databases = new DatabasesOperations(this); - ImportExportOperations = new ImportExportOperations(this); + Servers = new ServersOperations(this); ElasticPools = new ElasticPoolsOperations(this); RecommendedElasticPools = new RecommendedElasticPoolsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; - SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings + SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, @@ -316,20 +322,20 @@ private void Initialize() NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new System.Collections.Generic.List + Converters = new List { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings + DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new System.Collections.Generic.List + Converters = new List { new Iso8601TimeSpanConverter() } @@ -383,9 +389,9 @@ private void Initialize() _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -400,6 +406,8 @@ private void Initialize() } _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -447,7 +455,7 @@ private void Initialize() ex.Body = _errorBody; } } - catch (Newtonsoft.Json.JsonException) + catch (JsonException) { // Ignore the exception } @@ -484,7 +492,7 @@ private void Initialize() { _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); } - catch (Newtonsoft.Json.JsonException ex) + catch (JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) @@ -503,4 +511,3 @@ private void Initialize() } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClientExtensions.cs b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClientExtensions.cs index 21f13bae02ae..aed8a280d8d9 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClientExtensions.cs +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/Generated/SqlManagementClientExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 // Changes may cause incorrect behavior and will be lost if the code is // regenerated. namespace Microsoft.Azure.Management.Sql { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Threading; using System.Threading.Tasks; @@ -51,4 +51,3 @@ public static OperationListResult ListOperations(this ISqlManagementClient opera } } - diff --git a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/generate.cmd b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/generate.cmd index ea5429eb4475..2d28ed7158cd 100644 --- a/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/generate.cmd +++ b/src/ResourceManagement/SqlManagement/Microsoft.Azure.Management.Sql/generate.cmd @@ -4,9 +4,8 @@ :: @echo off -set autoRestVersion=1.0.0-Nightly20161212 if "%1" == "" ( - set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/b379c30fcb506b1bd643f6085b4bf318b8164b16/arm-sql/compositeSql.json" + set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/ea48f5627d9cd1964b19ce2571ebdc8f22262d93/arm-sql/compositeSql.json" ) else ( set specFile="%1" ) @@ -14,4 +13,6 @@ set repoRoot=%~dp0..\..\..\.. set generateFolder=%~dp0Generated if exist %generateFolder% rd /S /Q %generateFolder% -call "%repoRoot%\tools\autorest.composite.gen.cmd" %specFile% Microsoft.Azure.Management.Sql %autoRestVersion% %generateFolder% "-FT 1" + +autorest --latest -Modeler CompositeSwagger -CodeGenerator Azure.CSharp -Namespace Microsoft.Azure.Management.Sql -Input %specFile% -outputDirectory %generateFolder% -Header MICROSOFT_MIT %~5 + diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/BlobAuditingTest.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/BlobAuditingTest.cs new file mode 100644 index 000000000000..67b925da1ccd --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/BlobAuditingTest.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Test.HttpRecorder; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Xunit; + +namespace Sql.Tests +{ + /// + /// Contains tests for the lifecycle of a server blob auditing policy + /// + public class BlobAuditingTest + { + [Fact] + public void TestBlobAuditingApis() + { + string testPrefix = "server-blob-auditing-test-"; + string testName = this.GetType().FullName; + + SqlManagementTestUtilities.RunTestInNewV12Server(testName, "TestBlobAuditing", testPrefix, + (resClient, sqlClient, resourceGroup, server) => + { + // create some databases in server + Database[] databases = SqlManagementTestUtilities.CreateDatabasesAsync( + sqlClient, resourceGroup.Name, server, testPrefix, 2).Result; + + IList auditActionsAndGroups = new List { "SCHEMA_OBJECT_ACCESS_GROUP", "UPDATE on database::testdb by public" }; + +#if false // Commented out due to issues with async operation response + + // ******* Server blob auditing ******* + ServerBlobAuditingPolicy defaultServerPolicyResponse = sqlClient.Servers.GetBlobAuditingProperties(resourceGroup.Name, server.Name); + + // Verify that the initial Get request contains the default policy. + VerifyServerAuditingPolicyInformation(GetDefaultServerBlobAuditingProperties(), defaultServerPolicyResponse); + + // Modify the policy properties, send and receive and see it its still ok + IList auditActionsAndGroups = new List { "SCHEMA_OBJECT_ACCESS_GROUP", "UPDATE on database::testdb by public" }; + ServerBlobAuditingPolicy updatedServerPolicy = new ServerBlobAuditingPolicy + { + State = BlobAuditingPolicyState.Disabled, + RetentionDays = 8, + StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + StorageEndpoint = "https://MyAccount.blob.core.windows.net/", + AuditActionsAndGroups = auditActionsAndGroups, + StorageAccountSubscriptionId = "00000000-1234-0000-5678-000000000000", + IsStorageSecondaryKeyInUse = false + }; + + //Set blob auditing policy for server + sqlClient.Servers.CreateOrUpdateBlobAuditingProperties(resourceGroup.Name, server.Name, updatedServerPolicy); + + //Get blob auditing server policy + var getUpdatedServerPolicyResponse = sqlClient.Servers.GetBlobAuditingProperties(resourceGroup.Name, server.Name); + + // Verify that the Get request contains the updated policy. + VerifyServerAuditingPolicyInformation(updatedServerPolicy, getUpdatedServerPolicyResponse); +#endif + + // ******* Database blob auditing ******* + + string dbName = databases[0].Name; + DatabaseBlobAuditingPolicy defaultDatabasePolicyResponse = sqlClient.Databases.GetBlobAuditingPolicy(resourceGroup.Name, server.Name, dbName); + + // Verify that the initial Get request contains the default policy. + VerifyDatabaseAuditingPolicyInformation(GetDefaultDatabaseBlobAuditingProperties(), defaultDatabasePolicyResponse); + + // Modify the policy properties, send and receive and see it its still ok + DatabaseBlobAuditingPolicy updatedDatabasePolicy = new DatabaseBlobAuditingPolicy + { + State = BlobAuditingPolicyState.Disabled, + RetentionDays = 5, + StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + StorageEndpoint = "https://MyAccount.blob.core.windows.net/", + AuditActionsAndGroups = auditActionsAndGroups, + StorageAccountSubscriptionId = "00000000-1234-0000-5678-000000000000", + IsStorageSecondaryKeyInUse = false + }; + sqlClient.Databases.CreateOrUpdateBlobAuditingPolicy(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + var getUpdatedDatabasePolicyResponse = sqlClient.Databases.GetBlobAuditingPolicy(resourceGroup.Name, server.Name, dbName); + // Verify that the Get request contains the updated policy. + VerifyDatabaseAuditingPolicyInformation(updatedDatabasePolicy, getUpdatedDatabasePolicyResponse); + }); + } + +#if false // Commented out due to issues with async operation response + + /// + /// Verify that the received properties match their expected values + /// + /// The expected value of the properties object + /// The properties object that needs to be checked + private void VerifyServerAuditingPolicyInformation(ServerBlobAuditingPolicy expected, ServerBlobAuditingPolicy actual) + { + Assert.Equal(expected.State, actual.State); + Assert.Equal(expected.RetentionDays, actual.RetentionDays); + Assert.Equal(expected.StorageEndpoint, actual.StorageEndpoint); + Assert.Equal(string.Empty, actual.StorageAccountAccessKey); + if (expected.AuditActionsAndGroups == null) + { + Assert.Equal(null, actual.AuditActionsAndGroups); + } + else + { + Assert.Equal(expected.AuditActionsAndGroups.Count, actual.AuditActionsAndGroups.Count); + actual.AuditActionsAndGroups.ForEach(s => Assert.True(expected.AuditActionsAndGroups.Any(es => es.Equals(s)))); + } + Assert.Equal(expected.StorageAccountSubscriptionId, actual.StorageAccountSubscriptionId); + Assert.Equal(expected.IsStorageSecondaryKeyInUse, actual.IsStorageSecondaryKeyInUse); + } + + /// + /// Returns a ServerBlobAuditingPolicy object that holds the default settings for a server blob auditing policy + /// + /// A ServerBlobAuditingPolicy object with the default server audit policy settings + private ServerBlobAuditingPolicy GetDefaultServerBlobAuditingProperties() + { + ServerBlobAuditingPolicy properties = new ServerBlobAuditingPolicy + { + State = BlobAuditingPolicyState.Disabled, + RetentionDays = 0, + StorageAccountAccessKey = string.Empty, + StorageEndpoint = string.Empty, + AuditActionsAndGroups = new List(), + StorageAccountSubscriptionId = "00000000-0000-0000-0000-000000000000", + IsStorageSecondaryKeyInUse = false, + }; + + return properties; + } + +#endif + + /// + /// Verify that the received properties match their expected values + /// + /// The expected value of the properties object + /// The properties object that needs to be checked + private void VerifyDatabaseAuditingPolicyInformation(DatabaseBlobAuditingPolicy expected, DatabaseBlobAuditingPolicy actual) + { + Assert.Equal(expected.State, actual.State); + Assert.Equal(expected.RetentionDays, actual.RetentionDays); + Assert.Equal(expected.StorageEndpoint, actual.StorageEndpoint); + Assert.Equal(string.Empty, actual.StorageAccountAccessKey); + if (expected.AuditActionsAndGroups == null) + { + Assert.Equal(null, actual.AuditActionsAndGroups); + } + else + { + Assert.Equal(expected.AuditActionsAndGroups.Count, actual.AuditActionsAndGroups.Count); + actual.AuditActionsAndGroups.ForEach(s => Assert.True(expected.AuditActionsAndGroups.Any(es => es.Equals(s)))); + } + Assert.Equal(expected.StorageAccountSubscriptionId, actual.StorageAccountSubscriptionId); + Assert.Equal(expected.IsStorageSecondaryKeyInUse, actual.IsStorageSecondaryKeyInUse); + } + + /// + /// Returns a BlobAuditingProperties object that holds the default settings for a database blob auditing policy + /// + /// A BlobAuditingProperties object with the default database audit policy settings + private DatabaseBlobAuditingPolicy GetDefaultDatabaseBlobAuditingProperties() + { + DatabaseBlobAuditingPolicy properties = new DatabaseBlobAuditingPolicy + { + State = BlobAuditingPolicyState.Disabled, + RetentionDays = 0, + StorageAccountAccessKey = string.Empty, + StorageEndpoint = string.Empty, + AuditActionsAndGroups = new List(), + StorageAccountSubscriptionId = "00000000-0000-0000-0000-000000000000", + IsStorageSecondaryKeyInUse = false, + }; + + return properties; + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/CapabilitiesScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/CapabilitiesScenarioTests.cs new file mode 100644 index 000000000000..48a45a2014ab --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/CapabilitiesScenarioTests.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Collections.Generic; +using System.Net; +using Xunit; + +namespace Sql.Tests +{ + public class CapabilitiesScenarioTests + { + [Fact] + public void TestGetCapabilities() + { + string login = "dummylogin"; + string password = "Un53cuRE!"; + string version12 = "12.0"; + string databaseName = "testdb"; + string testPrefix = "sqlcrudtest-"; + Dictionary tags = new Dictionary(); + string suiteName = this.GetType().FullName; + + using (MockContext context = MockContext.Start(suiteName, "TestGetCapabilities")) + { + var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + var resourceClient = SqlManagementTestUtilities.GetResourceManagementClient(context, handler); + var sqlClient = SqlManagementTestUtilities.GetSqlManagementClient(context, handler); + + LocationCapabilities capabilities = sqlClient.Capabilities.ListByLocation(SqlManagementTestUtilities.DefaultLocation); + + Assert.NotNull(capabilities); + + foreach(ServerVersionCapability s in capabilities.SupportedServerVersions) + { + Assert.NotNull(s.Name); + foreach(EditionCapability e in s.SupportedEditions) + { + Assert.NotNull(e.Name); + foreach (ServiceObjectiveCapability o in e.SupportedServiceLevelObjectives) + { + Assert.NotNull(o.Name); + Assert.NotNull(o.Unit); + foreach(MaxSizeCapability m in o.SupportedMaxSizes) + { + Assert.NotNull(m.Limit); + Assert.NotNull(m.Unit); + } + } + } + } + } + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs index ff570d344ca7..e6c3e11a4262 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs @@ -135,7 +135,7 @@ public void TestUpdateDatabase() // var updateEditionAndSloInput = new Database() { - Edition = DatabaseEditions.Standard, + Edition = DatabaseEdition.Standard, RequestedServiceObjectiveName = ServiceObjectiveName.S0, Location = server.Location }; @@ -157,7 +157,7 @@ public void TestUpdateDatabase() // var updateEditionInput = new Database() { - Edition = DatabaseEditions.Premium, + Edition = DatabaseEdition.Premium, Location = server.Location }; var db4 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updateEditionInput); @@ -193,24 +193,12 @@ public void TestGetAndListDatabase() string suiteName = this.GetType().FullName; SqlManagementTestUtilities.RunTestInNewV12Server(suiteName, "TestGetAndListDatabase", testPrefix, (resClient, sqlClient, resourceGroup, server) => { - // Begin creating some small databases to run the get/List tests on. - // - List> createDbTasks = new List>(); - for (int i = 0; i < 4; i++) - { - string name = SqlManagementTestUtilities.GenerateName(testPrefix); - createDbTasks.Add(sqlClient.Databases.CreateOrUpdateAsync(resourceGroup.Name, server.Name, name, - new Database() - { - Location = server.Location - })); - } + // Create some small databases to run the get/List tests on. + Database[] databases = SqlManagementTestUtilities.CreateDatabasesAsync( + sqlClient, resourceGroup.Name, server, testPrefix, 4).Result; - // Wait for all databases to be created. - IDictionary inputs = - Task.WhenAll(createDbTasks.ToArray()) - .Result - .ToDictionary( + // Organize into a dictionary for better lookup later + IDictionary inputs = databases.ToDictionary( keySelector: d => d.Name, elementSelector: d => d); @@ -292,5 +280,32 @@ public void TestRemoveDatabaseFromPool() Assert.Equal(null, dbResult.ElasticPoolName); }); } + + [Fact] + public void TestDatabaseTransparentDataEncryptionConfiguration() + { + string testPrefix = "sqlcrudtest-"; + string suiteName = this.GetType().FullName; + SqlManagementTestUtilities.RunTestInNewV12Server(suiteName, "TestDatabaseTransparentDataEncryptionConfiguration", testPrefix, (resClient, sqlClient, resourceGroup, server) => + { + // Create database only required parameters + // + string dbName = SqlManagementTestUtilities.GenerateName(testPrefix); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Get TDE config + var config = sqlClient.Databases.GetTransparentDataEncryptionConfiguration(resourceGroup.Name, server.Name, dbName); + Assert.Equal(TransparentDataEncryptionStatus.Disabled, config.Status); + + // Update TDE config + config.Status = TransparentDataEncryptionStatus.Enabled; + config = sqlClient.Databases.CreateOrUpdateTransparentDataEncryptionConfiguration(resourceGroup.Name, server.Name, dbName, config); + Assert.Equal(TransparentDataEncryptionStatus.Enabled, config.Status); + }); + } } } diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs index 656df842052a..eea57b55fd0e 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs @@ -1,4 +1,7 @@ -using Microsoft.Azure.Management.Resources; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using System; diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs index 5c05498cd522..9e213259afed 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs @@ -53,7 +53,7 @@ public void TestCreateDropElasticPool() var ep3Input = new ElasticPool() { Location = server.Location, - Edition = DatabaseEditions.Standard, + Edition = DatabaseEdition.Standard, Tags = tags, }; sqlClient.ElasticPools.CreateOrUpdate(resourceGroup.Name, server.Name, epName, ep3Input); @@ -83,7 +83,7 @@ public void TestUpdateElasticPoolAndListActivity() var epInput = new ElasticPool() { Location = server.Location, - Edition = DatabaseEditions.Standard, + Edition = DatabaseEdition.Standard, Tags = tags, Dtu = 100, DatabaseDtuMax = 20, diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/FirewallRuleCrudScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/FirewallRuleCrudScenarioTests.cs index 83e6c13eaf12..d32c2201373b 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/FirewallRuleCrudScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/FirewallRuleCrudScenarioTests.cs @@ -22,27 +22,27 @@ public void TestGetAndListFirewallRule() { // Create Firewall Rules // - Dictionary rules = new Dictionary(); + Dictionary rules = new Dictionary(); for(int i = 0; i < 4; i++) { string firewallRuleName = SqlManagementTestUtilities.GenerateName(testPrefix); - ServerFirewallRule rule = new ServerFirewallRule() + FirewallRule rule = new FirewallRule() { StartIpAddress = string.Format("0.0.0.{0}",i), EndIpAddress = string.Format("0.0.0.{0}", i) }; - sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, rule); + sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, rule); rules.Add(firewallRuleName, rule); } foreach (var rule in rules) { - ServerFirewallRule response = sqlClient.Servers.GetFirewallRule(resourceGroup.Name, server.Name, rule.Key); + FirewallRule response = sqlClient.FirewallRules.Get(resourceGroup.Name, server.Name, rule.Key); SqlManagementTestUtilities.ValidateFirewallRule(rule.Value, response, rule.Key); } - var listResponse = sqlClient.Servers.ListFirewallRules(resourceGroup.Name, server.Name); + var listResponse = sqlClient.FirewallRules.ListByServer(resourceGroup.Name, server.Name); Assert.Equal(rules.Count(), listResponse.Count()); foreach (var rule in listResponse) @@ -68,39 +68,39 @@ public void TestCreateAndDropFirewallRule() // string firewallRuleName = SqlManagementTestUtilities.GenerateName(testPrefix); - ServerFirewallRule toCreate = new ServerFirewallRule() + FirewallRule toCreate = new FirewallRule() { StartIpAddress = "0.0.0.0", EndIpAddress = "0.0.0.0" }; - var fr1 = sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, toCreate); + var fr1 = sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, toCreate); SqlManagementTestUtilities.ValidateFirewallRule(toCreate, fr1, firewallRuleName); // Create and validate Firewall Rule // firewallRuleName = SqlManagementTestUtilities.GenerateName(testPrefix); - toCreate = new ServerFirewallRule() + toCreate = new FirewallRule() { StartIpAddress = "1.1.1.1", EndIpAddress = "1.1.2.2" }; - var fr2 = sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, toCreate); + var fr2 = sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, toCreate); SqlManagementTestUtilities.ValidateFirewallRule(toCreate, fr2, firewallRuleName); // Create and validate Firewall Rule // firewallRuleName = SqlManagementTestUtilities.GenerateName(testPrefix); - toCreate = new ServerFirewallRule() + toCreate = new FirewallRule() { StartIpAddress = "0.0.0.0", EndIpAddress = "255.255.255.255" }; - var fr3 = sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, toCreate); + var fr3 = sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, toCreate); SqlManagementTestUtilities.ValidateFirewallRule(toCreate, fr3, firewallRuleName); - sqlClient.Servers.DeleteFirewallRule(resourceGroup.Name, server.Name, fr1.Name); - sqlClient.Servers.DeleteFirewallRule(resourceGroup.Name, server.Name, fr2.Name); - sqlClient.Servers.DeleteFirewallRule(resourceGroup.Name, server.Name, fr3.Name); + sqlClient.FirewallRules.Delete(resourceGroup.Name, server.Name, fr1.Name); + sqlClient.FirewallRules.Delete(resourceGroup.Name, server.Name, fr2.Name); + sqlClient.FirewallRules.Delete(resourceGroup.Name, server.Name, fr3.Name); }); } @@ -115,21 +115,21 @@ public void TestCreateAndUpdateFirewallRule() // string firewallRuleName = SqlManagementTestUtilities.GenerateName(testPrefix); - ServerFirewallRule toCreate = new ServerFirewallRule() + FirewallRule toCreate = new FirewallRule() { StartIpAddress = "0.0.0.0", EndIpAddress = "0.0.0.0" }; - var fr1 = sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, toCreate); + var fr1 = sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, toCreate); SqlManagementTestUtilities.ValidateFirewallRule(toCreate, fr1, firewallRuleName); // Update Firewall Rule and Validate - toCreate = new ServerFirewallRule() + toCreate = new FirewallRule() { StartIpAddress = "1.1.1.1", EndIpAddress = "255.255.255.255" }; - fr1 = sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, firewallRuleName, toCreate); + fr1 = sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, firewallRuleName, toCreate); SqlManagementTestUtilities.ValidateFirewallRule(toCreate, fr1, firewallRuleName); }); } diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/ImportExportScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/ImportExportScenarioTests.cs index 31b125a44e8a..ee8fa1b0164f 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/ImportExportScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/ImportExportScenarioTests.cs @@ -47,7 +47,7 @@ public void TestImportExport(bool preexistingDatabase, string testPrefix, string }; // set server firewall rule - sqlClient.Servers.CreateOrUpdateFirewallRule(resourceGroup.Name, server.Name, SqlManagementTestUtilities.GenerateName(testPrefix), new ServerFirewallRule() + sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, SqlManagementTestUtilities.GenerateName(testPrefix), new FirewallRule() { StartIpAddress = "0.0.0.0", EndIpAddress = "255.255.255.255" @@ -87,7 +87,7 @@ public void TestImportExport(bool preexistingDatabase, string testPrefix, string } // Export database to bacpac - sqlClient.Databases.Export(resourceGroup.Name, server.Name, dbName, new ExportRequestParameters() + sqlClient.Databases.Export(resourceGroup.Name, server.Name, dbName, new ExportRequest() { AdministratorLogin = login, AdministratorLoginPassword = password, @@ -101,7 +101,7 @@ public void TestImportExport(bool preexistingDatabase, string testPrefix, string if (preexistingDatabase) { // Import bacpac to existing database - sqlClient.Databases.Import(resourceGroup.Name, server.Name, dbName2, new ImportExtensionRequestParameters() + sqlClient.Databases.CreateImportOperation(resourceGroup.Name, server.Name, dbName2, new ImportExtensionRequest() { AdministratorLogin = login, AdministratorLoginPassword = password, @@ -113,7 +113,7 @@ public void TestImportExport(bool preexistingDatabase, string testPrefix, string } else { - sqlClient.Servers.ImportDatabase(resourceGroup.Name, server.Name, new ImportRequestParameters() + sqlClient.Databases.Import(resourceGroup.Name, server.Name, new ImportRequest() { AdministratorLogin = login, AdministratorLoginPassword = password, @@ -127,24 +127,6 @@ public void TestImportExport(bool preexistingDatabase, string testPrefix, string MaxSizeBytes = (2 * 1024L * 1024L * 1024L).ToString(), }); } - - // List Server import/export operations - IEnumerable listOperationResponse = sqlClient.ImportExportOperations.ListByServer(resourceGroup.Name, server.Name); - Assert.Equal(2, listOperationResponse.Count()); - Assert.Equal(1, listOperationResponse.Count(o => o.RequestType.Equals("Export") && o.DatabaseName.Equals(dbName))); - Assert.Equal(1, listOperationResponse.Count(o => o.RequestType.Equals("Import") && o.DatabaseName.Equals(dbName2))); - - // Get Server import/export operation - foreach (ImportExportOperationResponse operation in listOperationResponse) - { - ImportExportOperationResponse getOperationResponse = sqlClient.ImportExportOperations.GetByServer(resourceGroup.Name, server.Name, - operation.RequestId.Value); - Assert.NotNull(getOperationResponse); - - ImportExportOperationResponse getByDbResponse = sqlClient.ImportExportOperations.GetByDatabase(resourceGroup.Name, server.Name, - getOperationResponse.DatabaseName, operation.RequestId.Value); - Assert.NotNull(getByDbResponse); - } }); } } diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/ServerCrudScenarioTests.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/ServerCrudScenarioTests.cs index fdf23b59e6f9..e476c59d0534 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/ServerCrudScenarioTests.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/ServerCrudScenarioTests.cs @@ -57,11 +57,11 @@ public void TestCreateUpdateGetDropServer() SqlManagementTestUtilities.ValidateServer(v2Server, serverNameV2, login, version12, tags, SqlManagementTestUtilities.DefaultLocation); // Get first server - var getV12Server = sqlClient.Servers.GetByResourceGroup(resourceGroup.Name, serverNameV12); + var getV12Server = sqlClient.Servers.Get(resourceGroup.Name, serverNameV12); SqlManagementTestUtilities.ValidateServer(getV12Server, serverNameV12, login, version12, tags, SqlManagementTestUtilities.DefaultLocation); // Get second server - var getV2Server = sqlClient.Servers.GetByResourceGroup(resourceGroup.Name, serverNameV2); + var getV2Server = sqlClient.Servers.Get(resourceGroup.Name, serverNameV2); SqlManagementTestUtilities.ValidateServer(getV2Server, serverNameV2, login, version12, tags, SqlManagementTestUtilities.DefaultLocation); var listServers = sqlClient.Servers.ListByResourceGroup(resourceGroup.Name); diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestBlobAuditing.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestBlobAuditing.json new file mode 100644 index 000000000000..396870db9ace --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestBlobAuditing.json @@ -0,0 +1,1090 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-blob-auditing-test-7677?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Nz9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"server-blob-auditing-test-7677\": \"2017-03-11 02:04:32Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "113" + ], + "x-ms-client-request-id": [ + "c2b4478b-11ad-4b1d-96f4-90fcb61f6903" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677\",\r\n \"name\": \"server-blob-auditing-test-7677\",\r\n \"location\": \"japaneast\",\r\n \"tags\": {\r\n \"server-blob-auditing-test-7677\": \"2017-03-11 02:04:32Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "281" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:04:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "b809b1f0-a365-4761-8547-64f86de8d648" + ], + "x-ms-correlation-request-id": [ + "b809b1f0-a365-4761-8547-64f86de8d648" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020435Z:b809b1f0-a365-4761-8547-64f86de8d648" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Nz9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\"\r\n },\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "216" + ], + "x-ms-client-request-id": [ + "61f1c380-bd38-4c66-a06e-56bd5771f48d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057\",\r\n \"name\": \"server-blob-auditing-test-1057\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"server-blob-auditing-test-1057.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "580" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:05:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "389e5284-44eb-4d4b-a55d-2641bd68735c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "5316e44d-def0-4972-bba7-664d3fb90f61" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020511Z:5316e44d-def0-4972-bba7-664d3fb90f61" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "d6a38c5e-0f7e-485b-85e7-50a88d20e33f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T18:05:13.154-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:05:12 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/operationResults/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "80de9388-76e0-416e-b4ad-395a2e1557e2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/azureAsyncOperation/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "43590fea-6ffb-4829-bf48-decd6131ff3a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020513Z:43590fea-6ffb-4829-bf48-decd6131ff3a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC04Nzg0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "7d5fefd3-a802-45c9-ab6a-7f44a70d34a2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T18:05:14.701-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:05:14 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/operationResults/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "4024ff64-bc01-4a91-9c3c-4fb313d69774" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/azureAsyncOperation/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "16b03468-3bcc-41ed-a25e-41be724c36f7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020514Z:16b03468-3bcc-41ed-a25e-41be724c36f7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/azureAsyncOperation/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2L2F6dXJlQXN5bmNPcGVyYXRpb24vODBkZTkzODgtNzZlMC00MTZlLWI0YWQtMzk1YTJlMTU1N2UyP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"80de9388-76e0-416e-b4ad-395a2e1557e2\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:05:44 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0226ac9e-3428-4a77-8066-86db78f77446" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/azureAsyncOperation/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "66b2fb3d-e69b-4a48-a1a0-6dc2e3127dd5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020544Z:66b2fb3d-e69b-4a48-a1a0-6dc2e3127dd5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/azureAsyncOperation/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2L2F6dXJlQXN5bmNPcGVyYXRpb24vODBkZTkzODgtNzZlMC00MTZlLWI0YWQtMzk1YTJlMTU1N2UyP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"80de9388-76e0-416e-b4ad-395a2e1557e2\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:14 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c481c26d-33f7-468c-acf8-dd4a893a1971" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/azureAsyncOperation/80de9388-76e0-416e-b4ad-395a2e1557e2?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "669ca02e-b271-40b8-9e47-db97462ed05e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020615Z:669ca02e-b271-40b8-9e47-db97462ed05e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/azureAsyncOperation/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC04Nzg0L2F6dXJlQXN5bmNPcGVyYXRpb24vNDAyNGZmNjQtYmMwMS00YTkxLTljM2MtNGZiMzEzZDY5Nzc0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"4024ff64-bc01-4a91-9c3c-4fb313d69774\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:05:45 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3cdbdcce-89b9-4c02-918b-51e21769a5dd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/azureAsyncOperation/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "98cc66e1-a49d-4262-b957-68d2a222522e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020545Z:98cc66e1-a49d-4262-b957-68d2a222522e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/azureAsyncOperation/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC04Nzg0L2F6dXJlQXN5bmNPcGVyYXRpb24vNDAyNGZmNjQtYmMwMS00YTkxLTljM2MtNGZiMzEzZDY5Nzc0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"4024ff64-bc01-4a91-9c3c-4fb313d69774\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:15 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d85adfba-74ea-47a4-b3ab-a3b01493ddf2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784/azureAsyncOperation/4024ff64-bc01-4a91-9c3c-4fb313d69774?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "b61477ae-2018-42a1-81f1-a8e558f9c182" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020616Z:b61477ae-2018-42a1-81f1-a8e558f9c182" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876\",\r\n \"name\": \"server-blob-auditing-test-7876\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"177e246a-28d6-4143-94f4-0b9840b66bfa\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T02:05:13.453Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:16:01.35Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:15 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f157c8f0-a8ca-4785-a427-26a793b0f392" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "2c2aab32-a1f9-4145-8c56-ba8e5a90d05d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020616Z:2c2aab32-a1f9-4145-8c56-ba8e5a90d05d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC04Nzg0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-8784\",\r\n \"name\": \"server-blob-auditing-test-8784\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"d59f3586-6f81-41ac-8efa-7993a3fb8a77\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T02:05:14.967Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:15:47.687Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:16 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0288670f-a620-4992-b635-bd573578f5d2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "64cb25ff-1235-43e6-a701-ebb4bba9ef4f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020617Z:64cb25ff-1235-43e6-a701-ebb4bba9ef4f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2L2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e8b749b-b249-414c-b2fe-f6ae86ba6560" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 0,\r\n \"auditActionsAndGroups\": [],\r\n \"storageAccountSubscriptionId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "204f9abb-624c-486d-9827-834968aeee5b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "cfb98c04-7e70-4e4a-a517-50252a0f3996" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020618Z:cfb98c04-7e70-4e4a-a517-50252a0f3996" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2L2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d6bb1e4-53a8-4219-9684-2345fc8d2f88" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2e80c5f4-24ef-4071-95ab-800604a2e974" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "0e5df406-4ac9-4409-83f5-b108a19d270e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020621Z:0e5df406-4ac9-4409-83f5-b108a19d270e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMTA1Ny9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC03ODc2L2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "507" + ], + "x-ms-client-request-id": [ + "89a6a948-5e13-4dc0-87dc-047ad710634b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-7677/providers/Microsoft.Sql/servers/server-blob-auditing-test-1057/databases/server-blob-auditing-test-7876/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d3713542-7be9-4e1c-9101-804f64d1cfa2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "c7d95d85-d84f-431e-ad80-c51297912088" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020620Z:c7d95d85-d84f-431e-ad80-c51297912088" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-blob-auditing-test-7677?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNzY3Nz9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b183b23a-3f74-4f8b-83b3-4e123fdab0a6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "258b4b5d-956f-4d40-9b29-681de104e984" + ], + "x-ms-correlation-request-id": [ + "258b4b5d-956f-4d40-9b29-681de104e984" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020624Z:258b4b5d-956f-4d40-9b29-681de104e984" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVOelkzTnkxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:06:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "0f6e45ec-1698-4aff-a173-137f731916c3" + ], + "x-ms-correlation-request-id": [ + "0f6e45ec-1698-4aff-a173-137f731916c3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020655Z:0f6e45ec-1698-4aff-a173-137f731916c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVOelkzTnkxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:07:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "3c16ac4f-a61a-4c6f-ba27-fbf79f40fc9d" + ], + "x-ms-correlation-request-id": [ + "3c16ac4f-a61a-4c6f-ba27-fbf79f40fc9d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020725Z:3c16ac4f-a61a-4c6f-ba27-fbf79f40fc9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVOelkzTnkxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:07:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "7c3cbf05-77c0-40cf-ae02-f2b455dd1a05" + ], + "x-ms-correlation-request-id": [ + "7c3cbf05-77c0-40cf-ae02-f2b455dd1a05" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020756Z:7c3cbf05-77c0-40cf-ae02-f2b455dd1a05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJENzY3Ny1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVOelkzTnkxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:08:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "d2d37010-d1ad-4b00-9882-893f22c889d0" + ], + "x-ms-correlation-request-id": [ + "d2d37010-d1ad-4b00-9882-893f22c889d0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020826Z:d2d37010-d1ad-4b00-9882-893f22c889d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "RunTestInNewResourceGroup": [ + "server-blob-auditing-test-7677" + ], + "RunTestInNewV12Server": [ + "server-blob-auditing-test-1057" + ], + "CreateDatabasesAsync": [ + "server-blob-auditing-test-7876", + "server-blob-auditing-test-8784" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestServerBlobAuditing.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestServerBlobAuditing.json new file mode 100644 index 000000000000..4bad829d095f --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.BlobAuditingTest/TestServerBlobAuditing.json @@ -0,0 +1,1090 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-blob-auditing-test-3094?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5ND9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"server-blob-auditing-test-3094\": \"2017-03-11 01:22:11Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "113" + ], + "x-ms-client-request-id": [ + "0a8b19e8-78f7-412c-95da-4b8736a2a51a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094\",\r\n \"name\": \"server-blob-auditing-test-3094\",\r\n \"location\": \"japaneast\",\r\n \"tags\": {\r\n \"server-blob-auditing-test-3094\": \"2017-03-11 01:22:11Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "281" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:22:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "d4010685-e767-424f-bdf6-e52d9e0bbf8b" + ], + "x-ms-correlation-request-id": [ + "d4010685-e767-424f-bdf6-e52d9e0bbf8b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012213Z:d4010685-e767-424f-bdf6-e52d9e0bbf8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\"\r\n },\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "216" + ], + "x-ms-client-request-id": [ + "aee5d242-0139-4c9b-905d-f09e4660ab1f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716\",\r\n \"name\": \"server-blob-auditing-test-6716\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"server-blob-auditing-test-6716.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "580" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:22:47 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d4415ba6-7d1b-4710-afd7-8399e2c99131" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7cb3f405-6def-480f-8a4e-6ac2130f1c74" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012248Z:7cb3f405-6def-480f-8a4e-6ac2130f1c74" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "06c33f53-7fb4-4f93-bb91-17e401da4dce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T17:22:50.079-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:22:49 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/operationResults/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "3670d882-a7b3-4af4-82be-383a5614e23e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/azureAsyncOperation/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "1682d2ac-e4ef-41a4-be04-aa4046fbc764" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012250Z:1682d2ac-e4ef-41a4-be04-aa4046fbc764" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC00NDIyP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "09abe725-61d2-4e9d-8e48-8c7e503d5828" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T17:22:49.647-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:22:50 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/operationResults/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "b335a86b-bec4-45ae-86d2-2912d7c3191c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/azureAsyncOperation/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "7c143411-51d7-4912-bd7b-7d6de2f4f172" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012251Z:7c143411-51d7-4912-bd7b-7d6de2f4f172" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/azureAsyncOperation/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzL2F6dXJlQXN5bmNPcGVyYXRpb24vMzY3MGQ4ODItYTdiMy00YWY0LTgyYmUtMzgzYTU2MTRlMjNlP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"3670d882-a7b3-4af4-82be-383a5614e23e\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:20 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d4e1c6cc-7938-491a-8fdb-daba91514cda" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/azureAsyncOperation/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "1e7b4e98-f210-4855-a52d-2e4edb7274c3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012321Z:1e7b4e98-f210-4855-a52d-2e4edb7274c3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/azureAsyncOperation/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzL2F6dXJlQXN5bmNPcGVyYXRpb24vMzY3MGQ4ODItYTdiMy00YWY0LTgyYmUtMzgzYTU2MTRlMjNlP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"3670d882-a7b3-4af4-82be-383a5614e23e\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:51 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d6ac73b4-6f45-462c-9ebc-825dbd76eb67" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/azureAsyncOperation/3670d882-a7b3-4af4-82be-383a5614e23e?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "157c4c27-2c25-464b-93fb-56ec8b82a2dd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012351Z:157c4c27-2c25-464b-93fb-56ec8b82a2dd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/azureAsyncOperation/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC00NDIyL2F6dXJlQXN5bmNPcGVyYXRpb24vYjMzNWE4NmItYmVjNC00NWFlLTg2ZDItMjkxMmQ3YzMxOTFjP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"b335a86b-bec4-45ae-86d2-2912d7c3191c\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:21 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b7426540-f5ba-42c4-ad13-caf7d8c5fbcc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/azureAsyncOperation/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "a8c16e62-9486-45fb-8e82-9d2970036ce0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012321Z:a8c16e62-9486-45fb-8e82-9d2970036ce0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/azureAsyncOperation/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC00NDIyL2F6dXJlQXN5bmNPcGVyYXRpb24vYjMzNWE4NmItYmVjNC00NWFlLTg2ZDItMjkxMmQ3YzMxOTFjP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"b335a86b-bec4-45ae-86d2-2912d7c3191c\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:52 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8f94f1f4-2c1d-4727-9448-6c295ecea5ca" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422/azureAsyncOperation/b335a86b-bec4-45ae-86d2-2912d7c3191c?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "ec22fd2a-a86b-4a28-a161-5cc52ccce429" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012352Z:ec22fd2a-a86b-4a28-a161-5cc52ccce429" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923\",\r\n \"name\": \"server-blob-auditing-test-6923\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"4d62eb0f-93b5-4059-9db7-87587c58e625\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T01:22:50.33Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T01:33:22.853Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:51 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b3339e2a-2ebe-4c1a-b1f6-a930b968e34d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "94feb91e-d442-4284-a866-1dc3784f71da" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012352Z:94feb91e-d442-4284-a866-1dc3784f71da" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC00NDIyP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-4422\",\r\n \"name\": \"server-blob-auditing-test-4422\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"e2b3efc4-79c3-4f06-a400-078ca7d1b253\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T01:22:49.897Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T01:33:33.437Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:52 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "652b5474-5efb-4419-a25d-e1bfc3a5e696" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "aae570ab-9cf0-4c6f-8acb-597b7761e29e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012353Z:aae570ab-9cf0-4c6f-8acb-597b7761e29e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzL2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a13e62e7-1293-4250-837e-af04988f175a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 0,\r\n \"auditActionsAndGroups\": [],\r\n \"storageAccountSubscriptionId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e0ea1edf-bbbe-4a9e-b7b7-0b0b46662620" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "c9f3218b-3245-46ec-92d6-49546a72bd51" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012354Z:c9f3218b-3245-46ec-92d6-49546a72bd51" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzL2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7d31c6a7-cfa1-4e59-a428-ab683f672354" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4f97eb4a-69ea-49e1-a858-b7aa8cdbc3d9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "a400874d-82e6-4d2f-abe9-8561d28e1d3b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012356Z:a400874d-82e6-4d2f-abe9-8561d28e1d3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/default?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtNjcxNi9kYXRhYmFzZXMvc2VydmVyLWJsb2ItYXVkaXRpbmctdGVzdC02OTIzL2F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "507" + ], + "x-ms-client-request-id": [ + "9b1bacfc-313f-4eb9-8c2a-9c8378bc9b90" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-blob-auditing-test-3094/providers/Microsoft.Sql/servers/server-blob-auditing-test-6716/databases/server-blob-auditing-test-6923/auditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/auditingSettings\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5,\r\n \"auditActionsAndGroups\": [\r\n \"SCHEMA_OBJECT_ACCESS_GROUP\",\r\n \"UPDATE on database::testdb by public\"\r\n ],\r\n \"storageAccountSubscriptionId\": \"00000000-1234-0000-5678-000000000000\",\r\n \"isStorageSecondaryKeyInUse\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "22fccd80-9b96-422f-bf4c-973a0dbe7011" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "41180861-22b4-472d-bd0d-13f9ba8ad3f5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012355Z:41180861-22b4-472d-bd0d-13f9ba8ad3f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-blob-auditing-test-3094?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1ibG9iLWF1ZGl0aW5nLXRlc3QtMzA5ND9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "34c47869-d5bb-4a2b-927b-32b5e23b8c8d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:23:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "cbc0cb78-1362-4556-901e-331bbd7ea095" + ], + "x-ms-correlation-request-id": [ + "cbc0cb78-1362-4556-901e-331bbd7ea095" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012358Z:cbc0cb78-1362-4556-901e-331bbd7ea095" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVNekE1TkMxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:24:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "692f032b-bffb-48da-8e24-4b6f87b83a4e" + ], + "x-ms-correlation-request-id": [ + "692f032b-bffb-48da-8e24-4b6f87b83a4e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012428Z:692f032b-bffb-48da-8e24-4b6f87b83a4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVNekE1TkMxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:24:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "b498416b-401d-4c6e-aa9d-89be5f564ce4" + ], + "x-ms-correlation-request-id": [ + "b498416b-401d-4c6e-aa9d-89be5f564ce4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012459Z:b498416b-401d-4c6e-aa9d-89be5f564ce4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVNekE1TkMxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:25:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "4c7f623c-1285-4fa0-8323-758c0d624067" + ], + "x-ms-correlation-request-id": [ + "4c7f623c-1285-4fa0-8323-758c0d624067" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012529Z:4c7f623c-1285-4fa0-8323-758c0d624067" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRCTE9COjJEQVVESVRJTkc6MkRURVNUOjJEMzA5NC1KQVBBTkVBU1QiLCJqb2JMb2NhdGlvbiI6ImphcGFuZWFzdCJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JDVEU5Q09qSkVRVlZFU1ZSSlRrYzZNa1JVUlZOVU9qSkVNekE1TkMxS1FWQkJUa1ZCVTFRaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW1waGNHRnVaV0Z6ZENKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:25:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "3cc098dc-0081-4282-bbf7-107e052e857c" + ], + "x-ms-correlation-request-id": [ + "3cc098dc-0081-4282-bbf7-107e052e857c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170311T012559Z:3cc098dc-0081-4282-bbf7-107e052e857c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "RunTestInNewResourceGroup": [ + "server-blob-auditing-test-3094" + ], + "RunTestInNewV12Server": [ + "server-blob-auditing-test-6716" + ], + "CreateDatabasesAsync": [ + "server-blob-auditing-test-6923", + "server-blob-auditing-test-4422" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.CapabilitiesScenarioTests/TestGetCapabilities.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.CapabilitiesScenarioTests/TestGetCapabilities.json new file mode 100644 index 000000000000..f9d551f354a8 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.CapabilitiesScenarioTests/TestGetCapabilities.json @@ -0,0 +1,69 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/2e7fe4bd-90c7-454e-8bb6-dc44649f27b2/providers/Microsoft.Sql/locations/Japan%20East/capabilities?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmU3ZmU0YmQtOTBjNy00NTRlLThiYjYtZGM0NDY0OWYyN2IyL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL2xvY2F0aW9ucy9KYXBhbiUyMEVhc3QvY2FwYWJpbGl0aWVzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94353b89-fa66-40a2-bcc9-2e8f0f8f69b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"name\": \"Japan East\",\r\n \"status\": \"Available\",\r\n \"supportedServerVersions\": [\r\n {\r\n \"name\": \"2.0\",\r\n \"status\": \"Visible\",\r\n \"supportedEditions\": [\r\n {\r\n \"name\": \"Web\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"name\": \"Shared\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Business\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"name\": \"Shared\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Basic\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"dd6d99bb-f193-4ec1-86f2-43d3bccbc49c\",\r\n \"name\": \"Basic\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 5,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Standard\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"name\": \"S0\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 10,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"1b1ebd4d-d903-4baa-97f9-4ea675f5e928\",\r\n \"name\": \"S1\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 20,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"455330e1-00cd-488b-b5fa-177c226f28b7\",\r\n \"name\": \"S2\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 50,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Premium\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"7203483a-c4fb-4304-9e9f-17c71c904f5d\",\r\n \"name\": \"P1\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 100,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0\",\r\n \"name\": \"P2\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 200,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"a7c4c615-cfb1-464b-b252-925be0a19446\",\r\n \"name\": \"P3\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 800,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"43940481-9191-475a-9dba-6b505615b9aa\",\r\n \"name\": \"P6\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 800,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"System\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"name\": \"System\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"12.0\",\r\n \"status\": \"Default\",\r\n \"supportedEditions\": [\r\n {\r\n \"name\": \"System\",\r\n \"status\": \"Visible\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"name\": \"System\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"29dd7459-4a7c-4e56-be22-f0adda49440d\",\r\n \"name\": \"System0\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"c99ac918-dbea-463f-a475-16ec020fdc12\",\r\n \"name\": \"System1\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"name\": \"System2\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"33d0db1f-6893-4210-99f9-463fb9b496a4\",\r\n \"name\": \"System3\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"da24338c-a6c9-46c2-a4bf-4ac95b496ae4\",\r\n \"name\": \"System4\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"53f7fa1b-b0d0-43d6-bc29-c5f059fb36e9\",\r\n \"name\": \"System2L\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"e79cd55c-689f-48d9-bffa-0dd12c772248\",\r\n \"name\": \"System3L\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"4b37bb6d-e004-47ac-8f7a-be56ac9fb490\",\r\n \"name\": \"System4L\",\r\n \"status\": \"Visible\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Visible\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 0,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Free\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"6aa3bb3e-7f50-40d6-95ef-5497c30d99d8\",\r\n \"name\": \"Free\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 32,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 5,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Basic\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"dd6d99bb-f193-4ec1-86f2-43d3bccbc49c\",\r\n \"name\": \"Basic\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 5,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Standard\",\r\n \"status\": \"Default\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"name\": \"S0\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 10,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"1b1ebd4d-d903-4baa-97f9-4ea675f5e928\",\r\n \"name\": \"S1\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 20,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"455330e1-00cd-488b-b5fa-177c226f28b7\",\r\n \"name\": \"S2\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 50,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"789681b8-ca10-4eb0-bdf2-e0b050601b40\",\r\n \"name\": \"S3\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 100,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Premium\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"7203483a-c4fb-4304-9e9f-17c71c904f5d\",\r\n \"name\": \"P1\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 125,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0\",\r\n \"name\": \"P2\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"afe1eee1-1f12-4e5f-9ad6-2de9c12cb4dc\",\r\n \"name\": \"P4\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"43940481-9191-475a-9dba-6b505615b9aa\",\r\n \"name\": \"P6\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 1000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"dd00d544-bbc0-4f61-ba60-cdce0c410288\",\r\n \"name\": \"P11\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 4,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 1750,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"5bc86cca-9a96-4a94-90ef-bbdfcfbf2d71\",\r\n \"name\": \"P15\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 4,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 4000,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"PremiumRS\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"dfdc102c-ed02-4349-9756-e227f0e43bb8\",\r\n \"name\": \"PRS1\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 125,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"a089506e-b47a-4f42-8a32-cc19af4c86fb\",\r\n \"name\": \"PRS2\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"39cb8faf-cba8-4b1b-b580-1e1202f2a024\",\r\n \"name\": \"PRS4\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"1e8da92e-efcd-4682-9140-bf6582120d1f\",\r\n \"name\": \"PRS6\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Megabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 2,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 300,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 400,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Default\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 1000,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"DataWarehouse\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"4e63cb0e-91b9-46fd-b05c-51fdd2367618\",\r\n \"name\": \"DW100\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 750,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"99e78a92-d724-4e1b-857b-2be661f3d153\",\r\n \"name\": \"DW200\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 1500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"284f1aff-fee7-4d3b-a211-5b8ebdd28fea\",\r\n \"name\": \"DW300\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 2250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"3bdaeefe-8a9d-41d3-91c4-46ef896b19af\",\r\n \"name\": \"DW400\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 3000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"5f759b78-8ec0-4dfb-97cc-c1455a3b5b4d\",\r\n \"name\": \"DW500\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 3750,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"efd65c5b-af7b-4389-9109-f6a69d6a3885\",\r\n \"name\": \"DW600\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 4500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"b89b9c6a-4ec2-4eb8-99db-6d2807e6aabb\",\r\n \"name\": \"DW1000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 7500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"9a7a374e-b95c-4fd5-a68e-131d60796c47\",\r\n \"name\": \"DW1200\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 9000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"b930f58e-86b5-43e0-a2da-d8bf8769c557\",\r\n \"name\": \"DW1500\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 11250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"99165ede-a5ab-4b52-b317-e391d92ec370\",\r\n \"name\": \"DW2000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 15000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"8e28c923-5cf2-43cb-bd25-28c8c69b30ff\",\r\n \"name\": \"DW3000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 22500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"ee1df062-4f3c-42ad-91bf-58b2a7c351e4\",\r\n \"name\": \"DW6000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 45000,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Stretch\",\r\n \"status\": \"Available\",\r\n \"supportedServiceLevelObjectives\": [\r\n {\r\n \"id\": \"9cfc850f-d57f-4760-b5a6-bb640d268bf0\",\r\n \"name\": \"DS100\",\r\n \"status\": \"Default\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 750,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"053407ef-f01c-46f4-b829-96e01a14f449\",\r\n \"name\": \"DS200\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 1500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"013a9e10-cafc-45a8-8fcf-93095655d2ce\",\r\n \"name\": \"DS300\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 2250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"79f61db4-8c10-46ba-a93a-d7d02dddd61c\",\r\n \"name\": \"DS400\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 3000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"44eaac33-df00-4ef4-a2bb-f7ff87899eea\",\r\n \"name\": \"DS500\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 3750,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"f8e0f3a6-888b-459c-a9dd-d74d8b2b0e72\",\r\n \"name\": \"DS600\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 4500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"b9ed8f51-a414-42dc-8348-e4a1de25e12b\",\r\n \"name\": \"DS1000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 7500,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"07479569-6d70-47a5-8db6-0af55d34f2c1\",\r\n \"name\": \"DS1200\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 9000,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"2d79baec-2879-46d5-9f5d-fb70eb004c4e\",\r\n \"name\": \"DS1500\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 11250,\r\n \"unit\": \"DTU\"\r\n }\r\n },\r\n {\r\n \"id\": \"7fb5389f-6d15-4e0b-9540-fe5ecdfdbeee\",\r\n \"name\": \"DS2000\",\r\n \"status\": \"Available\",\r\n \"supportedMaxSizes\": [\r\n {\r\n \"limit\": 250,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 500,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 750,\r\n \"unit\": \"Gigabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 1,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 5,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 10,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Default\"\r\n },\r\n {\r\n \"limit\": 20,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 30,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 40,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 50,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 60,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 70,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 80,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 90,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 100,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 150,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 200,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n },\r\n {\r\n \"limit\": 240,\r\n \"unit\": \"Terabytes\",\r\n \"status\": \"Available\"\r\n }\r\n ],\r\n \"performanceLevel\": {\r\n \"value\": 15000,\r\n \"unit\": \"DTU\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 22:44:41 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3fb1949b-44ce-4cda-b303-64bcdf0bf9cc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "4e272598-24f8-44a2-8af8-0e68e2c97890" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T224442Z:4e272598-24f8-44a2-8af8-0e68e2c97890" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "2e7fe4bd-90c7-454e-8bb6-dc44649f27b2" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestDatabaseTransparentDataEncryptionConfiguration.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestDatabaseTransparentDataEncryptionConfiguration.json new file mode 100644 index 000000000000..b9c642ba25b1 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestDatabaseTransparentDataEncryptionConfiguration.json @@ -0,0 +1,784 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-4753?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTM/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"sqlcrudtest-4753\": \"2017-03-15 17:10:17Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "99" + ], + "x-ms-client-request-id": [ + "8311808b-aea7-41fb-aa90-f61a2302e3f0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753\",\r\n \"name\": \"sqlcrudtest-4753\",\r\n \"location\": \"japaneast\",\r\n \"tags\": {\r\n \"sqlcrudtest-4753\": \"2017-03-15 17:10:17Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "239" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:10:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "59613960-c3fd-4ef8-8109-cdf3670bfe09" + ], + "x-ms-correlation-request-id": [ + "59613960-c3fd-4ef8-8109-cdf3670bfe09" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171019Z:59613960-c3fd-4ef8-8109-cdf3670bfe09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\"\r\n },\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "216" + ], + "x-ms-client-request-id": [ + "cc3ea7a7-423d-41b2-905c-41c7816e6ea4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619\",\r\n \"name\": \"sqlcrudtest-3619\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"sqlcrudtest-3619.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "524" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:11:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "633e37b1-851a-49a3-a691-952b20f2a3be" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "94922821-3bc4-49c5-b328-2c9101aba957" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171101Z:94922821-3bc4-49c5-b328-2c9101aba957" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "dc621849-caa7-4f21-a657-750e26c1447b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-15T10:11:01.551-07:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:11:02 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/operationResults/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "c3dfd01a-8457-4f35-a220-80f3ee77883b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/azureAsyncOperation/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "8568a5b2-785a-41ca-a749-098809029d8e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171102Z:8568a5b2-785a-41ca-a749-098809029d8e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/azureAsyncOperation/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5L2F6dXJlQXN5bmNPcGVyYXRpb24vYzNkZmQwMWEtODQ1Ny00ZjM1LWEyMjAtODBmM2VlNzc4ODNiP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"c3dfd01a-8457-4f35-a220-80f3ee77883b\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:11:33 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8fe6e35c-f3ad-45cb-b025-5b5a675be8c7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/azureAsyncOperation/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "26e6314a-dc7a-4dd3-a66f-7ace289f3d7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171133Z:26e6314a-dc7a-4dd3-a66f-7ace289f3d7f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/azureAsyncOperation/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5L2F6dXJlQXN5bmNPcGVyYXRpb24vYzNkZmQwMWEtODQ1Ny00ZjM1LWEyMjAtODBmM2VlNzc4ODNiP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"c3dfd01a-8457-4f35-a220-80f3ee77883b\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:04 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7399813d-fbd2-4ce2-8a2e-bc37cb6d0967" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/azureAsyncOperation/c3dfd01a-8457-4f35-a220-80f3ee77883b?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "80aaf643-9047-424b-a9db-e2b5e6d8caec" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171204Z:80aaf643-9047-424b-a9db-e2b5e6d8caec" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359\",\r\n \"name\": \"sqlcrudtest-6359\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"db2cfd1c-5c0c-4756-abf2-d4c970620618\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-15T17:11:01.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-15T17:21:40.163Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:05 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1eb6c51d-d554-4ccb-847c-d9b9534e8475" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "b2209473-f0c3-4b30-b4f8-584023137dfc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171205Z:b2209473-f0c3-4b30-b4f8-584023137dfc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/transparentDataEncryption/current?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5L3RyYW5zcGFyZW50RGF0YUVuY3J5cHRpb24vY3VycmVudD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "da98711d-0b8a-4575-856d-4e3064da2565" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"name\": \"current\",\r\n \"location\": \"Japan East\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/transparentDataEncryption/current\",\r\n \"type\": \"Microsoft.Sql/servers/databases/transparentDataEncryption\",\r\n \"properties\": {\r\n \"status\": \"Disabled\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:06 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "605d92dd-c5b9-4f9c-97ad-79df617c880a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "1549581b-0058-4bc9-9f8d-3b27d133189a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171206Z:1549581b-0058-4bc9-9f8d-3b27d133189a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/transparentDataEncryption/current?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNjE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzU5L3RyYW5zcGFyZW50RGF0YUVuY3J5cHRpb24vY3VycmVudD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"status\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "53" + ], + "x-ms-client-request-id": [ + "635c8ceb-60db-49c6-ba99-a32516c49365" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.3.0-preview" + ] + }, + "ResponseBody": "{\r\n \"name\": \"current\",\r\n \"location\": null,\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-4753/providers/Microsoft.Sql/servers/sqlcrudtest-3619/databases/sqlcrudtest-6359/transparentDataEncryption/current\",\r\n \"type\": \"Microsoft.Sql/servers/databases/transparentDataEncryption\",\r\n \"properties\": {\r\n \"status\": \"Enabled\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:08 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "764690ac-b906-438a-a303-52a6b3de589b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "084886bc-d84f-4105-9775-06263fde990e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171209Z:084886bc-d84f-4105-9775-06263fde990e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-4753?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTQ3NTM/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "223cac3c-2cc8-4107-82ec-0dd276a375f6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "a0c3bbdf-725b-4264-a855-89e2d8f567c6" + ], + "x-ms-correlation-request-id": [ + "a0c3bbdf-725b-4264-a855-89e2d8f567c6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171211Z:a0c3bbdf-725b-4264-a855-89e2d8f567c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUVVV4RFVsVkVWRVZUVkRveVJEUTNOVE10U2tGUVFVNUZRVk5VSWl3aWFtOWlURzlqWVhScGIyNGlPaUpxWVhCaGJtVmhjM1FpZlE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:12:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "d7f610cb-cacc-4499-82f7-c3b266c65dc9" + ], + "x-ms-correlation-request-id": [ + "d7f610cb-cacc-4499-82f7-c3b266c65dc9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171241Z:d7f610cb-cacc-4499-82f7-c3b266c65dc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUVVV4RFVsVkVWRVZUVkRveVJEUTNOVE10U2tGUVFVNUZRVk5VSWl3aWFtOWlURzlqWVhScGIyNGlPaUpxWVhCaGJtVmhjM1FpZlE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:13:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "d82b9ceb-7272-458c-b760-f15984dec25d" + ], + "x-ms-correlation-request-id": [ + "d82b9ceb-7272-458c-b760-f15984dec25d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171312Z:d82b9ceb-7272-458c-b760-f15984dec25d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUVVV4RFVsVkVWRVZUVkRveVJEUTNOVE10U2tGUVFVNUZRVk5VSWl3aWFtOWlURzlqWVhScGIyNGlPaUpxWVhCaGJtVmhjM1FpZlE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:13:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "5c4e6683-648e-4bdc-a9f1-43dccdbd4660" + ], + "x-ms-correlation-request-id": [ + "5c4e6683-648e-4bdc-a9f1-43dccdbd4660" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171342Z:5c4e6683-648e-4bdc-a9f1-43dccdbd4660" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDQ3NTMtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUVVV4RFVsVkVWRVZUVkRveVJEUTNOVE10U2tGUVFVNUZRVk5VSWl3aWFtOWlURzlqWVhScGIyNGlPaUpxWVhCaGJtVmhjM1FpZlE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Mar 2017 17:14:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "fd0ed395-b2b1-4289-a26c-b1d47abd6c42" + ], + "x-ms-correlation-request-id": [ + "fd0ed395-b2b1-4289-a26c-b1d47abd6c42" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170315T171412Z:fd0ed395-b2b1-4289-a26c-b1d47abd6c42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "RunTestInNewResourceGroup": [ + "sqlcrudtest-4753" + ], + "RunTestInNewV12Server": [ + "sqlcrudtest-3619" + ], + "TestDatabaseTransparentDataEncryptionConfiguration": [ + "sqlcrudtest-6359" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestGetAndListDatabase.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestGetAndListDatabase.json index f685b85a2202..672ca397ceb2 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestGetAndListDatabase.json +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestGetAndListDatabase.json @@ -1750,7 +1750,7 @@ "RunTestInNewV12Server": [ "sqlcrudtest-318" ], - "TestGetAndListDatabase": [ + "CreateDatabasesAsync": [ "sqlcrudtest-1856", "sqlcrudtest-2783", "sqlcrudtest-7851", diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestServerSecurityAlert.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestServerSecurityAlert.json new file mode 100644 index 000000000000..05ee46697485 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestServerSecurityAlert.json @@ -0,0 +1,1093 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-security-alert-test-2054?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQ/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"server-security-alert-test-2054\": \"2017-03-11 01:54:43Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "114" + ], + "x-ms-client-request-id": [ + "86407fbf-9d71-434b-9c70-1fbf46da6a6d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054\",\r\n \"name\": \"server-security-alert-test-2054\",\r\n \"location\": \"japaneast\",\r\n \"tags\": {\r\n \"server-security-alert-test-2054\": \"2017-03-11 01:54:43Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "284" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:54:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f4c43119-b30f-49c1-8fa9-52aa711f3fa4" + ], + "x-ms-correlation-request-id": [ + "f4c43119-b30f-49c1-8fa9-52aa711f3fa4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015446Z:f4c43119-b30f-49c1-8fa9-52aa711f3fa4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\"\r\n },\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "216" + ], + "x-ms-client-request-id": [ + "da4e6457-d71a-416e-9cab-c4f505b5c400" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759\",\r\n \"name\": \"server-security-alert-test-9759\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"server-security-alert-test-9759.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "584" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:55:21 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "5a05d52e-b82f-481c-8ee4-ba3ddede732d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "77e6e59e-1b5b-49d4-a650-58106d1a16d5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015522Z:77e6e59e-1b5b-49d4-a650-58106d1a16d5" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "6a516583-d97c-4103-99ec-e1cfd66948fa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T17:55:25.279-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:55:23 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/operationResults/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "070d9cdc-c530-4e91-b29e-1639098a9ff8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/azureAsyncOperation/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "04b6471e-c4f9-4030-8af2-38981a658441" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015524Z:04b6471e-c4f9-4030-8af2-38981a658441" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02NjM0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "8ca4f1e7-dcd3-465c-82f9-8795631cd816" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T17:55:26.106-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:55:25 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/operationResults/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "5b7e2ae2-16ea-4aa1-85c7-1480ea72934a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/azureAsyncOperation/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "ba2633dd-fb92-459b-b9e9-f45b95aa3a08" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015526Z:ba2633dd-fb92-459b-b9e9-f45b95aa3a08" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/azureAsyncOperation/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2L2F6dXJlQXN5bmNPcGVyYXRpb24vMDcwZDljZGMtYzUzMC00ZTkxLWIyOWUtMTYzOTA5OGE5ZmY4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"070d9cdc-c530-4e91-b29e-1639098a9ff8\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:55:54 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "23a33912-044f-4917-82a1-564fd6d7895b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/azureAsyncOperation/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "4c83de3d-b760-42b6-8e9a-01a5c7636f06" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015555Z:4c83de3d-b760-42b6-8e9a-01a5c7636f06" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/azureAsyncOperation/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2L2F6dXJlQXN5bmNPcGVyYXRpb24vMDcwZDljZGMtYzUzMC00ZTkxLWIyOWUtMTYzOTA5OGE5ZmY4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"070d9cdc-c530-4e91-b29e-1639098a9ff8\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:26 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bb87305e-eb6d-4300-8c1f-40355dafad52" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/azureAsyncOperation/070d9cdc-c530-4e91-b29e-1639098a9ff8?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "1b722524-1d30-4dc3-b5c1-5efdcbd3039a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015626Z:1b722524-1d30-4dc3-b5c1-5efdcbd3039a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/azureAsyncOperation/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02NjM0L2F6dXJlQXN5bmNPcGVyYXRpb24vNWI3ZTJhZTItMTZlYS00YWExLTg1YzctMTQ4MGVhNzI5MzRhP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"5b7e2ae2-16ea-4aa1-85c7-1480ea72934a\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:55:56 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d4070778-218f-4c5f-909b-ea23f2eef3f2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/azureAsyncOperation/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "4fd27cde-7277-4f92-9db3-50cbe93828d5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015557Z:4fd27cde-7277-4f92-9db3-50cbe93828d5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/azureAsyncOperation/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02NjM0L2F6dXJlQXN5bmNPcGVyYXRpb24vNWI3ZTJhZTItMTZlYS00YWExLTg1YzctMTQ4MGVhNzI5MzRhP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"5b7e2ae2-16ea-4aa1-85c7-1480ea72934a\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "247ab13c-04e4-4ada-904c-c106c5d1b0ef" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634/azureAsyncOperation/5b7e2ae2-16ea-4aa1-85c7-1480ea72934a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "992459a0-e7d2-4c19-b996-bdbd678c3e8b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015628Z:992459a0-e7d2-4c19-b996-bdbd678c3e8b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666\",\r\n \"name\": \"server-security-alert-test-9666\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"1dcb7dc4-02b3-4b9f-9b4a-4f55cce920a4\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T01:55:25.56Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:06:20.97Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:27 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5deb2b23-4129-4d5a-8e34-54b509cfb742" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "c4421798-683f-42c2-ba20-6469293b2645" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015627Z:c4421798-683f-42c2-ba20-6469293b2645" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02NjM0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-6634\",\r\n \"name\": \"server-security-alert-test-6634\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"17da9de9-4a97-4156-a530-34499cb0d672\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T01:55:26.387Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:06:05.417Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "514e4507-4719-4c45-8b64-1188c1319a15" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "a0d51b8a-fe03-43ab-8786-8428bea02dfa" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015629Z:a0d51b8a-fe03-43ab-8786-8428bea02dfa" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "53b5546d-af79-4892-a805-d1449f7be5ff" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": \"Japan East\",\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Enabled\",\r\n \"state\": \"New\",\r\n \"disabledAlerts\": \"Preview\",\r\n \"emailAddresses\": \"\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:30 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "db3c256f-1235-4774-832e-81e7eb67e048" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "265d63ef-6bdd-49aa-be27-38f742dbcf0a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015631Z:265d63ef-6bdd-49aa-be27-38f742dbcf0a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "201c825d-0a42-4e81-9c54-8c77e904caaa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": \"Japan East\",\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Disabled\",\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:34 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5c7b7b5e-c319-49f6-a443-4e604812b92c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "62c9379f-e719-4157-8e07-e0e36eb39a92" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015634Z:62c9379f-e719-4157-8e07-e0e36eb39a92" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NzU5L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05NjY2L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5,\r\n \"useServerDefault\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "453" + ], + "x-ms-client-request-id": [ + "69c1f1db-db5c-4cd4-affc-d7ec70340c1e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-2054/providers/Microsoft.Sql/servers/server-security-alert-test-9759/databases/server-security-alert-test-9666/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Enabled\",\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:33 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9babd642-369a-4f48-b835-77567b2a25fb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "589f0162-b876-44ba-b488-eef2260a8431" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015633Z:589f0162-b876-44ba-b488-eef2260a8431" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-security-alert-test-2054?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTIwNTQ/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0635e1aa-09c9-4966-9015-5e901da1bc93" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:56:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "ce26ef80-475a-44ea-b821-90b6f0d524b1" + ], + "x-ms-correlation-request-id": [ + "ce26ef80-475a-44ea-b821-90b6f0d524b1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015638Z:ce26ef80-475a-44ea-b821-90b6f0d524b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREl3TlRRdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:57:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "5db0af42-bf72-4208-b948-c8132a4c8f7c" + ], + "x-ms-correlation-request-id": [ + "5db0af42-bf72-4208-b948-c8132a4c8f7c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015709Z:5db0af42-bf72-4208-b948-c8132a4c8f7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREl3TlRRdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:57:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "19bbf245-9791-4c4e-baa0-10c7869333c3" + ], + "x-ms-correlation-request-id": [ + "19bbf245-9791-4c4e-baa0-10c7869333c3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015739Z:19bbf245-9791-4c4e-baa0-10c7869333c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREl3TlRRdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:58:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "0e6b118f-06fa-46c8-9129-6ef40548a3b2" + ], + "x-ms-correlation-request-id": [ + "0e6b118f-06fa-46c8-9129-6ef40548a3b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015809Z:0e6b118f-06fa-46c8-9129-6ef40548a3b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDIwNTQtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREl3TlRRdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 01:58:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "ab6fe1cb-95d5-44b2-9e6a-dbebd52fd63c" + ], + "x-ms-correlation-request-id": [ + "ab6fe1cb-95d5-44b2-9e6a-dbebd52fd63c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T015840Z:ab6fe1cb-95d5-44b2-9e6a-dbebd52fd63c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "RunTestInNewResourceGroup": [ + "server-security-alert-test-2054" + ], + "RunTestInNewV12Server": [ + "server-security-alert-test-9759" + ], + "CreateDatabasesAsync": [ + "server-security-alert-test-9666", + "server-security-alert-test-6634" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestThreatDetection.json b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestThreatDetection.json new file mode 100644 index 000000000000..7fa45a7cecfc --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ThreatDetectionTest/TestThreatDetection.json @@ -0,0 +1,1035 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-security-alert-test-1140?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"server-security-alert-test-1140\": \"2017-03-11 02:08:27Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "114" + ], + "x-ms-client-request-id": [ + "c20ff080-38f6-460b-8a81-23fcf89145b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140\",\r\n \"name\": \"server-security-alert-test-1140\",\r\n \"location\": \"japaneast\",\r\n \"tags\": {\r\n \"server-security-alert-test-1140\": \"2017-03-11 02:08:27Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "284" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:08:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "9dd3441b-bf2b-45d8-8556-096aec5fd6f6" + ], + "x-ms-correlation-request-id": [ + "9dd3441b-bf2b-45d8-8556-096aec5fd6f6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020829Z:9dd3441b-bf2b-45d8-8556-096aec5fd6f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\"\r\n },\r\n \"location\": \"Japan East\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "216" + ], + "x-ms-client-request-id": [ + "f0c9c807-1252-4982-83d0-cd22003eb1e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156\",\r\n \"name\": \"server-security-alert-test-9156\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"server-security-alert-test-9156.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "584" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "a518349e-21eb-40bb-abb8-1c97fc20a0b4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "5d84047e-3aa9-4417-adb3-7f9840fbc9e7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020901Z:5d84047e-3aa9-4417-adb3-7f9840fbc9e7" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02MjU4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "5f0378ab-6dfd-459b-9838-8d825b9988f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T18:09:01.502-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:02 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/operationResults/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7de7513f-64e3-46dd-b53b-ab5306a4358a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/azureAsyncOperation/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "b5f58a2f-88d8-4481-a39d-d3a48b457ff9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020903Z:b5f58a2f-88d8-4481-a39d-d3a48b457ff9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "6572a181-ab7e-4a07-abee-dd8c8349354e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-03-10T18:09:04.203-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:03 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/operationResults/30d5b1f7-e929-489b-972f-bec46657868a?api-version=2014-04-01-Preview" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "30d5b1f7-e929-489b-972f-bec46657868a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/azureAsyncOperation/30d5b1f7-e929-489b-972f-bec46657868a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "c30fcc2e-c678-4205-aa6e-6ffe3cd2fdcc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020904Z:c30fcc2e-c678-4205-aa6e-6ffe3cd2fdcc" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/azureAsyncOperation/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02MjU4L2F6dXJlQXN5bmNPcGVyYXRpb24vN2RlNzUxM2YtNjRlMy00NmRkLWI1M2ItYWI1MzA2YTQzNThhP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"7de7513f-64e3-46dd-b53b-ab5306a4358a\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:33 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "44329c32-2089-491a-9b62-5723dc5e7030" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/azureAsyncOperation/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "5328ad5c-a5d2-42ce-b6c0-46772670444f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020934Z:5328ad5c-a5d2-42ce-b6c0-46772670444f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/azureAsyncOperation/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02MjU4L2F6dXJlQXN5bmNPcGVyYXRpb24vN2RlNzUxM2YtNjRlMy00NmRkLWI1M2ItYWI1MzA2YTQzNThhP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"7de7513f-64e3-46dd-b53b-ab5306a4358a\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:04 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5eb88478-d325-41cf-a153-15f43c33f189" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258/azureAsyncOperation/7de7513f-64e3-46dd-b53b-ab5306a4358a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "7480a25f-5b0c-407c-85b5-af4ab31eb649" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021005Z:7480a25f-5b0c-407c-85b5-af4ab31eb649" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/azureAsyncOperation/30d5b1f7-e929-489b-972f-bec46657868a?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4L2F6dXJlQXN5bmNPcGVyYXRpb24vMzBkNWIxZjctZTkyOS00ODliLTk3MmYtYmVjNDY2NTc4NjhhP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtUHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"30d5b1f7-e929-489b-972f-bec46657868a\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:34 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8fcdd679-a6fc-4958-a10d-7f6a178dfc5c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/azureAsyncOperation/30d5b1f7-e929-489b-972f-bec46657868a?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "cf448f70-20f0-429f-b66d-95487a66ffc2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020935Z:cf448f70-20f0-429f-b66d-95487a66ffc2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758\",\r\n \"name\": \"server-security-alert-test-7758\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"7a5b9f87-1b2b-4c68-a09e-be1927106474\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T02:09:04.593Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:19:33.837Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:09:35 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c3dff05d-91ce-454f-8c19-a80fa19f7dc2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "30b32cac-acf3-4bf6-bc78-fb98f44b1c1e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T020936Z:30b32cac-acf3-4bf6-bc78-fb98f44b1c1e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC02MjU4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-6258\",\r\n \"name\": \"server-security-alert-test-6258\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"1fe232b7-6963-402f-8b09-33f7d345a6cf\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2017-03-11T02:09:01.753Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"sampleName\": null,\r\n \"defaultSecondaryLocation\": \"Japan West\",\r\n \"earliestRestoreDate\": \"2017-03-11T02:19:38.78Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:05 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f902a372-d3e0-4bba-8fcf-22486ca7c1c7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "a333bf55-4e5e-47b1-9aaa-80a3490bbbca" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021006Z:a333bf55-4e5e-47b1-9aaa-80a3490bbbca" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a86b8c31-4915-4b6d-a8fc-9276e27c0d54" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": \"Japan East\",\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Enabled\",\r\n \"state\": \"New\",\r\n \"disabledAlerts\": \"Preview\",\r\n \"emailAddresses\": \"\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:07 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f0ac4c8b-2e7e-4b92-b5b5-ac8e59474084" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "55dee61a-d04d-48d3-b28b-b55206732f24" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021007Z:55dee61a-d04d-48d3-b28b-b55206732f24" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4615717b-ff12-4066-9a44-b11ea4f157b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": \"Japan East\",\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Disabled\",\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"\",\r\n \"retentionDays\": 5\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:11 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4e1b144c-eb80-45a0-bee3-b0e00360f74b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "4002b56f-6271-4ea8-b8ed-9a2d2ea45002" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021012Z:4002b56f-6271-4ea8-b8ed-9a2d2ea45002" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC05MTU2L2RhdGFiYXNlcy9zZXJ2ZXItc2VjdXJpdHktYWxlcnQtdGVzdC03NzU4L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5,\r\n \"useServerDefault\": \"Disabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "454" + ], + "x-ms-client-request-id": [ + "ad76c084-2833-48f8-8544-3e1853d73074" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.2.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/server-security-alert-test-1140/providers/Microsoft.Sql/servers/server-security-alert-test-9156/databases/server-security-alert-test-7758/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": \"Disabled\",\r\n \"state\": \"Disabled\",\r\n \"disabledAlerts\": \"Access_Anomaly; Usage_Anomaly\",\r\n \"emailAddresses\": \"testSecurityAlert@microsoft.com\",\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": \"https://MyAccount.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==\",\r\n \"retentionDays\": 5\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:10 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9d72123d-dd52-4791-ba9f-29778315decb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "50ae6860-f257-4034-82b4-09982511baef" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021010Z:50ae6860-f257-4034-82b4-09982511baef" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/server-security-alert-test-1140?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NlcnZlci1zZWN1cml0eS1hbGVydC10ZXN0LTExNDA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c4eea9bb-6668-451c-8ab4-45341cdfe20e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-request-id": [ + "d302919b-6f1f-4eee-94cd-2b2405cf482b" + ], + "x-ms-correlation-request-id": [ + "d302919b-6f1f-4eee-94cd-2b2405cf482b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021014Z:d302919b-6f1f-4eee-94cd-2b2405cf482b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREV4TkRBdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:10:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "1c79c215-6ae3-4185-8c0d-d3f95dbd2228" + ], + "x-ms-correlation-request-id": [ + "1c79c215-6ae3-4185-8c0d-d3f95dbd2228" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021045Z:1c79c215-6ae3-4185-8c0d-d3f95dbd2228" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREV4TkRBdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:11:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "cd5dc384-f5ea-499f-a522-fdb49231b5f6" + ], + "x-ms-correlation-request-id": [ + "cd5dc384-f5ea-499f-a522-fdb49231b5f6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021116Z:cd5dc384-f5ea-499f-a522-fdb49231b5f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREV4TkRBdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:11:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "cb6ce977-314d-4538-9853-de9be4494cd4" + ], + "x-ms-correlation-request-id": [ + "cb6ce977-314d-4538-9853-de9be4494cd4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021146Z:cb6ce977-314d-4538-9853-de9be4494cd4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TRVJWRVI6MkRTRUNVUklUWToyREFMRVJUOjJEVEVTVDoyRDExNDAtSkFQQU5FQVNUIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUlZKV1JWSTZNa1JUUlVOVlVrbFVXVG95UkVGTVJWSlVPakpFVkVWVFZEb3lSREV4TkRBdFNrRlFRVTVGUVZOVUlpd2lhbTlpVEc5allYUnBiMjRpT2lKcVlYQmhibVZoYzNRaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 11 Mar 2017 02:12:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-request-id": [ + "c5a3740b-0708-421e-9edc-8ffcbb637f1a" + ], + "x-ms-correlation-request-id": [ + "c5a3740b-0708-421e-9edc-8ffcbb637f1a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170311T021216Z:c5a3740b-0708-421e-9edc-8ffcbb637f1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "RunTestInNewResourceGroup": [ + "server-security-alert-test-1140" + ], + "RunTestInNewV12Server": [ + "server-security-alert-test-9156" + ], + "CreateDatabasesAsync": [ + "server-security-alert-test-7758", + "server-security-alert-test-6258" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/SqlTestConstants.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/SqlTestConstants.cs index 5353f6e8ce82..76dfde233ec1 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/SqlTestConstants.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/SqlTestConstants.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. +using Microsoft.Azure.Management.Sql.Models; + namespace Sql.Tests { public static class SqlTestConstants @@ -9,9 +11,9 @@ public static class SqlTestConstants public const string DefaultCollation = "SQL_Latin1_General_CP1_CI_AS"; // Default database edition - public const string DefaultDatabaseEdition = "Basic"; + public const string DefaultDatabaseEdition = DatabaseEdition.Basic; // Default elastic pool edition - public const string DefaultElasticPoolEdition = "Basic"; + public const string DefaultElasticPoolEdition = ElasticPoolEdition.Basic; } } diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/ThreatDetectionTest.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/ThreatDetectionTest.cs new file mode 100644 index 000000000000..17ed223e5d86 --- /dev/null +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/ThreatDetectionTest.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Linq; +using System.Threading.Tasks; +using Xunit; + +namespace Sql.Tests +{ + /// + /// Contains tests for the lifecycle of a Server security alert policy + /// + public class ThreatDetectionTest + { + [Fact] + public void TestThreatDetectionApis() + { + string testPrefix = "server-security-alert-test-"; + string testName = this.GetType().FullName; + + SqlManagementTestUtilities.RunTestInNewV12Server(testName, "TestThreatDetection", testPrefix, + (resClient, sqlClient, resourceGroup, server) => + { + // create some databases in server + Database[] databases = SqlManagementTestUtilities.CreateDatabasesAsync( + sqlClient, resourceGroup.Name, server, testPrefix, 2).Result; + +#if false // Commented out due to issues with async operation response + + // ******* Server threat detection ******* + ServerSecurityAlertPolicy defaultServerPolicyResponse = sqlClient.Servers.GetThreatDetectionPolicy(resourceGroup.Name, server.Name); + + // Verify that the initial Get request contains the default policy. + VerifyServerSecurityAlertPolicyInformation(GetDefaultServerSecurityAlertProperties(), defaultServerPolicyResponse); + + // Modify the policy properties, send and receive and see it its still ok + ServerSecurityAlertPolicy updatedServerPolicy = new ServerSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Enabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled, + EmailAddresses = "testSecurityAlert@microsoft.com;testServerPolicy@microsoft.com", + DisabledAlerts = "Sql_Injection", + RetentionDays = 3, + StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + StorageEndpoint = "https://MyAccount.blob.core.windows.net/", + }; + + //Set security alert policy for server + sqlClient.Servers.CreateOrUpdateThreatDetectionPolicy(resourceGroup.Name, server.Name, updatedServerPolicy); + + //Get security alert server policy + var getUpdatedServerPolicyResponse = sqlClient.Servers.GetThreatDetectionPolicy(resourceGroup.Name, server.Name); + // Verify that the Get request contains the updated policy. + VerifyServerSecurityAlertPolicyInformation(updatedServerPolicy, getUpdatedServerPolicyResponse); + +#endif + + // ******* Database threat detection ******* + + string dbName = databases[0].Name; + DatabaseSecurityAlertPolicy defaultDatabasePolicyResponse = sqlClient.Databases.GetThreatDetectionPolicy(resourceGroup.Name, server.Name, dbName); + + // Verify that the initial Get request contains the default policy. + VerifyDatabaseSecurityAlertPolicyInformation(GetDefaultDatabaseSecurityAlertProperties(), defaultDatabasePolicyResponse); + + // Modify the policy properties, send and receive and see it its still ok + DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Disabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled, + EmailAddresses = "testSecurityAlert@microsoft.com", + DisabledAlerts = "Access_Anomaly; Usage_Anomaly", + RetentionDays = 5, + StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + StorageEndpoint = "https://MyAccount.blob.core.windows.net/", + UseServerDefault = SecurityAlertPolicyUseServerDefault.Disabled, + }; + sqlClient.Databases.CreateOrUpdateThreatDetectionPolicy(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + var getUpdatedDatabasePolicyResponse = sqlClient.Databases.GetThreatDetectionPolicy(resourceGroup.Name, server.Name, dbName); + + // Verify that the Get request contains the updated policy. + VerifyDatabaseSecurityAlertPolicyInformation(updatedDatabasePolicy, getUpdatedDatabasePolicyResponse); + }); + } + +#if false // Commented out due to issues with async operation response + + /// + /// Verify that the received properties match their expected values + /// + /// The expected value of the properties object + /// The properties object that needs to be checked + private void VerifyServerSecurityAlertPolicyInformation(ServerSecurityAlertPolicy expected, ServerSecurityAlertPolicy actual) + { + Assert.Equal(expected.State, actual.State); + Assert.Equal(expected.EmailAccountAdmins, actual.EmailAccountAdmins); + Assert.Equal(expected.DisabledAlerts, actual.DisabledAlerts); + Assert.Equal(expected.EmailAddresses, actual.EmailAddresses); + Assert.Equal(expected.StorageEndpoint, actual.StorageEndpoint); + Assert.Equal(string.Empty, actual.StorageAccountAccessKey); + Assert.Equal(expected.RetentionDays, actual.RetentionDays); + } + + /// + /// Returns a ServerSecurityAlertPolicy object that holds the default settings for a server security alert policy + /// + /// A ServerSecurityAlertPolicy object with the default server security alert policy settings + private ServerSecurityAlertPolicy GetDefaultServerSecurityAlertProperties() + { + ServerSecurityAlertPolicy properties = new ServerSecurityAlertPolicy + { + State = SecurityAlertPolicyState.New, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled, + DisabledAlerts = SecurityAlert.Preview, + EmailAddresses = string.Empty, + StorageEndpoint = string.Empty, + StorageAccountAccessKey = string.Empty, + RetentionDays = 0, + }; + + return properties; + } + +#endif + + /// + /// Verify that the received properties match their expected values + /// + /// The expected value of the properties object + /// The properties object that needs to be checked + private void VerifyDatabaseSecurityAlertPolicyInformation(DatabaseSecurityAlertPolicy expected, DatabaseSecurityAlertPolicy actual) + { + Assert.Equal(expected.State, actual.State); + Assert.Equal(expected.EmailAccountAdmins, actual.EmailAccountAdmins); + Assert.Equal(expected.DisabledAlerts, actual.DisabledAlerts); + Assert.Equal(expected.EmailAddresses, actual.EmailAddresses); + Assert.Equal(expected.StorageEndpoint, actual.StorageEndpoint); + Assert.Equal(string.Empty, actual.StorageAccountAccessKey); + Assert.Equal(expected.RetentionDays, actual.RetentionDays); + Assert.Equal(expected.UseServerDefault, actual.UseServerDefault); + } + + /// + /// Returns a SecurityAlertProperties object that holds the default settings for a database security alert policy + /// + /// A DatabaseSecurityAlertPolicy object with the default database security alert policy settings + private DatabaseSecurityAlertPolicy GetDefaultDatabaseSecurityAlertProperties() + { + DatabaseSecurityAlertPolicy properties = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.New, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled, + DisabledAlerts = "Preview", + EmailAddresses = string.Empty, + UseServerDefault = SecurityAlertPolicyUseServerDefault.Enabled, + StorageEndpoint = string.Empty, + StorageAccountAccessKey = string.Empty, + RetentionDays = 0, + }; + + return properties; + } + } +} diff --git a/src/ResourceManagement/SqlManagement/Sql.Tests/Utilities/SqlManagementTestUtilities.cs b/src/ResourceManagement/SqlManagement/Sql.Tests/Utilities/SqlManagementTestUtilities.cs index 5787807e46dd..3bd751c8ed22 100644 --- a/src/ResourceManagement/SqlManagement/Sql.Tests/Utilities/SqlManagementTestUtilities.cs +++ b/src/ResourceManagement/SqlManagement/Sql.Tests/Utilities/SqlManagementTestUtilities.cs @@ -234,7 +234,7 @@ public static void ValidateElasticPool(ElasticPool expected, ElasticPool actual, Assert.NotNull(actual.Type); } - public static void ValidateFirewallRule(ServerFirewallRule expected, ServerFirewallRule actual, string name) + public static void ValidateFirewallRule(FirewallRule expected, FirewallRule actual, string name) { Assert.NotNull(actual.Id); Assert.Equal(expected.StartIpAddress, actual.StartIpAddress); @@ -300,5 +300,30 @@ internal static void RunTestInNewV12Server(string suiteName, string testName, st test(resClient, sqlClient, resGroup, v12Server); }); } + + internal static Task CreateDatabasesAsync( + SqlManagementClient sqlClient, + string resourceGroupName, + Server server, + string testPrefix, + int count) + { + List> createDbTasks = new List>(); + for (int i = 0; i < count; i++) + { + string name = SqlManagementTestUtilities.GenerateName(testPrefix); + createDbTasks.Add(sqlClient.Databases.CreateOrUpdateAsync( + resourceGroupName, + server.Name, + name, + new Database() + { + Location = server.Location + })); + } + + // Wait for all databases to be created. + return Task.WhenAll(createDbTasks); + } } }