From 80848ef06c46109b9e1bb0dbb70fb46150655e0e Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Mon, 5 Mar 2018 09:42:20 -0800 Subject: [PATCH 1/7] Generate sdk from swagger, add new test for cancel pool operation and list database/pool operation --- src/SDKs/SqlManagement/AzSdk.RP.props | 2 +- .../Generated/DatabaseOperations.cs | 4 +- .../Generated/DatabasesOperations.cs | 854 ++++++------- .../DatabasesOperationsExtensions.cs | 570 ++++----- .../Generated/ElasticPoolOperations.cs | 617 ++++++++++ .../ElasticPoolOperationsExtensions.cs | 154 +++ .../Generated/ElasticPoolsOperations.cs | 268 ++-- .../ElasticPoolsOperationsExtensions.cs | 154 +-- .../Generated/IDatabasesOperations.cs | 262 ++-- .../Generated/IElasticPoolOperations.cs | 107 ++ .../Generated/IElasticPoolsOperations.cs | 70 +- .../Generated/IRestorePointsOperations.cs | 101 +- .../Generated/ISqlManagementClient.cs | 55 +- .../CreateDatabaseRestorePointDefinition.cs | 69 ++ .../Generated/Models/DatabaseOperation.cs | 28 +- .../Generated/Models/ElasticPoolOperation.cs | 170 +++ .../Generated/Models/RestorePoint.cs | 52 +- .../Generated/Models/RestorePointType.cs | 14 +- .../Generated/RestorePointsOperations.cs | 498 +++++++- .../RestorePointsOperationsExtensions.cs | 166 ++- .../Generated/SdkInfo_SqlManagementClient.cs | 5 +- .../Generated/SqlManagementClient.cs | 66 +- .../Sql.Tests/DatabaseCrudScenarioTests.cs | 9 +- .../Sql.Tests/ElasticPoolCrudScenarioTests.cs | 69 ++ .../TestCancelDatabaseOperation.json | 503 +++++--- .../TestCancelUpdateElasticPoolOperation.json | 1085 +++++++++++++++++ src/SDKs/_metadata/sql_resource-manager.txt | 12 +- 27 files changed, 4590 insertions(+), 1374 deletions(-) create mode 100644 src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperations.cs create mode 100644 src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperationsExtensions.cs create mode 100644 src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolOperations.cs create mode 100644 src/SDKs/SqlManagement/Management.Sql/Generated/Models/CreateDatabaseRestorePointDefinition.cs create mode 100644 src/SDKs/SqlManagement/Management.Sql/Generated/Models/ElasticPoolOperation.cs create mode 100644 src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticPoolCrudScenarioTests/TestCancelUpdateElasticPoolOperation.json diff --git a/src/SDKs/SqlManagement/AzSdk.RP.props b/src/SDKs/SqlManagement/AzSdk.RP.props index de7d5ff4aab7..c686be55af5f 100644 --- a/src/SDKs/SqlManagement/AzSdk.RP.props +++ b/src/SDKs/SqlManagement/AzSdk.RP.props @@ -1,7 +1,7 @@ - Sql_2014-04-01;Sql_2015-05-01-preview;Sql_2017-03-01-preview; + Sql_2014-04-01;Sql_2015-05-01-preview;Sql_2017-10-01-preview;Sql_2017-03-01-preview; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseOperations.cs index 2ef5cbd53604..ebedc7aca5bd 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseOperations.cs @@ -102,7 +102,7 @@ internal DatabaseOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-03-01-preview"; + string apiVersion = "2017-10-01-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -290,7 +290,7 @@ internal DatabaseOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-03-01-preview"; + string apiVersion = "2017-10-01-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperations.cs index b416a2fb9525..26c3a7dfd351 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperations.cs @@ -51,7 +51,7 @@ internal DatabasesOperations(SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -60,8 +60,8 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// The headers that will be added to request. @@ -69,16 +69,15 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, 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 BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, 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. + /// Resumes a data warehouse. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -88,10 +87,36 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to import into + /// The name of the data warehouse to resume. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates a new database or updates an existing 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 name of the database to be operated on (updated or created). /// /// - /// The required parameters for importing a Bacpac into a database. + /// The required parameters for creating or updating a database. /// /// /// The headers that will be added to request. @@ -99,15 +124,15 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Exports a database to a bacpac. + /// Updates an existing database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -117,10 +142,10 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be updated. /// /// - /// The required parameters for exporting a database. + /// The required parameters for updating a database. /// /// /// The headers that will be added to request. @@ -128,15 +153,15 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The cancellation token. /// - public async Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Returns database metrics. + /// Deletes a database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -146,10 +171,7 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database. - /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// The name of the database to be deleted. /// /// /// Headers that will be added to request. @@ -160,9 +182,6 @@ 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 /// @@ -172,7 +191,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -190,10 +209,6 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - if (filter == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "filter"); - } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -206,13 +221,12 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetrics", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}").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)); @@ -222,10 +236,6 @@ internal DatabasesOperations(SqlManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -233,7 +243,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -284,7 +294,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -319,31 +329,13 @@ 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); @@ -352,7 +344,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Returns database metric definitions. + /// Gets a database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -362,7 +354,11 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be retrieved. + /// + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. /// /// /// Headers that will be added to request. @@ -385,7 +381,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -415,12 +411,13 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetricDefinitions", 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}/databases/{databaseName}/metricDefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}").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)); @@ -430,6 +427,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 (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -523,7 +524,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")) @@ -536,7 +537,7 @@ 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) { @@ -556,88 +557,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Pauses a data warehouse. - /// - /// - /// 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 data warehouse to pause. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task PauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Resumes a data warehouse. - /// - /// - /// 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 data warehouse to resume. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates a new database or updates an existing 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 name of the database to be operated on (updated or created). - /// - /// - /// The required parameters for creating or updating a database. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an existing database. + /// Returns a list of databases in a server. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -646,37 +566,12 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the database to be updated. - /// - /// - /// The required parameters for updating a database. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a 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. + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. /// - /// - /// The name of the database to be deleted. + /// + /// An OData filter expression that describes a subset of databases to return. /// /// /// Headers that will be added to request. @@ -687,6 +582,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 /// @@ -696,7 +594,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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) { @@ -710,10 +608,6 @@ internal DatabasesOperations(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; @@ -725,22 +619,30 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("expand", expand); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases").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 (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))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -748,7 +650,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -799,7 +701,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -834,13 +736,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); @@ -849,7 +769,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Gets a database. + /// Gets a database inside of an elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -858,13 +778,12 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// + /// + /// The name of the elastic pool to be retrieved. + /// /// /// The name of the database to be retrieved. /// - /// - /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, transparentDataEncryption. - /// /// /// Headers that will be added to request. /// @@ -886,7 +805,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -900,6 +819,10 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } + if (elasticPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + } if (databaseName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); @@ -915,27 +838,24 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); + tracingParameters.Add("elasticPoolName", elasticPoolName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetByElasticPool", 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); _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 (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1062,7 +982,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Returns a list of databases in a server. + /// Returns a list of databases in an elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1071,12 +991,8 @@ 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. + /// + /// The name of the elastic pool to be retrieved. /// /// /// Headers that will be added to request. @@ -1099,7 +1015,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1111,7 +1027,11 @@ internal DatabasesOperations(SqlManagementClient client) } if (serverName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (elasticPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); } string apiVersion = "2014-04-01"; // Tracing @@ -1124,30 +1044,22 @@ 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("elasticPoolName", elasticPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByElasticPool", 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").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); List _queryParameters = new List(); if (apiVersion != null) { _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))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1274,7 +1186,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Gets a database inside of an elastic pool. + /// Gets a database inside of a recommented elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1283,7 +1195,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// + /// /// The name of the elastic pool to be retrieved. /// /// @@ -1310,7 +1222,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1324,9 +1236,9 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (elasticPoolName == null) + if (recommendedElasticPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + throw new ValidationException(ValidationRules.CannotBeNull, "recommendedElasticPoolName"); } if (databaseName == null) { @@ -1343,18 +1255,18 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("elasticPoolName", elasticPoolName); + tracingParameters.Add("recommendedElasticPoolName", recommendedElasticPoolName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByElasticPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetByRecommendedElasticPool", 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}/elasticPools/{elasticPoolName}/databases/{databaseName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); + _url = _url.Replace("{recommendedElasticPoolName}", System.Uri.EscapeDataString(recommendedElasticPoolName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); List _queryParameters = new List(); if (apiVersion != null) @@ -1487,7 +1399,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Returns a list of databases in an elastic pool. + /// Returns a list of databases inside a recommented elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1496,8 +1408,8 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. + /// + /// The name of the recommended elastic pool to be retrieved. /// /// /// Headers that will be added to request. @@ -1520,7 +1432,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1534,9 +1446,9 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (elasticPoolName == null) + if (recommendedElasticPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + throw new ValidationException(ValidationRules.CannotBeNull, "recommendedElasticPoolName"); } string apiVersion = "2014-04-01"; // Tracing @@ -1549,17 +1461,17 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("elasticPoolName", elasticPoolName); + tracingParameters.Add("recommendedElasticPoolName", recommendedElasticPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByElasticPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByRecommendedElasticPool", 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}/elasticPools/{elasticPoolName}/databases").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); + _url = _url.Replace("{recommendedElasticPoolName}", System.Uri.EscapeDataString(recommendedElasticPoolName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -1691,7 +1603,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Gets a database inside of a recommented elastic pool. + /// Imports a bacpac into a new database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1700,11 +1612,96 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. + /// + /// 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 + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. /// /// - /// The name of the database to be retrieved. + /// The name of the database to import into + /// + /// + /// The required parameters for importing a Bacpac into a database. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + 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); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns database metrics. + /// + /// + /// 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. + /// + /// + /// An OData filter expression that describes a subset of metrics to return. /// /// /// Headers that will be added to request. @@ -1727,7 +1724,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1741,14 +1738,14 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (recommendedElasticPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "recommendedElasticPoolName"); - } if (databaseName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } + if (filter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filter"); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1760,24 +1757,27 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("recommendedElasticPoolName", recommendedElasticPoolName); tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByRecommendedElasticPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetrics", 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}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics").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("{recommendedElasticPoolName}", System.Uri.EscapeDataString(recommendedElasticPoolName)); _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 (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1871,7 +1871,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")) @@ -1884,7 +1884,7 @@ 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) { @@ -1904,7 +1904,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Returns a list of databases inside a recommented elastic pool. + /// Returns database metric definitions. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1913,8 +1913,8 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the recommended elastic pool to be retrieved. + /// + /// The name of the database. /// /// /// Headers that will be added to request. @@ -1937,7 +1937,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1951,9 +1951,9 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (recommendedElasticPoolName == null) + if (databaseName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recommendedElasticPoolName"); + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } string apiVersion = "2014-04-01"; // Tracing @@ -1966,17 +1966,17 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("recommendedElasticPoolName", recommendedElasticPoolName); + tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByRecommendedElasticPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetricDefinitions", 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}/recommendedElasticPools/{recommendedElasticPoolName}/databases").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions").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("{recommendedElasticPoolName}", System.Uri.EscapeDataString(recommendedElasticPoolName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -2075,7 +2075,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")) @@ -2088,7 +2088,7 @@ 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) { @@ -2309,7 +2309,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2318,8 +2318,8 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// Headers that will be added to request. @@ -2330,9 +2330,6 @@ 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 /// @@ -2342,7 +2339,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// 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)) + public async Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -2356,13 +2353,9 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) + if (databaseName == null) { - parameters.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } string apiVersion = "2014-04-01"; // Tracing @@ -2375,16 +2368,17 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginImport", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginPause", 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(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause").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) { @@ -2428,12 +2422,6 @@ 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) { @@ -2489,31 +2477,13 @@ 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); @@ -2522,8 +2492,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Creates an import operation that imports a bacpac into an existing - /// database. The existing database must be empty. + /// Resumes a data warehouse. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2532,11 +2501,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 data warehouse to resume. /// /// /// Headers that will be added to request. @@ -2547,9 +2513,6 @@ 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 /// @@ -2559,7 +2522,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// 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)) + public async Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -2577,16 +2540,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"; - string extensionName = "import"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2598,19 +2552,16 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("extensionName", extensionName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateImportOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginResume", 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/{extensionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume").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("{extensionName}", System.Uri.EscapeDataString(extensionName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -2623,7 +2574,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2654,12 +2605,6 @@ 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) { @@ -2680,7 +2625,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2715,31 +2660,13 @@ 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 == 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); @@ -2748,7 +2675,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2758,10 +2685,10 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// /// /// Headers that will be added to request. @@ -2784,7 +2711,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, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -2824,11 +2751,11 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginExport", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.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}").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)); @@ -2845,7 +2772,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2902,7 +2829,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 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2937,7 +2864,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")) @@ -2950,7 +2877,25 @@ 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 (JsonException ex) { @@ -2970,7 +2915,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Pauses a data warehouse. + /// Updates an existing database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2980,7 +2925,10 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be updated. + /// + /// + /// The required parameters for updating a database. /// /// /// Headers that will be added to request. @@ -2991,6 +2939,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 /// @@ -3000,7 +2951,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3018,6 +2969,10 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -3030,12 +2985,13 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPause", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", 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}/pause").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}").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)); @@ -3052,7 +3008,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -3083,6 +3039,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) { @@ -3138,13 +3100,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); @@ -3153,7 +3133,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Resumes a data warehouse. + /// Imports a bacpac into a new database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3162,8 +3142,8 @@ internal DatabasesOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// Headers that will be added to request. @@ -3174,6 +3154,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 /// @@ -3183,7 +3166,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3197,9 +3180,13 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (databaseName == null) + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); } string apiVersion = "2014-04-01"; // Tracing @@ -3212,17 +3199,16 @@ internal DatabasesOperations(SqlManagementClient client) 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, "BeginResume", tracingParameters); + 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}/databases/{databaseName}/resume").ToString(); + 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)); - _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -3266,6 +3252,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) { @@ -3321,13 +3313,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); @@ -3336,7 +3346,8 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Creates a new database or updates an existing database. + /// 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 @@ -3346,10 +3357,10 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to be operated on (updated or created). + /// The name of the database to import into /// /// - /// The required parameters for creating or updating a database. + /// The required parameters for importing a Bacpac into a database. /// /// /// Headers that will be added to request. @@ -3372,7 +3383,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3399,6 +3410,7 @@ internal DatabasesOperations(SqlManagementClient client) parameters.Validate(); } string apiVersion = "2014-04-01"; + string extensionName = "import"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3410,17 +3422,19 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("extensionName", extensionName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + 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}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}").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("{extensionName}", System.Uri.EscapeDataString(extensionName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -3490,7 +3504,7 @@ internal DatabasesOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3525,7 +3539,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")) @@ -3533,30 +3547,12 @@ internal DatabasesOperations(SqlManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3576,7 +3572,7 @@ internal DatabasesOperations(SqlManagementClient client) } /// - /// Updates an existing database. + /// Exports a database to a bacpac. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -3586,10 +3582,10 @@ internal DatabasesOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to be updated. + /// The name of the database to be exported. /// /// - /// The required parameters for updating a database. + /// The required parameters for exporting a database. /// /// /// Headers that will be added to request. @@ -3612,7 +3608,7 @@ internal DatabasesOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -3634,6 +3630,10 @@ internal DatabasesOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } + if (parameters != null) + { + parameters.Validate(); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -3648,11 +3648,11 @@ internal DatabasesOperations(SqlManagementClient client) tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + 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}").ToString(); + 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)); @@ -3669,7 +3669,7 @@ internal DatabasesOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -3761,7 +3761,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")) @@ -3774,7 +3774,7 @@ 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) { diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperationsExtensions.cs index 9969d198f908..fd9c9ea53d44 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperationsExtensions.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperationsExtensions.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Sql public static partial class DatabasesOperationsExtensions { /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The operations group for this extension method. @@ -36,16 +36,16 @@ public static partial class DatabasesOperationsExtensions /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// - public static ImportExportResponse Import(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) + public static void Pause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.ImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); + operations.PauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The operations group for this extension method. @@ -57,23 +57,19 @@ public static ImportExportResponse Import(this IDatabasesOperations operations, /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// The cancellation token. /// - public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.PauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Creates an import operation that imports a bacpac into an existing - /// database. The existing database must be empty. + /// Resumes a data warehouse. /// /// /// The operations group for this extension method. @@ -86,19 +82,15 @@ public static ImportExportResponse Import(this IDatabasesOperations operations, /// 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 data warehouse to resume. /// - public static ImportExportResponse CreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) + public static void Resume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.CreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + operations.ResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Creates an import operation that imports a bacpac into an existing - /// database. The existing database must be empty. + /// Resumes a data warehouse. /// /// /// The operations group for this extension method. @@ -111,24 +103,18 @@ public static ImportExportResponse CreateImportOperation(this IDatabasesOperatio /// 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 data warehouse to resume. /// /// /// The cancellation token. /// - public static async Task CreateImportOperationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.ResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The operations group for this extension method. @@ -141,18 +127,18 @@ public static ImportExportResponse CreateImportOperation(this IDatabasesOperatio /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// - public static ImportExportResponse Export(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) + public static Database CreateOrUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters) { - return operations.ExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The operations group for this extension method. @@ -165,24 +151,24 @@ public static ImportExportResponse Export(this IDatabasesOperations operations, /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// /// /// The cancellation token. /// - public static async Task ExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns database metrics. + /// Updates an existing database. /// /// /// The operations group for this extension method. @@ -195,18 +181,18 @@ public static ImportExportResponse Export(this IDatabasesOperations operations, /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be updated. /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// + /// The required parameters for updating a database. /// - public static IEnumerable ListMetrics(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter) + public static Database Update(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters) { - return operations.ListMetricsAsync(resourceGroupName, serverName, databaseName, filter).GetAwaiter().GetResult(); + return operations.UpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Returns database metrics. + /// Updates an existing database. /// /// /// The operations group for this extension method. @@ -219,24 +205,24 @@ public static IEnumerable ListMetrics(this IDatabasesOperations operatio /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be updated. /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// + /// The required parameters for updating a database. /// /// /// The cancellation token. /// - public static async Task> ListMetricsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, filter, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns database metric definitions. + /// Deletes a database. /// /// /// The operations group for this extension method. @@ -249,15 +235,15 @@ public static IEnumerable ListMetrics(this IDatabasesOperations operatio /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be deleted. /// - public static IEnumerable ListMetricDefinitions(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static void Delete(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.ListMetricDefinitionsAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Returns database metric definitions. + /// Deletes a database. /// /// /// The operations group for this extension method. @@ -270,21 +256,18 @@ public static IEnumerable ListMetricDefinitions(this IDatabase /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be deleted. /// /// /// The cancellation token. /// - public static async Task> ListMetricDefinitionsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Pauses a data warehouse. + /// Gets a database. /// /// /// The operations group for this extension method. @@ -297,15 +280,19 @@ public static IEnumerable ListMetricDefinitions(this IDatabase /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be retrieved. /// - public static void Pause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. + /// + public static Database Get(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string)) { - operations.PauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, serverName, databaseName, expand).GetAwaiter().GetResult(); } /// - /// Pauses a data warehouse. + /// Gets a database. /// /// /// The operations group for this extension method. @@ -318,18 +305,25 @@ public static void Pause(this IDatabasesOperations operations, string resourceGr /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be retrieved. + /// + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. /// /// /// The cancellation token. /// - public static async Task PauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.PauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Resumes a data warehouse. + /// Returns a list of databases in a server. /// /// /// The operations group for this extension method. @@ -341,16 +335,20 @@ public static void Pause(this IDatabasesOperations operations, string resourceGr /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// A comma separated list of child objects to expand in the response. Possible + /// properties: serviceTierAdvisors, transparentDataEncryption. /// - public static void Resume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + /// + /// An OData filter expression that describes a subset of databases to return. + /// + public static IEnumerable ListByServer(this IDatabasesOperations operations, string resourceGroupName, string serverName, string expand = default(string), string filter = default(string)) { - operations.ResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + return operations.ListByServerAsync(resourceGroupName, serverName, expand, filter).GetAwaiter().GetResult(); } /// - /// Resumes a data warehouse. + /// Returns a list of databases in a server. /// /// /// The operations group for this extension method. @@ -362,19 +360,26 @@ public static void Resume(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// 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 ResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, 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)) { - (await operations.ResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, expand, filter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Creates a new database or updates an existing database. + /// Gets a database inside of an elastic pool. /// /// /// The operations group for this extension method. @@ -386,19 +391,19 @@ public static void Resume(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The name of the database to be operated on (updated or created). + /// + /// The name of the elastic pool to be retrieved. /// - /// - /// The required parameters for creating or updating a database. + /// + /// The name of the database to be retrieved. /// - public static Database CreateOrUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters) + public static Database GetByElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string databaseName) { - return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.GetByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, databaseName).GetAwaiter().GetResult(); } /// - /// Creates a new database or updates an existing database. + /// Gets a database inside of an elastic pool. /// /// /// The operations group for this extension method. @@ -410,25 +415,25 @@ public static Database CreateOrUpdate(this IDatabasesOperations operations, stri /// /// The name of the server. /// - /// - /// The name of the database to be operated on (updated or created). + /// + /// The name of the elastic pool to be retrieved. /// - /// - /// The required parameters for creating or updating a database. + /// + /// The name of the database to be retrieved. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetByElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetByElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, databaseName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Updates an existing database. + /// Returns a list of databases in an elastic pool. /// /// /// The operations group for this extension method. @@ -440,19 +445,16 @@ public static Database CreateOrUpdate(this IDatabasesOperations operations, stri /// /// The name of the server. /// - /// - /// The name of the database to be updated. - /// - /// - /// The required parameters for updating a database. + /// + /// The name of the elastic pool to be retrieved. /// - public static Database Update(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters) + public static IEnumerable ListByElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName) { - return operations.UpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.ListByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); } /// - /// Updates an existing database. + /// Returns a list of databases in an elastic pool. /// /// /// The operations group for this extension method. @@ -464,25 +466,22 @@ public static Database Update(this IDatabasesOperations operations, string resou /// /// The name of the server. /// - /// - /// The name of the database to be updated. - /// - /// - /// The required parameters for updating a database. + /// + /// The name of the elastic pool to be retrieved. /// /// /// The cancellation token. /// - public static async Task UpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes a database. + /// Gets a database inside of a recommented elastic pool. /// /// /// The operations group for this extension method. @@ -494,16 +493,19 @@ public static Database Update(this IDatabasesOperations operations, string resou /// /// The name of the server. /// + /// + /// The name of the elastic pool to be retrieved. + /// /// - /// The name of the database to be deleted. + /// The name of the database to be retrieved. /// - public static void Delete(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static Database GetByRecommendedElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName) { - operations.DeleteAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + return operations.GetByRecommendedElasticPoolAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).GetAwaiter().GetResult(); } /// - /// Deletes a database. + /// Gets a database inside of a recommented elastic pool. /// /// /// The operations group for this extension method. @@ -515,19 +517,25 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// + /// + /// The name of the elastic pool to be retrieved. + /// /// - /// The name of the database to be deleted. + /// The name of the database to be retrieved. /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetByRecommendedElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.GetByRecommendedElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Gets a database. + /// Returns a list of databases inside a recommented elastic pool. /// /// /// The operations group for this extension method. @@ -539,20 +547,16 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The name of the database to be retrieved. - /// - /// - /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, transparentDataEncryption. + /// + /// The name of the recommended elastic pool to be retrieved. /// - public static Database Get(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string)) + public static IEnumerable ListByRecommendedElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName) { - return operations.GetAsync(resourceGroupName, serverName, databaseName, expand).GetAwaiter().GetResult(); + return operations.ListByRecommendedElasticPoolAsync(resourceGroupName, serverName, recommendedElasticPoolName).GetAwaiter().GetResult(); } /// - /// Gets a database. + /// Returns a list of databases inside a recommented elastic pool. /// /// /// The operations group for this extension method. @@ -564,26 +568,22 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The name of the database to be retrieved. - /// - /// - /// A comma separated list of child objects to expand in the response. Possible - /// properties: serviceTierAdvisors, transparentDataEncryption. + /// + /// The name of the recommended elastic pool to be retrieved. /// /// /// The cancellation token. /// - public static async Task GetAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByRecommendedElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, expand, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByRecommendedElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, recommendedElasticPoolName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns a list of databases in a server. + /// Imports a bacpac into a new database. /// /// /// The operations group for this extension method. @@ -595,20 +595,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. + /// + /// The required parameters for importing a Bacpac into a database. /// - public static IEnumerable ListByServer(this IDatabasesOperations operations, string resourceGroupName, string serverName, string expand = default(string), string filter = default(string)) + public static ImportExportResponse Import(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) { - return operations.ListByServerAsync(resourceGroupName, serverName, expand, filter).GetAwaiter().GetResult(); + return operations.ImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); } /// - /// Returns a list of databases in a server. + /// Imports a bacpac into a new database. /// /// /// The operations group for this extension method. @@ -620,26 +616,23 @@ 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 required parameters for importing a Bacpac into a database. /// /// /// The cancellation token. /// - public static async Task> ListByServerAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, expand, filter, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a database inside of an elastic pool. + /// 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. @@ -651,19 +644,20 @@ public static void Delete(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database to import into /// - public static Database GetByElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string databaseName) + /// + /// The required parameters for importing a Bacpac into a database. + /// + public static ImportExportResponse CreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) { - return operations.GetByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, databaseName).GetAwaiter().GetResult(); + return operations.CreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Gets a database inside of an elastic pool. + /// 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. @@ -675,25 +669,25 @@ public static Database GetByElasticPool(this IDatabasesOperations operations, st /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database to import into + /// + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// The cancellation token. /// - public static async Task GetByElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string databaseName, 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.GetByElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, databaseName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns a list of databases in an elastic pool. + /// Exports a database to a bacpac. /// /// /// The operations group for this extension method. @@ -705,16 +699,19 @@ public static Database GetByElasticPool(this IDatabasesOperations operations, st /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. + /// + /// The name of the database to be exported. /// - public static IEnumerable ListByElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName) + /// + /// The required parameters for exporting a database. + /// + public static ImportExportResponse Export(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) { - return operations.ListByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); + return operations.ExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Returns a list of databases in an elastic pool. + /// Exports a database to a bacpac. /// /// /// The operations group for this extension method. @@ -726,22 +723,25 @@ public static IEnumerable ListByElasticPool(this IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. + /// + /// The name of the database to be exported. + /// + /// + /// The required parameters for exporting a database. /// /// /// The cancellation token. /// - public static async Task> ListByElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string elasticPoolName, 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.ListByElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a database inside of a recommented elastic pool. + /// Returns database metrics. /// /// /// The operations group for this extension method. @@ -753,19 +753,19 @@ public static IEnumerable ListByElasticPool(this IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database. /// - public static Database GetByRecommendedElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName) + /// + /// An OData filter expression that describes a subset of metrics to return. + /// + public static IEnumerable ListMetrics(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter) { - return operations.GetByRecommendedElasticPoolAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).GetAwaiter().GetResult(); + return operations.ListMetricsAsync(resourceGroupName, serverName, databaseName, filter).GetAwaiter().GetResult(); } /// - /// Gets a database inside of a recommented elastic pool. + /// Returns database metrics. /// /// /// The operations group for this extension method. @@ -777,25 +777,25 @@ public static Database GetByRecommendedElasticPool(this IDatabasesOperations ope /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database. + /// + /// + /// An OData filter expression that describes a subset of metrics to return. /// /// /// The cancellation token. /// - public static async Task GetByRecommendedElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListMetricsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetByRecommendedElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, filter, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns a list of databases inside a recommented elastic pool. + /// Returns database metric definitions. /// /// /// The operations group for this extension method. @@ -807,16 +807,16 @@ public static Database GetByRecommendedElasticPool(this IDatabasesOperations ope /// /// The name of the server. /// - /// - /// The name of the recommended elastic pool to be retrieved. + /// + /// The name of the database. /// - public static IEnumerable ListByRecommendedElasticPool(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName) + public static IEnumerable ListMetricDefinitions(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.ListByRecommendedElasticPoolAsync(resourceGroupName, serverName, recommendedElasticPoolName).GetAwaiter().GetResult(); + return operations.ListMetricDefinitionsAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Returns a list of databases inside a recommented elastic pool. + /// Returns database metric definitions. /// /// /// The operations group for this extension method. @@ -828,15 +828,15 @@ public static IEnumerable ListByRecommendedElasticPool(this IDatabases /// /// The name of the server. /// - /// - /// The name of the recommended elastic pool to be retrieved. + /// + /// The name of the database. /// /// /// The cancellation token. /// - public static async Task> ListByRecommendedElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListMetricDefinitionsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByRecommendedElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, recommendedElasticPoolName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -894,7 +894,7 @@ public static void Rename(this IDatabasesOperations operations, string resourceG } /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The operations group for this extension method. @@ -906,16 +906,16 @@ public static void Rename(this IDatabasesOperations operations, string resourceG /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// - public static ImportExportResponse BeginImport(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) + public static void BeginPause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.BeginImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); + operations.BeginPauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The operations group for this extension method. @@ -927,23 +927,19 @@ public static ImportExportResponse BeginImport(this IDatabasesOperations operati /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// The cancellation token. /// - public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginPauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Creates an import operation that imports a bacpac into an existing - /// database. The existing database must be empty. + /// Resumes a data warehouse. /// /// /// The operations group for this extension method. @@ -956,19 +952,15 @@ public static ImportExportResponse BeginImport(this IDatabasesOperations operati /// 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 data warehouse to resume. /// - public static ImportExportResponse BeginCreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) + public static void BeginResume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) { - return operations.BeginCreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + operations.BeginResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Creates an import operation that imports a bacpac into an existing - /// database. The existing database must be empty. + /// Resumes a data warehouse. /// /// /// The operations group for this extension method. @@ -981,24 +973,18 @@ public static ImportExportResponse BeginCreateImportOperation(this IDatabasesOpe /// 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 data warehouse to resume. /// /// /// The cancellation token. /// - public static async Task BeginCreateImportOperationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The operations group for this extension method. @@ -1011,18 +997,18 @@ public static ImportExportResponse BeginCreateImportOperation(this IDatabasesOpe /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// - public static ImportExportResponse BeginExport(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) + public static Database BeginCreateOrUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters) { - return operations.BeginExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The operations group for this extension method. @@ -1035,24 +1021,24 @@ public static ImportExportResponse BeginExport(this IDatabasesOperations operati /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// /// /// The cancellation token. /// - public static async Task BeginExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCreateOrUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Pauses a data warehouse. + /// Updates an existing database. /// /// /// The operations group for this extension method. @@ -1065,15 +1051,18 @@ public static ImportExportResponse BeginExport(this IDatabasesOperations operati /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be updated. /// - public static void BeginPause(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + /// + /// The required parameters for updating a database. + /// + public static Database BeginUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters) { - operations.BeginPauseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + return operations.BeginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Pauses a data warehouse. + /// Updates an existing database. /// /// /// The operations group for this extension method. @@ -1086,18 +1075,24 @@ public static void BeginPause(this IDatabasesOperations operations, string resou /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be updated. + /// + /// + /// The required parameters for updating a database. /// /// /// The cancellation token. /// - public static async Task BeginPauseAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginPauseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Resumes a data warehouse. + /// Imports a bacpac into a new database. /// /// /// The operations group for this extension method. @@ -1109,16 +1104,16 @@ public static void BeginPause(this IDatabasesOperations operations, string resou /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// The required parameters for importing a Bacpac into a database. /// - public static void BeginResume(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName) + public static ImportExportResponse BeginImport(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters) { - operations.BeginResumeAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + return operations.BeginImportAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult(); } /// - /// Resumes a data warehouse. + /// Imports a bacpac into a new database. /// /// /// The operations group for this extension method. @@ -1130,19 +1125,23 @@ public static void BeginResume(this IDatabasesOperations operations, string reso /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// The cancellation token. /// - public static async Task BeginResumeAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginResumeWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Creates a new database or updates an existing database. + /// 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. @@ -1155,18 +1154,19 @@ public static void BeginResume(this IDatabasesOperations operations, string reso /// The name of the server. /// /// - /// The name of the database to be operated on (updated or created). + /// The name of the database to import into /// /// - /// The required parameters for creating or updating a database. + /// The required parameters for importing a Bacpac into a database. /// - public static Database BeginCreateOrUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database parameters) + public static ImportExportResponse BeginCreateImportOperation(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters) { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.BeginCreateImportOperationAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Creates a new database or updates an existing database. + /// 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. @@ -1179,24 +1179,24 @@ public static Database BeginCreateOrUpdate(this IDatabasesOperations operations, /// The name of the server. /// /// - /// The name of the database to be operated on (updated or created). + /// The name of the database to import into /// /// - /// The required parameters for creating or updating a database. + /// The required parameters for importing a Bacpac into a database. /// /// /// The cancellation token. /// - public static async Task BeginCreateOrUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, Database 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.BeginCreateOrUpdateWithHttpMessagesAsync(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; } } /// - /// Updates an existing database. + /// Exports a database to a bacpac. /// /// /// The operations group for this extension method. @@ -1209,18 +1209,18 @@ public static Database BeginCreateOrUpdate(this IDatabasesOperations operations, /// The name of the server. /// /// - /// The name of the database to be updated. + /// The name of the database to be exported. /// /// - /// The required parameters for updating a database. + /// The required parameters for exporting a database. /// - public static Database BeginUpdate(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters) + public static ImportExportResponse BeginExport(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequest parameters) { - return operations.BeginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + return operations.BeginExportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); } /// - /// Updates an existing database. + /// Exports a database to a bacpac. /// /// /// The operations group for this extension method. @@ -1233,17 +1233,17 @@ public static Database BeginUpdate(this IDatabasesOperations operations, string /// The name of the server. /// /// - /// The name of the database to be updated. + /// The name of the database to be exported. /// /// - /// The required parameters for updating a database. + /// The required parameters for exporting a database. /// /// /// The cancellation token. /// - public static async Task BeginUpdateAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseUpdate 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.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperations.cs new file mode 100644 index 000000000000..313d1a22cc51 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperations.cs @@ -0,0 +1,617 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql +{ + 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; + + /// + /// ElasticPoolOperations operations. + /// + internal partial class ElasticPoolOperations : IServiceOperations, IElasticPoolOperations + { + /// + /// Initializes a new instance of the ElasticPoolOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ElasticPoolOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Cancels the asynchronous operation on the elastic pool. + /// + /// + /// 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 identifier. + /// + /// + /// 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 CancelWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (elasticPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-10-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("elasticPoolName", elasticPoolName); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Cancel", 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}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(operationId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// 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>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); + } + if (elasticPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-10-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("elasticPoolName", elasticPoolName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByElasticPool", 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}/elasticPools/{elasticPoolName}/operations").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByElasticPoolNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByElasticPoolNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperationsExtensions.cs new file mode 100644 index 000000000000..c633583487bc --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolOperationsExtensions.cs @@ -0,0 +1,154 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ElasticPoolOperations. + /// + public static partial class ElasticPoolOperationsExtensions + { + /// + /// Cancels the asynchronous operation on the elastic pool. + /// + /// + /// 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 identifier. + /// + public static void Cancel(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName, System.Guid operationId) + { + operations.CancelAsync(resourceGroupName, serverName, elasticPoolName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Cancels the asynchronous operation on the elastic pool. + /// + /// + /// 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 identifier. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName, System.Guid operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// 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 IPage ListByElasticPool(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName) + { + return operations.ListByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// 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> ListByElasticPoolAsync(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByElasticPoolNext(this IElasticPoolOperations operations, string nextPageLink) + { + return operations.ListByElasticPoolNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByElasticPoolNextAsync(this IElasticPoolOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByElasticPoolNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperations.cs index 3724c3c56237..c25d45bf0c75 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperations.cs @@ -51,7 +51,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// Returns elastic pool metrics. + /// Creates a new elastic pool or updates an existing elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -61,10 +61,65 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be operated on (updated or created). /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// + /// The required parameters for creating or updating an elastic pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates an existing elastic pool. + /// + /// + /// 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 elastic pool to be updated. + /// + /// + /// The required parameters for updating an elastic pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the elastic pool. + /// + /// + /// 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 elastic pool to be deleted. /// /// /// Headers that will be added to request. @@ -75,9 +130,6 @@ internal ElasticPoolsOperations(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 /// @@ -87,7 +139,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -105,10 +157,6 @@ internal ElasticPoolsOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); } - if (filter == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "filter"); - } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -121,13 +169,12 @@ internal ElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("elasticPoolName", elasticPoolName); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetrics", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}").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)); @@ -137,10 +184,6 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -148,7 +191,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -199,7 +242,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -234,31 +277,13 @@ internal ElasticPoolsOperations(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); @@ -267,7 +292,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) } /// - /// Returns elastic pool metric definitions. + /// Gets an elastic pool. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -277,7 +302,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be retrieved. /// /// /// Headers that will be added to request. @@ -300,7 +325,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -331,11 +356,11 @@ internal ElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("elasticPoolName", elasticPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetricDefinitions", 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}/elasticPools/{elasticPoolName}/metricDefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}").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)); @@ -438,7 +463,7 @@ internal ElasticPoolsOperations(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")) @@ -451,7 +476,7 @@ internal ElasticPoolsOperations(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) { @@ -471,65 +496,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) } /// - /// Creates a new elastic pool or updates an existing elastic pool. - /// - /// - /// 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 elastic pool to be operated on (updated or created). - /// - /// - /// The required parameters for creating or updating an elastic pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an existing elastic pool. - /// - /// - /// 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 elastic pool to be updated. - /// - /// - /// The required parameters for updating an elastic pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the elastic pool. + /// Returns a list of elastic pools in a server. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -538,9 +505,6 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// The name of the server. /// - /// - /// The name of the elastic pool to be deleted. - /// /// /// Headers that will be added to request. /// @@ -550,6 +514,9 @@ internal ElasticPoolsOperations(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 /// @@ -559,7 +526,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, 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) { @@ -573,10 +540,6 @@ internal ElasticPoolsOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } - if (elasticPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); - } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -588,17 +551,15 @@ internal ElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); - tracingParameters.Add("elasticPoolName", elasticPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", 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}/elasticPools/{elasticPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -611,7 +572,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -662,7 +623,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -697,13 +658,31 @@ internal ElasticPoolsOperations(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); @@ -712,7 +691,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) } /// - /// Gets an elastic pool. + /// Returns elastic pool metrics. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -722,7 +701,10 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the elastic pool to be retrieved. + /// The name of the elastic pool. + /// + /// + /// An OData filter expression that describes a subset of metrics to return. /// /// /// Headers that will be added to request. @@ -745,7 +727,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -763,6 +745,10 @@ internal ElasticPoolsOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); } + if (filter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filter"); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -775,12 +761,13 @@ internal ElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("elasticPoolName", elasticPoolName); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetrics", 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}/elasticPools/{elasticPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics").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)); @@ -790,6 +777,10 @@ internal ElasticPoolsOperations(SqlManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -883,7 +874,7 @@ internal ElasticPoolsOperations(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")) @@ -896,7 +887,7 @@ internal ElasticPoolsOperations(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) { @@ -916,7 +907,7 @@ internal ElasticPoolsOperations(SqlManagementClient client) } /// - /// Returns a list of elastic pools in a server. + /// Returns elastic pool metric definitions. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -925,6 +916,9 @@ internal ElasticPoolsOperations(SqlManagementClient client) /// /// The name of the server. /// + /// + /// The name of the elastic pool. + /// /// /// Headers that will be added to request. /// @@ -946,7 +940,7 @@ internal ElasticPoolsOperations(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>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -960,6 +954,10 @@ internal ElasticPoolsOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serverName"); } + if (elasticPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "elasticPoolName"); + } string apiVersion = "2014-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -971,15 +969,17 @@ internal ElasticPoolsOperations(SqlManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); + tracingParameters.Add("elasticPoolName", elasticPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetricDefinitions", 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}/elasticPools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions").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("{elasticPoolName}", System.Uri.EscapeDataString(elasticPoolName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -1078,7 +1078,7 @@ internal ElasticPoolsOperations(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")) @@ -1091,7 +1091,7 @@ internal ElasticPoolsOperations(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) { diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs index f0b17003ce6a..e10eeb8e6e24 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ElasticPoolsOperationsExtensions.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Sql public static partial class ElasticPoolsOperationsExtensions { /// - /// Returns elastic pool metrics. + /// Creates a new elastic pool or updates an existing elastic pool. /// /// /// The operations group for this extension method. @@ -37,18 +37,18 @@ public static partial class ElasticPoolsOperationsExtensions /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be operated on (updated or created). /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// + /// The required parameters for creating or updating an elastic pool. /// - public static IEnumerable ListMetrics(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string filter) + public static ElasticPool CreateOrUpdate(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters) { - return operations.ListMetricsAsync(resourceGroupName, serverName, elasticPoolName, filter).GetAwaiter().GetResult(); + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).GetAwaiter().GetResult(); } /// - /// Returns elastic pool metrics. + /// Creates a new elastic pool or updates an existing elastic pool. /// /// /// The operations group for this extension method. @@ -61,24 +61,24 @@ public static IEnumerable ListMetrics(this IElasticPoolsOperations opera /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be operated on (updated or created). /// - /// - /// An OData filter expression that describes a subset of metrics to return. + /// + /// The required parameters for creating or updating an elastic pool. /// /// /// The cancellation token. /// - public static async Task> ListMetricsAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string filter, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, filter, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns elastic pool metric definitions. + /// Updates an existing elastic pool. /// /// /// The operations group for this extension method. @@ -91,15 +91,18 @@ public static IEnumerable ListMetrics(this IElasticPoolsOperations opera /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be updated. /// - public static IEnumerable ListMetricDefinitions(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) + /// + /// The required parameters for updating an elastic pool. + /// + public static ElasticPool Update(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters) { - return operations.ListMetricDefinitionsAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); + return operations.UpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).GetAwaiter().GetResult(); } /// - /// Returns elastic pool metric definitions. + /// Updates an existing elastic pool. /// /// /// The operations group for this extension method. @@ -112,21 +115,24 @@ public static IEnumerable ListMetricDefinitions(this IElasticP /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be updated. + /// + /// + /// The required parameters for updating an elastic pool. /// /// /// The cancellation token. /// - public static async Task> ListMetricDefinitionsAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates a new elastic pool or updates an existing elastic pool. + /// Deletes the elastic pool. /// /// /// The operations group for this extension method. @@ -139,18 +145,15 @@ public static IEnumerable ListMetricDefinitions(this IElasticP /// The name of the server. /// /// - /// The name of the elastic pool to be operated on (updated or created). - /// - /// - /// The required parameters for creating or updating an elastic pool. + /// The name of the elastic pool to be deleted. /// - public static ElasticPool CreateOrUpdate(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters) + public static void Delete(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) { - return operations.CreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); } /// - /// Creates a new elastic pool or updates an existing elastic pool. + /// Deletes the elastic pool. /// /// /// The operations group for this extension method. @@ -163,24 +166,18 @@ public static ElasticPool CreateOrUpdate(this IElasticPoolsOperations operations /// The name of the server. /// /// - /// The name of the elastic pool to be operated on (updated or created). - /// - /// - /// The required parameters for creating or updating an elastic pool. + /// The name of the elastic pool to be deleted. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Updates an existing elastic pool. + /// Gets an elastic pool. /// /// /// The operations group for this extension method. @@ -193,18 +190,15 @@ public static ElasticPool CreateOrUpdate(this IElasticPoolsOperations operations /// The name of the server. /// /// - /// The name of the elastic pool to be updated. - /// - /// - /// The required parameters for updating an elastic pool. + /// The name of the elastic pool to be retrieved. /// - public static ElasticPool Update(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters) + public static ElasticPool Get(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) { - return operations.UpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); } /// - /// Updates an existing elastic pool. + /// Gets an elastic pool. /// /// /// The operations group for this extension method. @@ -217,24 +211,21 @@ public static ElasticPool Update(this IElasticPoolsOperations operations, string /// The name of the server. /// /// - /// The name of the elastic pool to be updated. - /// - /// - /// The required parameters for updating an elastic pool. + /// The name of the elastic pool to be retrieved. /// /// /// The cancellation token. /// - public static async Task UpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes the elastic pool. + /// Returns a list of elastic pools in a server. /// /// /// The operations group for this extension method. @@ -246,16 +237,13 @@ public static ElasticPool Update(this IElasticPoolsOperations operations, string /// /// The name of the server. /// - /// - /// The name of the elastic pool to be deleted. - /// - public static void Delete(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) + public static IEnumerable ListByServer(this IElasticPoolsOperations operations, string resourceGroupName, string serverName) { - operations.DeleteAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); + return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); } /// - /// Deletes the elastic pool. + /// Returns a list of elastic pools in a server. /// /// /// The operations group for this extension method. @@ -267,19 +255,19 @@ public static void Delete(this IElasticPoolsOperations operations, string resour /// /// The name of the server. /// - /// - /// The name of the elastic pool to be deleted. - /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByServerAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Gets an elastic pool. + /// Returns elastic pool metrics. /// /// /// The operations group for this extension method. @@ -292,15 +280,18 @@ public static void Delete(this IElasticPoolsOperations operations, string resour /// The name of the server. /// /// - /// The name of the elastic pool to be retrieved. + /// The name of the elastic pool. /// - public static ElasticPool Get(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) + /// + /// An OData filter expression that describes a subset of metrics to return. + /// + public static IEnumerable ListMetrics(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string filter) { - return operations.GetAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); + return operations.ListMetricsAsync(resourceGroupName, serverName, elasticPoolName, filter).GetAwaiter().GetResult(); } /// - /// Gets an elastic pool. + /// Returns elastic pool metrics. /// /// /// The operations group for this extension method. @@ -313,21 +304,24 @@ public static ElasticPool Get(this IElasticPoolsOperations operations, string re /// The name of the server. /// /// - /// The name of the elastic pool to be retrieved. + /// The name of the elastic pool. + /// + /// + /// An OData filter expression that describes a subset of metrics to return. /// /// /// The cancellation token. /// - public static async Task GetAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListMetricsAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, string filter, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, filter, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Returns a list of elastic pools in a server. + /// Returns elastic pool metric definitions. /// /// /// The operations group for this extension method. @@ -339,13 +333,16 @@ public static ElasticPool Get(this IElasticPoolsOperations operations, string re /// /// The name of the server. /// - public static IEnumerable ListByServer(this IElasticPoolsOperations operations, string resourceGroupName, string serverName) + /// + /// The name of the elastic pool. + /// + public static IEnumerable ListMetricDefinitions(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName) { - return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + return operations.ListMetricDefinitionsAsync(resourceGroupName, serverName, elasticPoolName).GetAwaiter().GetResult(); } /// - /// Returns a list of elastic pools in a server. + /// Returns elastic pool metric definitions. /// /// /// The operations group for this extension method. @@ -357,12 +354,15 @@ public static IEnumerable ListByServer(this IElasticPoolsOperations /// /// The name of the server. /// + /// + /// The name of the elastic pool. + /// /// /// The cancellation token. /// - public static async Task> ListByServerAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListMetricDefinitionsAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabasesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabasesOperations.cs index 4c1fe01bf9ae..de2d6abb92c0 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabasesOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabasesOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Sql public partial interface IDatabasesOperations { /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The name of the resource group that contains the resource. You can @@ -34,8 +34,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// The headers that will be added to request. @@ -46,16 +46,12 @@ public partial interface IDatabasesOperations /// /// 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)); + Task PauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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. + /// Resumes a data warehouse. /// /// /// The name of the resource group that contains the resource. You can @@ -66,10 +62,7 @@ public partial interface IDatabasesOperations /// 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 data warehouse to resume. /// /// /// The headers that will be added to request. @@ -80,15 +73,12 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The name of the resource group that contains the resource. You can @@ -99,10 +89,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// /// /// The headers that will be added to request. @@ -119,9 +109,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns database metrics. + /// Updates an existing database. /// /// /// The name of the resource group that contains the resource. You can @@ -132,11 +122,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be updated. /// - /// - /// An OData filter expression that describes a subset of metrics to - /// return. + /// + /// The required parameters for updating a database. /// /// /// The headers that will be added to request. @@ -153,9 +142,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns database metric definitions. + /// Deletes a database. /// /// /// The name of the resource group that contains the resource. You can @@ -166,7 +155,7 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database. + /// The name of the database to be deleted. /// /// /// The headers that will be added to request. @@ -177,15 +166,12 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Pauses a data warehouse. + /// Gets a database. /// /// /// The name of the resource group that contains the resource. You can @@ -196,7 +182,12 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be retrieved. + /// + /// + /// A comma separated list of child objects to expand in the response. + /// Possible properties: serviceTierAdvisors, + /// transparentDataEncryption. /// /// /// The headers that will be added to request. @@ -207,12 +198,15 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task PauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Resumes a data warehouse. + /// Returns a list of databases in a server. /// /// /// The name of the resource group that contains the resource. You can @@ -222,8 +216,14 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// 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 headers that will be added to request. @@ -234,12 +234,15 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task ResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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)); /// - /// Creates a new database or updates an existing database. + /// Gets a database inside of an elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -249,11 +252,11 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the database to be operated on (updated or created). + /// + /// The name of the elastic pool to be retrieved. /// - /// - /// The required parameters for creating or updating a database. + /// + /// The name of the database to be retrieved. /// /// /// The headers that will be added to request. @@ -270,9 +273,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates an existing database. + /// Returns a list of databases in an elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -282,11 +285,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the database to be updated. - /// - /// - /// The required parameters for updating a database. + /// + /// The name of the elastic pool to be retrieved. /// /// /// The headers that will be added to request. @@ -303,9 +303,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes a database. + /// Gets a database inside of a recommented elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -315,8 +315,11 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// + /// + /// The name of the elastic pool to be retrieved. + /// /// - /// The name of the database to be deleted. + /// The name of the database to be retrieved. /// /// /// The headers that will be added to request. @@ -327,12 +330,15 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a database. + /// Returns a list of databases inside a recommented elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -342,13 +348,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the database to be retrieved. - /// - /// - /// A comma separated list of child objects to expand in the response. - /// Possible properties: serviceTierAdvisors, - /// transparentDataEncryption. + /// + /// The name of the recommended elastic pool to be retrieved. /// /// /// The headers that will be added to request. @@ -365,9 +366,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns a list of databases in a server. + /// Imports a bacpac into a new database. /// /// /// The name of the resource group that contains the resource. You can @@ -377,14 +378,8 @@ 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. + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// The headers that will be added to request. @@ -401,9 +396,10 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a database inside of an elastic pool. + /// 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 @@ -413,11 +409,11 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database to import into + /// + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// The headers that will be added to request. @@ -434,9 +430,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> GetByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns a list of databases in an elastic pool. + /// Exports a database to a bacpac. /// /// /// The name of the resource group that contains the resource. You can @@ -446,8 +442,11 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. + /// + /// The name of the database to be exported. + /// + /// + /// The required parameters for exporting a database. /// /// /// The headers that will be added to request. @@ -464,9 +463,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a database inside of a recommented elastic pool. + /// Returns database metrics. /// /// /// The name of the resource group that contains the resource. You can @@ -476,11 +475,12 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be retrieved. - /// /// - /// The name of the database to be retrieved. + /// The name of the database. + /// + /// + /// An OData filter expression that describes a subset of metrics to + /// return. /// /// /// The headers that will be added to request. @@ -497,9 +497,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> GetByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns a list of databases inside a recommented elastic pool. + /// Returns database metric definitions. /// /// /// The name of the resource group that contains the resource. You can @@ -509,8 +509,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the recommended elastic pool to be retrieved. + /// + /// The name of the database. /// /// /// The headers that will be added to request. @@ -527,7 +527,7 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByRecommendedElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string recommendedElasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Renames a database. /// @@ -559,7 +559,7 @@ public partial interface IDatabasesOperations /// Task RenameWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ResourceMoveDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Imports a bacpac into a new database. + /// Pauses a data warehouse. /// /// /// The name of the resource group that contains the resource. You can @@ -569,8 +569,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The required parameters for importing a Bacpac into a database. + /// + /// The name of the data warehouse to pause. /// /// /// The headers that will be added to request. @@ -581,16 +581,12 @@ public partial interface IDatabasesOperations /// /// 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)); + Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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. + /// Resumes a data warehouse. /// /// /// The name of the resource group that contains the resource. You can @@ -601,10 +597,7 @@ public partial interface IDatabasesOperations /// 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 data warehouse to resume. /// /// /// The headers that will be added to request. @@ -615,15 +608,12 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> BeginCreateImportOperationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ImportExtensionRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Exports a database to a bacpac. + /// Creates a new database or updates an existing database. /// /// /// The name of the resource group that contains the resource. You can @@ -634,10 +624,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database to be exported. + /// The name of the database to be operated on (updated or created). /// /// - /// The required parameters for exporting a database. + /// The required parameters for creating or updating a database. /// /// /// The headers that will be added to request. @@ -654,9 +644,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> BeginExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ExportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Pauses a data warehouse. + /// Updates an existing database. /// /// /// The name of the resource group that contains the resource. You can @@ -667,7 +657,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the data warehouse to pause. + /// The name of the database to be updated. + /// + /// + /// The required parameters for updating a database. /// /// /// The headers that will be added to request. @@ -678,12 +671,15 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task BeginPauseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Resumes a data warehouse. + /// Imports a bacpac into a new database. /// /// /// The name of the resource group that contains the resource. You can @@ -693,8 +689,8 @@ public partial interface IDatabasesOperations /// /// The name of the server. /// - /// - /// The name of the data warehouse to resume. + /// + /// The required parameters for importing a Bacpac into a database. /// /// /// The headers that will be added to request. @@ -705,12 +701,16 @@ public partial interface IDatabasesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginImportWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a new database or updates an existing database. + /// 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 @@ -721,10 +721,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database to be operated on (updated or created). + /// The name of the database to import into /// /// - /// The required parameters for creating or updating a database. + /// The required parameters for importing a Bacpac into a database. /// /// /// The headers that will be added to request. @@ -741,9 +741,9 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database 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)); /// - /// Updates an existing database. + /// Exports a database to a bacpac. /// /// /// The name of the resource group that contains the resource. You can @@ -754,10 +754,10 @@ public partial interface IDatabasesOperations /// The name of the server. /// /// - /// The name of the database to be updated. + /// The name of the database to be exported. /// /// - /// The required parameters for updating a database. + /// The required parameters for exporting a database. /// /// /// The headers that will be added to request. @@ -774,6 +774,6 @@ public partial interface IDatabasesOperations /// /// Thrown when a required parameter is null /// - Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseUpdate 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)); } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolOperations.cs new file mode 100644 index 000000000000..2b25543afa03 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolOperations.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ElasticPoolOperations operations. + /// + public partial interface IElasticPoolOperations + { + /// + /// Cancels the asynchronous operation on the elastic pool. + /// + /// + /// 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 identifier. + /// + /// + /// 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 CancelWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// 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>> ListByElasticPoolWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of operations performed on the elastic pool. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByElasticPoolNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolsOperations.cs index 559d71076844..fa3e54e8bc34 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IElasticPoolsOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Sql public partial interface IElasticPoolsOperations { /// - /// Returns elastic pool metrics. + /// Creates a new elastic pool or updates an existing elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -35,11 +35,11 @@ public partial interface IElasticPoolsOperations /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be operated on (updated or + /// created). /// - /// - /// An OData filter expression that describes a subset of metrics to - /// return. + /// + /// The required parameters for creating or updating an elastic pool. /// /// /// The headers that will be added to request. @@ -56,9 +56,9 @@ public partial interface IElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns elastic pool metric definitions. + /// Updates an existing elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -69,7 +69,10 @@ public partial interface IElasticPoolsOperations /// The name of the server. /// /// - /// The name of the elastic pool. + /// The name of the elastic pool to be updated. + /// + /// + /// The required parameters for updating an elastic pool. /// /// /// The headers that will be added to request. @@ -86,9 +89,9 @@ public partial interface IElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a new elastic pool or updates an existing elastic pool. + /// Deletes the elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -99,11 +102,7 @@ public partial interface IElasticPoolsOperations /// The name of the server. /// /// - /// The name of the elastic pool to be operated on (updated or - /// created). - /// - /// - /// The required parameters for creating or updating an elastic pool. + /// The name of the elastic pool to be deleted. /// /// /// The headers that will be added to request. @@ -114,15 +113,12 @@ public partial interface IElasticPoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates an existing elastic pool. + /// Gets an elastic pool. /// /// /// The name of the resource group that contains the resource. You can @@ -133,10 +129,7 @@ public partial interface IElasticPoolsOperations /// The name of the server. /// /// - /// The name of the elastic pool to be updated. - /// - /// - /// The required parameters for updating an elastic pool. + /// The name of the elastic pool to be retrieved. /// /// /// The headers that will be added to request. @@ -153,9 +146,9 @@ public partial interface IElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes the elastic pool. + /// Returns a list of elastic pools in a server. /// /// /// The name of the resource group that contains the resource. You can @@ -165,9 +158,6 @@ public partial interface IElasticPoolsOperations /// /// The name of the server. /// - /// - /// The name of the elastic pool to be deleted. - /// /// /// The headers that will be added to request. /// @@ -177,12 +167,15 @@ public partial interface IElasticPoolsOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets an elastic pool. + /// Returns elastic pool metrics. /// /// /// The name of the resource group that contains the resource. You can @@ -193,7 +186,11 @@ public partial interface IElasticPoolsOperations /// The name of the server. /// /// - /// The name of the elastic pool to be retrieved. + /// The name of the elastic pool. + /// + /// + /// An OData filter expression that describes a subset of metrics to + /// return. /// /// /// The headers that will be added to request. @@ -210,9 +207,9 @@ public partial interface IElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, string filter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns a list of elastic pools in a server. + /// Returns elastic pool metric definitions. /// /// /// The name of the resource group that contains the resource. You can @@ -222,6 +219,9 @@ public partial interface IElasticPoolsOperations /// /// The name of the server. /// + /// + /// The name of the elastic pool. + /// /// /// The headers that will be added to request. /// @@ -237,7 +237,7 @@ public partial interface IElasticPoolsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates a new elastic pool or updates an existing elastic pool. /// diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs index a2fc398b6afd..98f719a85c8a 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs @@ -35,7 +35,7 @@ public partial interface IRestorePointsOperations /// The name of the server. /// /// - /// The name of the database to get available restore points. + /// The name of the database. /// /// /// The headers that will be added to request. @@ -53,5 +53,104 @@ public partial interface IRestorePointsOperations /// Thrown when a required parameter is null /// Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this 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> CreateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string restorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs index f4a82e4f0db5..9c37c9b39a42 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs @@ -76,11 +76,6 @@ public partial interface ISqlManagementClient : System.IDisposable /// IBackupLongTermRetentionVaultsOperations BackupLongTermRetentionVaults { get; } - /// - /// Gets the IRestorePointsOperations. - /// - IRestorePointsOperations RestorePoints { get; } - /// /// Gets the IRecoverableDatabasesOperations. /// @@ -96,11 +91,21 @@ public partial interface ISqlManagementClient : System.IDisposable /// ICapabilitiesOperations Capabilities { get; } + /// + /// Gets the IServersOperations. + /// + IServersOperations Servers { get; } + /// /// Gets the IServerConnectionPoliciesOperations. /// IServerConnectionPoliciesOperations ServerConnectionPolicies { get; } + /// + /// Gets the IDatabasesOperations. + /// + IDatabasesOperations Databases { get; } + /// /// Gets the IDatabaseThreatDetectionPoliciesOperations. /// @@ -116,6 +121,11 @@ public partial interface ISqlManagementClient : System.IDisposable /// IDataMaskingRulesOperations DataMaskingRules { get; } + /// + /// Gets the IElasticPoolsOperations. + /// + IElasticPoolsOperations ElasticPools { get; } + /// /// Gets the IFirewallRulesOperations. /// @@ -126,16 +136,6 @@ public partial interface ISqlManagementClient : System.IDisposable /// IGeoBackupPoliciesOperations GeoBackupPolicies { get; } - /// - /// Gets the IDatabasesOperations. - /// - IDatabasesOperations Databases { get; } - - /// - /// Gets the IElasticPoolsOperations. - /// - IElasticPoolsOperations ElasticPools { get; } - /// /// Gets the IReplicationLinksOperations. /// @@ -156,11 +156,6 @@ public partial interface ISqlManagementClient : System.IDisposable /// IServiceObjectivesOperations ServiceObjectives { get; } - /// - /// Gets the IServersOperations. - /// - IServersOperations Servers { get; } - /// /// Gets the IElasticPoolActivitiesOperations. /// @@ -256,11 +251,6 @@ public partial interface ISqlManagementClient : System.IDisposable /// IVirtualNetworkRulesOperations VirtualNetworkRules { get; } - /// - /// Gets the IDatabaseOperations. - /// - IDatabaseOperations DatabaseOperations { get; } - /// /// Gets the IServerAutomaticTuningOperations. /// @@ -271,5 +261,20 @@ public partial interface ISqlManagementClient : System.IDisposable /// IServerDnsAliasesOperations ServerDnsAliases { get; } + /// + /// Gets the IRestorePointsOperations. + /// + IRestorePointsOperations RestorePoints { get; } + + /// + /// Gets the IDatabaseOperations. + /// + IDatabaseOperations DatabaseOperations { get; } + + /// + /// Gets the IElasticPoolOperations. + /// + IElasticPoolOperations ElasticPoolOperations { get; } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/CreateDatabaseRestorePointDefinition.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/CreateDatabaseRestorePointDefinition.cs new file mode 100644 index 000000000000..12b0799a1cc8 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/CreateDatabaseRestorePointDefinition.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Contains the information necessary to perform a create database restore + /// point operation. + /// + public partial class CreateDatabaseRestorePointDefinition + { + /// + /// Initializes a new instance of the + /// CreateDatabaseRestorePointDefinition class. + /// + public CreateDatabaseRestorePointDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateDatabaseRestorePointDefinition class. + /// + /// The restore point label to + /// apply + public CreateDatabaseRestorePointDefinition(string restorePointLabel) + { + RestorePointLabel = restorePointLabel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the restore point label to apply + /// + [JsonProperty(PropertyName = "restorePointLabel")] + public string RestorePointLabel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RestorePointLabel == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RestorePointLabel"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseOperation.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseOperation.cs index 57b7356b8170..98d64dc4bfb6 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseOperation.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseOperation.cs @@ -53,7 +53,12 @@ public DatabaseOperation() /// The operation error severity. /// Whether or not the error is a user /// error. - public DatabaseOperation(string id = default(string), string name = default(string), string type = default(string), string databaseName = default(string), string operation = default(string), string operationFriendlyName = default(string), int? percentComplete = default(int?), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string), int? errorCode = default(int?), string errorDescription = default(string), int? errorSeverity = default(int?), bool? isUserError = default(bool?)) + /// The estimated completion time + /// of the operation. + /// The operation description. + /// Whether the operation can be + /// cancelled. + public DatabaseOperation(string id = default(string), string name = default(string), string type = default(string), string databaseName = default(string), string operation = default(string), string operationFriendlyName = default(string), int? percentComplete = default(int?), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string), int? errorCode = default(int?), string errorDescription = default(string), int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTime? estimatedCompletionTime = default(System.DateTime?), string description = default(string), bool? isCancellable = default(bool?)) : base(id, name, type) { DatabaseName = databaseName; @@ -67,6 +72,9 @@ public DatabaseOperation() ErrorDescription = errorDescription; ErrorSeverity = errorSeverity; IsUserError = isUserError; + EstimatedCompletionTime = estimatedCompletionTime; + Description = description; + IsCancellable = isCancellable; CustomInit(); } @@ -143,5 +151,23 @@ public DatabaseOperation() [JsonProperty(PropertyName = "properties.isUserError")] public bool? IsUserError { get; private set; } + /// + /// Gets the estimated completion time of the operation. + /// + [JsonProperty(PropertyName = "properties.estimatedCompletionTime")] + public System.DateTime? EstimatedCompletionTime { get; private set; } + + /// + /// Gets the operation description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; private set; } + + /// + /// Gets whether the operation can be cancelled. + /// + [JsonProperty(PropertyName = "properties.isCancellable")] + public bool? IsCancellable { get; private set; } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ElasticPoolOperation.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ElasticPoolOperation.cs new file mode 100644 index 000000000000..a75ff7f26cd2 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ElasticPoolOperation.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A elastic pool operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class ElasticPoolOperation : ProxyResource + { + /// + /// Initializes a new instance of the ElasticPoolOperation class. + /// + public ElasticPoolOperation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ElasticPoolOperation class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// The name of the elastic pool the + /// operation is being performed on. + /// The name of operation. + /// The friendly name of + /// operation. + /// The percentage of the operation + /// completed. + /// The name of the server. + /// The operation start time. + /// The operation state. + /// The operation error code. + /// The operation error + /// description. + /// The operation error severity. + /// Whether or not the error is a user + /// error. + /// The estimated completion time + /// of the operation. + /// The operation description. + /// Whether the operation can be + /// cancelled. + public ElasticPoolOperation(string id = default(string), string name = default(string), string type = default(string), string elasticPoolName = default(string), string operation = default(string), string operationFriendlyName = default(string), int? percentComplete = default(int?), string serverName = default(string), System.DateTime? startTime = default(System.DateTime?), string state = default(string), int? errorCode = default(int?), string errorDescription = default(string), int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTime? estimatedCompletionTime = default(System.DateTime?), string description = default(string), bool? isCancellable = default(bool?)) + : base(id, name, type) + { + ElasticPoolName = elasticPoolName; + Operation = operation; + OperationFriendlyName = operationFriendlyName; + PercentComplete = percentComplete; + ServerName = serverName; + StartTime = startTime; + State = state; + ErrorCode = errorCode; + ErrorDescription = errorDescription; + ErrorSeverity = errorSeverity; + IsUserError = isUserError; + EstimatedCompletionTime = estimatedCompletionTime; + Description = description; + IsCancellable = isCancellable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of the elastic pool the operation is being performed + /// on. + /// + [JsonProperty(PropertyName = "properties.elasticPoolName")] + public string ElasticPoolName { get; private set; } + + /// + /// Gets the name of operation. + /// + [JsonProperty(PropertyName = "properties.operation")] + public string Operation { get; private set; } + + /// + /// Gets the friendly name of operation. + /// + [JsonProperty(PropertyName = "properties.operationFriendlyName")] + public string OperationFriendlyName { get; private set; } + + /// + /// Gets the percentage of the operation completed. + /// + [JsonProperty(PropertyName = "properties.percentComplete")] + public int? PercentComplete { get; private set; } + + /// + /// Gets the name of the server. + /// + [JsonProperty(PropertyName = "properties.serverName")] + public string ServerName { get; private set; } + + /// + /// Gets the operation start time. + /// + [JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the operation state. + /// + [JsonProperty(PropertyName = "properties.state")] + public string State { get; private set; } + + /// + /// Gets the operation error code. + /// + [JsonProperty(PropertyName = "properties.errorCode")] + public int? ErrorCode { get; private set; } + + /// + /// Gets the operation error description. + /// + [JsonProperty(PropertyName = "properties.errorDescription")] + public string ErrorDescription { get; private set; } + + /// + /// Gets the operation error severity. + /// + [JsonProperty(PropertyName = "properties.errorSeverity")] + public int? ErrorSeverity { get; private set; } + + /// + /// Gets whether or not the error is a user error. + /// + [JsonProperty(PropertyName = "properties.isUserError")] + public bool? IsUserError { get; private set; } + + /// + /// Gets the estimated completion time of the operation. + /// + [JsonProperty(PropertyName = "properties.estimatedCompletionTime")] + public System.DateTime? EstimatedCompletionTime { get; private set; } + + /// + /// Gets the operation description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; private set; } + + /// + /// Gets whether the operation can be cancelled. + /// + [JsonProperty(PropertyName = "properties.isCancellable")] + public bool? IsCancellable { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePoint.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePoint.cs index aed6f24f4576..c84d48408d91 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePoint.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePoint.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.Sql.Models using System.Linq; /// - /// A database restore point. + /// Database restore points. /// [Rest.Serialization.JsonTransformation] public partial class RestorePoint : ProxyResource @@ -35,21 +35,23 @@ public RestorePoint() /// Resource ID. /// Resource name. /// Resource type. - /// The restore point type of the - /// database restore point. Possible values include: 'DISCRETE', - /// 'CONTINUOUS' - /// Restore point creation time - /// (ISO8601 format). Populated when restorePointType = CONTINUOUS. - /// Null otherwise. - /// Earliest restore time (ISO8601 - /// format). Populated when restorePointType = DISCRETE. Null - /// otherwise. - public RestorePoint(string id = default(string), string name = default(string), string type = default(string), RestorePointType? restorePointType = default(RestorePointType?), System.DateTime? restorePointCreationDate = default(System.DateTime?), System.DateTime? earliestRestoreDate = default(System.DateTime?)) + /// Resource location. + /// The type of restore point. Possible + /// values include: 'CONTINUOUS', 'DISCRETE' + /// The earliest time to which this + /// database can be restored + /// The time the backup was + /// taken + /// The label of restore point for + /// backup request by user + public RestorePoint(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RestorePointType? restorePointType = default(RestorePointType?), System.DateTime? earliestRestoreDate = default(System.DateTime?), System.DateTime? restorePointCreationDate = default(System.DateTime?), string restorePointLabel = default(string)) : base(id, name, type) { + Location = location; RestorePointType = restorePointType; - RestorePointCreationDate = restorePointCreationDate; EarliestRestoreDate = earliestRestoreDate; + RestorePointCreationDate = restorePointCreationDate; + RestorePointLabel = restorePointLabel; CustomInit(); } @@ -59,25 +61,35 @@ public RestorePoint() partial void CustomInit(); /// - /// Gets the restore point type of the database restore point. Possible - /// values include: 'DISCRETE', 'CONTINUOUS' + /// Gets resource location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + /// + /// Gets the type of restore point. Possible values include: + /// 'CONTINUOUS', 'DISCRETE' /// [JsonProperty(PropertyName = "properties.restorePointType")] public RestorePointType? RestorePointType { get; private set; } /// - /// Gets restore point creation time (ISO8601 format). Populated when - /// restorePointType = CONTINUOUS. Null otherwise. + /// Gets the earliest time to which this database can be restored + /// + [JsonProperty(PropertyName = "properties.earliestRestoreDate")] + public System.DateTime? EarliestRestoreDate { get; private set; } + + /// + /// Gets the time the backup was taken /// [JsonProperty(PropertyName = "properties.restorePointCreationDate")] public System.DateTime? RestorePointCreationDate { get; private set; } /// - /// Gets earliest restore time (ISO8601 format). Populated when - /// restorePointType = DISCRETE. Null otherwise. + /// Gets the label of restore point for backup request by user /// - [JsonProperty(PropertyName = "properties.earliestRestoreDate")] - public System.DateTime? EarliestRestoreDate { get; private set; } + [JsonProperty(PropertyName = "properties.restorePointLabel")] + public string RestorePointLabel { get; private set; } } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePointType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePointType.cs index 867b3fbd0f32..7fea7e7733ca 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePointType.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/RestorePointType.cs @@ -21,10 +21,10 @@ namespace Microsoft.Azure.Management.Sql.Models [JsonConverter(typeof(StringEnumConverter))] public enum RestorePointType { - [EnumMember(Value = "DISCRETE")] - DISCRETE, [EnumMember(Value = "CONTINUOUS")] - CONTINUOUS + CONTINUOUS, + [EnumMember(Value = "DISCRETE")] + DISCRETE } internal static class RestorePointTypeEnumExtension { @@ -37,10 +37,10 @@ internal static string ToSerializedValue(this RestorePointType value) { switch( value ) { - case RestorePointType.DISCRETE: - return "DISCRETE"; case RestorePointType.CONTINUOUS: return "CONTINUOUS"; + case RestorePointType.DISCRETE: + return "DISCRETE"; } return null; } @@ -49,10 +49,10 @@ internal static string ToSerializedValue(this RestorePointType value) { switch( value ) { - case "DISCRETE": - return RestorePointType.DISCRETE; case "CONTINUOUS": return RestorePointType.CONTINUOUS; + case "DISCRETE": + return RestorePointType.DISCRETE; } return null; } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs index b11e207b5d1c..cabba5ba3a84 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs @@ -61,7 +61,7 @@ internal RestorePointsOperations(SqlManagementClient client) /// The name of the server. /// /// - /// The name of the database to get available restore points. + /// The name of the database. /// /// /// Headers that will be added to request. @@ -86,10 +86,6 @@ internal RestorePointsOperations(SqlManagementClient client) /// public async Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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"); @@ -102,7 +98,11 @@ internal RestorePointsOperations(SqlManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); } - string apiVersion = "2014-04-01"; + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-03-01-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -110,20 +110,20 @@ internal RestorePointsOperations(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("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", 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}/restorePoints").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("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) { @@ -254,5 +254,487 @@ internal RestorePointsOperations(SqlManagementClient client) return _result; } + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this database. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string restorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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 (restorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restorePointName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-03-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("restorePointName", restorePointName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}").ToString(); + _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("{restorePointName}", System.Uri.EscapeDataString(restorePointName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-03-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + 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, "BeginCreate", 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}/restorePoints").ToString(); + _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("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 201 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs index 06e32f90875c..b0782b56dadb 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs @@ -37,7 +37,7 @@ public static partial class RestorePointsOperationsExtensions /// The name of the server. /// /// - /// The name of the database to get available restore points. + /// The name of the database. /// public static IEnumerable ListByDatabase(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName) { @@ -58,7 +58,7 @@ public static IEnumerable ListByDatabase(this IRestorePointsOperat /// The name of the server. /// /// - /// The name of the database to get available restore points. + /// The name of the database. /// /// /// The cancellation token. @@ -71,5 +71,167 @@ public static IEnumerable ListByDatabase(this IRestorePointsOperat } } + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this database. + /// + public static RestorePoint Create(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters) + { + return operations.CreateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this database. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a restore point. + /// + /// + /// 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 name of the restore point. + /// + public static RestorePoint Get(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName) + { + return operations.GetAsync(resourceGroupName, serverName, databaseName, restorePointName).GetAwaiter().GetResult(); + } + + /// + /// Gets a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, restorePointName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this database. + /// + public static RestorePoint BeginCreate(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters) + { + return operations.BeginCreateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a restore point for a data warehouse. + /// + /// + /// 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 definition for creating the restore point of this database. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs index d53069a04da3..5f2ec36d1013 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs @@ -18,13 +18,14 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "DataMaskingRules", "2014-04-01"), new Tuple("Sql", "DatabaseAutomaticTuning", "2015-05-01-preview"), new Tuple("Sql", "DatabaseBlobAuditingPolicies", "2015-05-01-preview"), - new Tuple("Sql", "DatabaseOperations", "2017-03-01-preview"), + new Tuple("Sql", "DatabaseOperations", "2017-10-01-preview"), new Tuple("Sql", "DatabaseThreatDetectionPolicies", "2014-04-01"), new Tuple("Sql", "DatabaseUsages", "2014-04-01"), new Tuple("Sql", "Databases", "2014-04-01"), new Tuple("Sql", "Databases", "2017-03-01-preview"), new Tuple("Sql", "ElasticPoolActivities", "2014-04-01"), new Tuple("Sql", "ElasticPoolDatabaseActivities", "2014-04-01"), + new Tuple("Sql", "ElasticPoolOperations", "2017-10-01-preview"), new Tuple("Sql", "ElasticPools", "2014-04-01"), new Tuple("Sql", "EncryptionProtectors", "2015-05-01-preview"), new Tuple("Sql", "FailoverGroups", "2015-05-01-preview"), @@ -35,7 +36,7 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "RecoverableDatabases", "2014-04-01"), new Tuple("Sql", "ReplicationLinks", "2014-04-01"), new Tuple("Sql", "RestorableDroppedDatabases", "2014-04-01"), - new Tuple("Sql", "RestorePoints", "2014-04-01"), + new Tuple("Sql", "RestorePoints", "2017-03-01-preview"), new Tuple("Sql", "ServerAutomaticTuning", "2017-03-01-preview"), new Tuple("Sql", "ServerAzureADAdministrators", "2014-04-01"), new Tuple("Sql", "ServerCommunicationLinks", "2014-04-01"), diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs index 81121d49a79f..ba1e9e5080bf 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs @@ -81,11 +81,6 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IBackupLongTermRetentionVaultsOperations BackupLongTermRetentionVaults { get; private set; } - /// - /// Gets the IRestorePointsOperations. - /// - public virtual IRestorePointsOperations RestorePoints { get; private set; } - /// /// Gets the IRecoverableDatabasesOperations. /// @@ -101,11 +96,21 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual ICapabilitiesOperations Capabilities { get; private set; } + /// + /// Gets the IServersOperations. + /// + public virtual IServersOperations Servers { get; private set; } + /// /// Gets the IServerConnectionPoliciesOperations. /// public virtual IServerConnectionPoliciesOperations ServerConnectionPolicies { get; private set; } + /// + /// Gets the IDatabasesOperations. + /// + public virtual IDatabasesOperations Databases { get; private set; } + /// /// Gets the IDatabaseThreatDetectionPoliciesOperations. /// @@ -121,6 +126,11 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IDataMaskingRulesOperations DataMaskingRules { get; private set; } + /// + /// Gets the IElasticPoolsOperations. + /// + public virtual IElasticPoolsOperations ElasticPools { get; private set; } + /// /// Gets the IFirewallRulesOperations. /// @@ -131,16 +141,6 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IGeoBackupPoliciesOperations GeoBackupPolicies { get; private set; } - /// - /// Gets the IDatabasesOperations. - /// - public virtual IDatabasesOperations Databases { get; private set; } - - /// - /// Gets the IElasticPoolsOperations. - /// - public virtual IElasticPoolsOperations ElasticPools { get; private set; } - /// /// Gets the IReplicationLinksOperations. /// @@ -161,11 +161,6 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IServiceObjectivesOperations ServiceObjectives { get; private set; } - /// - /// Gets the IServersOperations. - /// - public virtual IServersOperations Servers { get; private set; } - /// /// Gets the IElasticPoolActivitiesOperations. /// @@ -261,11 +256,6 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IVirtualNetworkRulesOperations VirtualNetworkRules { get; private set; } - /// - /// Gets the IDatabaseOperations. - /// - public virtual IDatabaseOperations DatabaseOperations { get; private set; } - /// /// Gets the IServerAutomaticTuningOperations. /// @@ -276,6 +266,21 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IServerDnsAliasesOperations ServerDnsAliases { get; private set; } + /// + /// Gets the IRestorePointsOperations. + /// + public virtual IRestorePointsOperations RestorePoints { get; private set; } + + /// + /// Gets the IDatabaseOperations. + /// + public virtual IDatabaseOperations DatabaseOperations { get; private set; } + + /// + /// Gets the IElasticPoolOperations. + /// + public virtual IElasticPoolOperations ElasticPoolOperations { get; private set; } + /// /// Initializes a new instance of the SqlManagementClient class. /// @@ -479,23 +484,22 @@ private void Initialize() { BackupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesOperations(this); BackupLongTermRetentionVaults = new BackupLongTermRetentionVaultsOperations(this); - RestorePoints = new RestorePointsOperations(this); RecoverableDatabases = new RecoverableDatabasesOperations(this); RestorableDroppedDatabases = new RestorableDroppedDatabasesOperations(this); Capabilities = new CapabilitiesOperations(this); + Servers = new ServersOperations(this); ServerConnectionPolicies = new ServerConnectionPoliciesOperations(this); + Databases = new DatabasesOperations(this); DatabaseThreatDetectionPolicies = new DatabaseThreatDetectionPoliciesOperations(this); DataMaskingPolicies = new DataMaskingPoliciesOperations(this); DataMaskingRules = new DataMaskingRulesOperations(this); + ElasticPools = new ElasticPoolsOperations(this); FirewallRules = new FirewallRulesOperations(this); GeoBackupPolicies = new GeoBackupPoliciesOperations(this); - Databases = new DatabasesOperations(this); - ElasticPools = new ElasticPoolsOperations(this); ReplicationLinks = new ReplicationLinksOperations(this); ServerAzureADAdministrators = new ServerAzureADAdministratorsOperations(this); ServerCommunicationLinks = new ServerCommunicationLinksOperations(this); ServiceObjectives = new ServiceObjectivesOperations(this); - Servers = new ServersOperations(this); ElasticPoolActivities = new ElasticPoolActivitiesOperations(this); ElasticPoolDatabaseActivities = new ElasticPoolDatabaseActivitiesOperations(this); RecommendedElasticPools = new RecommendedElasticPoolsOperations(this); @@ -515,9 +519,11 @@ private void Initialize() SyncMembers = new SyncMembersOperations(this); SubscriptionUsages = new SubscriptionUsagesOperations(this); VirtualNetworkRules = new VirtualNetworkRulesOperations(this); - DatabaseOperations = new DatabaseOperations(this); ServerAutomaticTuning = new ServerAutomaticTuningOperations(this); ServerDnsAliases = new ServerDnsAliasesOperations(this); + RestorePoints = new RestorePointsOperations(this); + DatabaseOperations = new DatabaseOperations(this); + ElasticPoolOperations = new ElasticPoolOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; diff --git a/src/SDKs/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs index fd8624f3b101..a6a88da68380 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/DatabaseCrudScenarioTests.cs @@ -317,7 +317,14 @@ public async Task TestCancelDatabaseOperation() resourceGroup.Name, server.Name, dbName).Result; Assert.Equal(response.Response.StatusCode, HttpStatusCode.OK); IList responseObject = response.Body.ToList(); - Assert.Equal(responseObject.Count(), 1); + Assert.Equal(1, responseObject.Count()); + Assert.Equal(0, responseObject[0].PercentComplete); + + // Also get the listOperation response for new added properties on database operations: ETA, Operation Description and IsCancellable + // Expected they have null value since not been updated by operation progress + Assert.Null(responseObject[0].Description); + Assert.Null(responseObject[0].IsCancellable); + Assert.Null(responseObject[0].EstimatedCompletionTime); // Cancel the database updateslo operation // diff --git a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs index 5176f0f7434b..48a269543a89 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs @@ -5,9 +5,13 @@ using Microsoft.Azure.Management.ResourceManager.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Rest.Azure; using System; using System.Collections.Generic; using System.Linq; +using System.Net; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Sql.Tests @@ -98,6 +102,71 @@ public void TestUpdateElasticPoolWithUpdateAndListActivity() }; } + [Fact] + public async Task TestCancelUpdateElasticPoolOperation() + { + /* * + * In this test we only test the cancel operation on resize pool from Premium to Premium + * since currently we only support Cancel pool resize operation on Premium <-> Premium + * */ + string testPrefix = "sqlelasticpoollistcanceloperation-"; + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup("North Europe"); + Server server = context.CreateServer(resourceGroup, "northeurope"); + SqlManagementClient sqlClient = context.GetClient(); + Dictionary tags = new Dictionary() + { + { "tagKey1", "TagValue1"} + }; + + // Create a premium elastic pool with required parameters + string epName = SqlManagementTestUtilities.GenerateName(); + var epInput = new ElasticPool() + { + Location = server.Location, + Edition = DatabaseEdition.Premium, + Tags = tags, + Dtu = 125 + }; + var elasticPool = sqlClient.ElasticPools.CreateOrUpdate(resourceGroup.Name, server.Name, epName, epInput); + SqlManagementTestUtilities.ValidateElasticPool(epInput, elasticPool, epName); + Assert.NotNull(elasticPool); + + // Update elastic pool to Premium with 250 DTU + var epUpdateReponse = sqlClient.ElasticPools.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroup.Name, server.Name, epName, new ElasticPool() + { + Location = server.Location, + Edition = DatabaseEdition.Premium, + Dtu = 250, + Tags = tags + }); + Thread.Sleep(TimeSpan.FromSeconds(5)); + + // Get the pool update operation for new added properties on elastic pool operations: ETA, Operation Description and IsCancellable + // Expected they have null value since not been updated by operation progress + AzureOperationResponse> response = sqlClient.ElasticPoolOperations.ListByElasticPoolWithHttpMessagesAsync(resourceGroup.Name, server.Name, epName).Result; + Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode); + IList responseObject = response.Body.ToList(); + Assert.Single(responseObject); + Assert.NotNull(responseObject[0].PercentComplete); + Assert.Null(responseObject[0].EstimatedCompletionTime); + Assert.Null(responseObject[0].Description); + Assert.Null(responseObject[0].IsCancellable); + + // Cancel the elastic pool update operation + string requestId = responseObject[0].Name; + sqlClient.ElasticPoolOperations.Cancel(resourceGroup.Name, server.Name, epName, Guid.Parse(requestId)); + CloudException ex = await Assert.ThrowsAsync(() => sqlClient.GetPutOrPatchOperationResultAsync(epUpdateReponse.Result, new Dictionary>(), CancellationToken.None)); + Assert.Contains("OperationCancelled", ex.Body.Code); + + // Make sure the elastic pool is not updated due to cancel operation + var epGetResponse = sqlClient.ElasticPools.Get(resourceGroup.Name, server.Name, epName); + Assert.Equal(125, epGetResponse.Dtu); + Assert.Equal(DatabaseEdition.Premium, epGetResponse.Edition); + } + } + private void TestUpdateElasticPool( SqlManagementClient sqlClient, ResourceGroup resourceGroup, diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestCancelDatabaseOperation.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestCancelDatabaseOperation.json index 9aeb55479306..e71796cd91ef 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestCancelDatabaseOperation.json +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseCrudScenarioTests/TestCancelDatabaseOperation.json @@ -1,10 +1,10 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourcegroups/sqlcrudtest-9681?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTk2ODE/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourcegroups/sqlcrudtest-2365?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIzNjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"North Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-9681\": \"2017-09-20 20:27:12Z\"\r\n }\r\n}", + "RequestBody": "{\r\n \"location\": \"North Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-2365\": \"2018-03-03 01:05:02Z\"\r\n }\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -13,17 +13,17 @@ "101" ], "x-ms-client-request-id": [ - "aa1acadd-d189-43a8-9baf-983bcc8c9f69" + "87026daa-307a-4f3f-8768-6bfc69f432eb" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", + "FxVersion/4.6.26011.01", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681\",\r\n \"name\": \"sqlcrudtest-9681\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-9681\": \"2017-09-20 20:27:12Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365\",\r\n \"name\": \"sqlcrudtest-2365\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-2365\": \"2018-03-03 01:05:02Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "241" @@ -38,32 +38,35 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:27:15 GMT" + "Sat, 03 Mar 2018 01:05:02 GMT" ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1191" ], "x-ms-request-id": [ - "b87a5d59-99d8-4446-8180-381c482cbad2" + "ec313c66-a58f-4fbb-b632-3f4673091997" ], "x-ms-correlation-request-id": [ - "b87a5d59-99d8-4446-8180-381c482cbad2" + "ec313c66-a58f-4fbb-b632-3f4673091997" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202716Z:b87a5d59-99d8-4446-8180-381c482cbad2" + "CENTRALUS:20180303T010503Z:ec313c66-a58f-4fbb-b632-3f4673091997" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143?api-version=2015-05-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"version\": \"12.0\"\r\n },\r\n \"tags\": {},\r\n \"location\": \"northeurope\"\r\n}", "RequestHeaders": { @@ -74,20 +77,20 @@ "185" ], "x-ms-client-request-id": [ - "acbd83b1-e485-4e99-9507-e3d03c5c3cc3" + "59f31608-f6af-460d-b5b4-8f0ef91f6565" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2017-09-20T20:27:20Z\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-03-03T01:05:06.437Z\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "70" + "74" ], "Content-Type": [ "application/json; charset=utf-8" @@ -99,13 +102,13 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:27:21 GMT" + "Sat, 03 Mar 2018 01:05:06 GMT" ], "Pragma": [ "no-cache" ], "Location": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/locations/northeurope/serverOperationResults/a5144289-8e26-4a7a-89b7-a9d7fb22940b?api-version=2015-05-01-preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/locations/northeurope/serverOperationResults/1c17dea9-aabd-4b7e-9a45-6ff14fe2e470?api-version=2015-05-01-preview" ], "Retry-After": [ "1" @@ -114,38 +117,41 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/a5144289-8e26-4a7a-89b7-a9d7fb22940b?api-version=2015-05-01-preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/1c17dea9-aabd-4b7e-9a45-6ff14fe2e470?api-version=2015-05-01-preview" ], "x-ms-request-id": [ - "a5144289-8e26-4a7a-89b7-a9d7fb22940b" + "1c17dea9-aabd-4b7e-9a45-6ff14fe2e470" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1188" ], "x-ms-correlation-request-id": [ - "c5cd533e-d9f6-49fa-ada7-fe8d6504d067" + "125ccd2c-a9b1-460e-89ad-29f73f9ec5e2" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202722Z:c5cd533e-d9f6-49fa-ada7-fe8d6504d067" + "CENTRALUS:20180303T010506Z:125ccd2c-a9b1-460e-89ad-29f73f9ec5e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/a5144289-8e26-4a7a-89b7-a9d7fb22940b?api-version=2015-05-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYTUxNDQyODktOGUyNi00YTdhLTg5YjctYTlkN2ZiMjI5NDBiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/1c17dea9-aabd-4b7e-9a45-6ff14fe2e470?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMWMxN2RlYTktYWFiZC00YjdlLTlhNDUtNmZmMTRmZTJlNDcwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"a5144289-8e26-4a7a-89b7-a9d7fb22940b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2017-09-20T20:27:20Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"1c17dea9-aabd-4b7e-9a45-6ff14fe2e470\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-03-03T01:05:06.437Z\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -157,7 +163,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:27:31 GMT" + "Sat, 03 Mar 2018 01:05:16 GMT" ], "Pragma": [ "no-cache" @@ -175,35 +181,38 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "a2982bd0-2a71-4520-8182-e069d2c53ac6" + "f533978a-40d5-41fc-8f91-3649b1fa144c" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14992" + "14964" ], "x-ms-correlation-request-id": [ - "8e1d5b5a-7c2b-4ab2-b710-6470310cc8f3" + "437bcd5c-e0d5-4e6e-90a6-ee0145b66b9b" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202732Z:8e1d5b5a-7c2b-4ab2-b710-6470310cc8f3" + "CENTRALUS:20180303T010517Z:437bcd5c-e0d5-4e6e-90a6-ee0145b66b9b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/a5144289-8e26-4a7a-89b7-a9d7fb22940b?api-version=2015-05-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYTUxNDQyODktOGUyNi00YTdhLTg5YjctYTlkN2ZiMjI5NDBiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/1c17dea9-aabd-4b7e-9a45-6ff14fe2e470?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMWMxN2RlYTktYWFiZC00YjdlLTlhNDUtNmZmMTRmZTJlNDcwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"a5144289-8e26-4a7a-89b7-a9d7fb22940b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2017-09-20T20:27:20Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"1c17dea9-aabd-4b7e-9a45-6ff14fe2e470\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-03-03T01:05:06.437Z\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -215,7 +224,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:27:52 GMT" + "Sat, 03 Mar 2018 01:05:36 GMT" ], "Pragma": [ "no-cache" @@ -233,35 +242,38 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "91e0f7bc-eef8-4bb3-8aa6-8e16c331f19d" + "a0b03b31-e2f1-453b-8e3b-fca84f984bcf" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14991" + "14963" ], "x-ms-correlation-request-id": [ - "0fe17137-f8ff-424a-a448-a128ea8bd5be" + "974b9eef-4d32-4284-afeb-bc124b48997d" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202752Z:0fe17137-f8ff-424a-a448-a128ea8bd5be" + "CENTRALUS:20180303T010537Z:974b9eef-4d32-4284-afeb-bc124b48997d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/a5144289-8e26-4a7a-89b7-a9d7fb22940b?api-version=2015-05-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYTUxNDQyODktOGUyNi00YTdhLTg5YjctYTlkN2ZiMjI5NDBiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/1c17dea9-aabd-4b7e-9a45-6ff14fe2e470?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMWMxN2RlYTktYWFiZC00YjdlLTlhNDUtNmZmMTRmZTJlNDcwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"a5144289-8e26-4a7a-89b7-a9d7fb22940b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2017-09-20T20:27:20Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"1c17dea9-aabd-4b7e-9a45-6ff14fe2e470\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-03-03T01:05:06.437Z\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -273,7 +285,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:28:13 GMT" + "Sat, 03 Mar 2018 01:05:57 GMT" ], "Pragma": [ "no-cache" @@ -291,35 +303,38 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "49d374b8-b9ce-412f-8d8b-46ff24b1821f" + "d6962722-d4ac-4f52-9b44-f8534928f8e4" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14990" + "14962" ], "x-ms-correlation-request-id": [ - "9c67c6b3-0e9c-40f8-8c49-e0b01f9bed32" + "512325de-14a5-4f6d-8110-206769d13e3c" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202813Z:9c67c6b3-0e9c-40f8-8c49-e0b01f9bed32" + "CENTRALUS:20180303T010557Z:512325de-14a5-4f6d-8110-206769d13e3c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143?api-version=2015-05-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"sqlcrudtest-9143.sqltest-eg1.mscds.com\"\r\n },\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143\",\r\n \"name\": \"sqlcrudtest-9143\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"sqlcrudtest-4052.sqltest-eg1.mscds.com\"\r\n },\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052\",\r\n \"name\": \"sqlcrudtest-4052\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -331,7 +346,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:28:13 GMT" + "Sat, 03 Mar 2018 01:05:57 GMT" ], "Pragma": [ "no-cache" @@ -346,26 +361,29 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "5ce8a162-fec4-4329-b82c-68b0f283a2bc" + "0c4c5c1f-34d3-476f-80d2-70062c49fd6e" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14989" + "14961" ], "x-ms-correlation-request-id": [ - "7c202e20-802c-41bb-a703-14c6245f773d" + "cf54e6d3-3b1b-4af8-9bd9-73727f43ffad" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202813Z:7c202e20-802c-41bb-a703-14c6245f773d" + "CENTRALUS:20180303T010557Z:cf54e6d3-3b1b-4af8-9bd9-73727f43ffad" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"requestedServiceObjectiveName\": \"S0\"\r\n },\r\n \"location\": \"northeurope\"\r\n}", "RequestHeaders": { @@ -376,17 +394,17 @@ "101" ], "x-ms-client-request-id": [ - "4521b9ca-4e32-4735-b3d3-7387aa10ea13" + "b784c3e0-f2c4-4cc6-ab4c-3891c2feef59" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2017-09-20T13:28:15.237-07:00\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-03-02T17:05:58.977-08:00\"\r\n}", "ResponseHeaders": { "Content-Length": [ "80" @@ -398,10 +416,10 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:28:15 GMT" + "Sat, 03 Mar 2018 01:05:59 GMT" ], "Location": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/operationResults/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/operationResults/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" ], "Retry-After": [ "30" @@ -410,7 +428,7 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "c7878625-787e-4257-813f-d3845be9fbda" + "9ce55440-083c-414a-9f45-bfb6c711eb98" ], "X-Content-Type-Options": [ "nosniff" @@ -425,23 +443,23 @@ "max-age=31536000; includeSubDomains" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1187" ], "x-ms-correlation-request-id": [ - "ec17436b-fdd7-418c-90ee-156bbebe535b" + "0553a42e-0668-47b2-9607-1ab3690fae14" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202816Z:ec17436b-fdd7-418c-90ee-156bbebe535b" + "CENTRALUS:20180303T010559Z:0553a42e-0668-47b2-9607-1ab3690fae14" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"requestedServiceObjectiveName\": \"P2\"\r\n },\r\n \"location\": \"northeurope\"\r\n}", "RequestHeaders": { @@ -452,17 +470,17 @@ "101" ], "x-ms-client-request-id": [ - "3d9491e9-9f36-4137-a372-34bb0b96a3fb" + "4b573e59-7fba-4ac9-982e-d24a873cdefd" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operation\": \"AlterDatabaseOperation\",\r\n \"startTime\": \"2017-09-20T13:29:17.79-07:00\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"AlterDatabaseOperation\",\r\n \"startTime\": \"2018-03-02T17:08:01.233-08:00\"\r\n}", "ResponseHeaders": { "Content-Length": [ "81" @@ -474,10 +492,10 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:17 GMT" + "Sat, 03 Mar 2018 01:08:00 GMT" ], "Location": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/operationResults/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/operationResults/e6e6461e-70c1-4ad1-8573-92a306838b2e?api-version=2014-04-01-Preview" ], "Retry-After": [ "30" @@ -486,7 +504,7 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d" + "e6e6461e-70c1-4ad1-8573-92a306838b2e" ], "X-Content-Type-Options": [ "nosniff" @@ -501,32 +519,32 @@ "max-age=31536000; includeSubDomains" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/e6e6461e-70c1-4ad1-8573-92a306838b2e?api-version=2014-04-01-Preview" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "1186" ], "x-ms-correlation-request-id": [ - "4dc22a5e-0ba5-432b-8048-413499623c17" + "385a1a03-9d7f-4164-85f9-b7b5f15735c9" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202918Z:4dc22a5e-0ba5-432b-8048-413499623c17" + "CENTRALUS:20180303T010801Z:385a1a03-9d7f-4164-85f9-b7b5f15735c9" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MS9henVyZUFzeW5jT3BlcmF0aW9uL2M3ODc4NjI1LTc4N2UtNDI1Ny04MTNmLWQzODQ1YmU5ZmJkYT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9henVyZUFzeW5jT3BlcmF0aW9uLzljZTU1NDQwLTA4M2MtNDE0YS05ZjQ1LWJmYjZjNzExZWI5OD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operationId\": \"c7878625-787e-4257-813f-d3845be9fbda\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", + "ResponseBody": "{\r\n \"operationId\": \"9ce55440-083c-414a-9f45-bfb6c711eb98\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" @@ -535,7 +553,7 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:28:46 GMT" + "Sat, 03 Mar 2018 01:06:28 GMT" ], "Transfer-Encoding": [ "chunked" @@ -547,7 +565,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "7d68c07f-6996-4f91-a210-1d9bed5b3661" + "195ee049-9cc0-4b41-81c0-c5e43bf0d6ca" ], "X-Content-Type-Options": [ "nosniff" @@ -559,32 +577,32 @@ "max-age=31536000; includeSubDomains" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "14960" ], "x-ms-correlation-request-id": [ - "f1c9ff74-1cd1-4711-a536-0bb2a2df362a" + "fb2db34d-7449-4720-9ab4-bb9c21fe16de" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202846Z:f1c9ff74-1cd1-4711-a536-0bb2a2df362a" + "CENTRALUS:20180303T010629Z:fb2db34d-7449-4720-9ab4-bb9c21fe16de" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MS9henVyZUFzeW5jT3BlcmF0aW9uL2M3ODc4NjI1LTc4N2UtNDI1Ny04MTNmLWQzODQ1YmU5ZmJkYT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9henVyZUFzeW5jT3BlcmF0aW9uLzljZTU1NDQwLTA4M2MtNDE0YS05ZjQ1LWJmYjZjNzExZWI5OD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operationId\": \"c7878625-787e-4257-813f-d3845be9fbda\",\r\n \"status\": \"Succeeded\",\r\n \"error\": null\r\n}", + "ResponseBody": "{\r\n \"operationId\": \"9ce55440-083c-414a-9f45-bfb6c711eb98\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" @@ -593,7 +611,7 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:16 GMT" + "Sat, 03 Mar 2018 01:06:58 GMT" ], "Transfer-Encoding": [ "chunked" @@ -605,7 +623,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "326d7871-df35-4b69-818c-82ed5d11e07a" + "90399019-84ab-4b6b-ac14-0153e9e6f728" ], "X-Content-Type-Options": [ "nosniff" @@ -617,32 +635,32 @@ "max-age=31536000; includeSubDomains" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c7878625-787e-4257-813f-d3845be9fbda?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "14959" ], "x-ms-correlation-request-id": [ - "0076e459-0409-4aec-96ab-589bdb300c5f" + "88a9ca12-387e-4872-8ff7-1cad1acb4500" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202916Z:0076e459-0409-4aec-96ab-589bdb300c5f" + "CENTRALUS:20180303T010659Z:88a9ca12-387e-4872-8ff7-1cad1acb4500" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9henVyZUFzeW5jT3BlcmF0aW9uLzljZTU1NDQwLTA4M2MtNDE0YS05ZjQ1LWJmYjZjNzExZWI5OD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841\",\r\n \"name\": \"sqldblistcanceloperation-2841\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"021cfbc0-2b73-493f-8de0-c25879cff7fe\",\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-09-20T20:28:15.613Z\",\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\": \"Southeast Asia\",\r\n \"earliestRestoreDate\": \"2017-09-20T20:38:54.183Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseBody": "{\r\n \"operationId\": \"9ce55440-083c-414a-9f45-bfb6c711eb98\",\r\n \"status\": \"InProgress\",\r\n \"error\": null\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" @@ -651,7 +669,7 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:16 GMT" + "Sat, 03 Mar 2018 01:07:29 GMT" ], "Transfer-Encoding": [ "chunked" @@ -663,7 +681,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "2bbf564b-dc1b-4922-8e75-8512dcc4b1df" + "78c223ec-a04c-489a-9aa5-4c2fae4f57f8" ], "X-Content-Type-Options": [ "nosniff" @@ -674,36 +692,152 @@ "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" + ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14983" + "14958" ], "x-ms-correlation-request-id": [ - "294f2b94-7c05-4183-860e-a965b5b189a8" + "5ca88a7e-7342-4a21-ad70-25746a74605b" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202916Z:294f2b94-7c05-4183-860e-a965b5b189a8" + "CENTRALUS:20180303T010729Z:5ca88a7e-7342-4a21-ad70-25746a74605b" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9henVyZUFzeW5jT3BlcmF0aW9uLzljZTU1NDQwLTA4M2MtNDE0YS05ZjQ1LWJmYjZjNzExZWI5OD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"operationId\": \"9ce55440-083c-414a-9f45-bfb6c711eb98\",\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, 03 Mar 2018 01:07:59 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2517d5d7-89ed-466a-879e-513f864e978f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Azure-AsyncOperation": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/9ce55440-083c-414a-9f45-bfb6c711eb98?api-version=2014-04-01-Preview" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14957" + ], + "x-ms-correlation-request-id": [ + "f5ad6f90-b21d-4019-966b-e2c84c92733a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010800Z:f5ad6f90-b21d-4019-966b-e2c84c92733a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849\",\r\n \"name\": \"sqldblistcanceloperation-9849\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"v12.0,user\",\r\n \"managedBy\": null,\r\n \"properties\": {\r\n \"databaseId\": \"738dd6ad-c962-4b1f-888f-54f9b7ccd69b\",\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\": \"2018-03-03T01:05:59.54Z\",\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\": \"Southeast Asia\",\r\n \"earliestRestoreDate\": \"2018-03-03T01:37:42.54Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null,\r\n \"zoneRedundant\": false,\r\n \"isUpgradeRequested\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:07:59 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a7df044d-855f-408b-8d91-0e6e23cf5ca9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "1d7100d3-75f1-4224-a741-32418f0378e4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010800Z:1d7100d3-75f1-4224-a741-32418f0378e4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "b5b95ec5-b4ac-47e7-a0c7-67c3c4767639" + "68503e6f-cdb7-4bf3-9780-0683037bf9ce" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841\",\r\n \"name\": \"sqldblistcanceloperation-2841\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"021cfbc0-2b73-493f-8de0-c25879cff7fe\",\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-09-20T20:28:15.613Z\",\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\": \"Southeast Asia\",\r\n \"earliestRestoreDate\": \"2017-09-20T20:38:54.183Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849\",\r\n \"name\": \"sqldblistcanceloperation-9849\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"v12.0,user\",\r\n \"managedBy\": null,\r\n \"properties\": {\r\n \"databaseId\": \"738dd6ad-c962-4b1f-888f-54f9b7ccd69b\",\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\": \"2018-03-03T01:05:59.54Z\",\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\": \"Southeast Asia\",\r\n \"earliestRestoreDate\": \"2018-03-03T01:37:42.54Z\",\r\n \"elasticPoolName\": null,\r\n \"containmentState\": 2,\r\n \"readScale\": \"Disabled\",\r\n \"failoverGroupId\": null,\r\n \"zoneRedundant\": false,\r\n \"isUpgradeRequested\": false\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" @@ -712,7 +846,7 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:51 GMT" + "Sat, 03 Mar 2018 01:08:34 GMT" ], "Transfer-Encoding": [ "chunked" @@ -724,7 +858,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "ee33d57d-2217-4e7f-b8b1-9c288393153a" + "0a1fbfcb-65c2-4a66-abab-f0d5aebe8ea1" ], "X-Content-Type-Options": [ "nosniff" @@ -736,35 +870,35 @@ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14980" + "14953" ], "x-ms-correlation-request-id": [ - "5225096d-699b-403e-94ff-41d006d4dab7" + "1616e9bd-dbd5-4537-9a26-ae27df903227" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202952Z:5225096d-699b-403e-94ff-41d006d4dab7" + "CENTRALUS:20180303T010834Z:1616e9bd-dbd5-4537-9a26-ae27df903227" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/operations?api-version=2017-03-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MS9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/operations?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "d9c8ea25-a176-4487-ab4e-28bc9773449a" + "b0e0d3d6-2130-4685-8893-60cbeb32bfdf" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"databaseName\": \"sqldblistcanceloperation-2841\",\r\n \"operation\": \"UpdateLogicalDatabase\",\r\n \"operationFriendlyName\": \"ALTER DATABASE\",\r\n \"percentComplete\": 0,\r\n \"serverName\": \"sqlcrudtest-9143\",\r\n \"startTime\": \"2017-09-20T20:29:16.727Z\",\r\n \"state\": \"InProgress\"\r\n },\r\n \"id\": \"/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/operations/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d\",\r\n \"name\": \"c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d\",\r\n \"type\": \"Microsoft.Sql/servers/databases/operations\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"databaseName\": \"sqldblistcanceloperation-9849\",\r\n \"operation\": \"UpdateLogicalDatabase\",\r\n \"operationFriendlyName\": \"ALTER DATABASE\",\r\n \"percentComplete\": 0,\r\n \"serverName\": \"sqlcrudtest-4052\",\r\n \"startTime\": \"2018-03-03T01:08:01.203Z\",\r\n \"state\": \"InProgress\"\r\n },\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/operations/e6e6461e-70c1-4ad1-8573-92a306838b2e\",\r\n \"name\": \"e6e6461e-70c1-4ad1-8573-92a306838b2e\",\r\n \"type\": \"Microsoft.Sql/servers/databases/operations\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -776,7 +910,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:20 GMT" + "Sat, 03 Mar 2018 01:08:02 GMT" ], "Pragma": [ "no-cache" @@ -791,38 +925,41 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "e65f4dfb-9937-4026-ad50-561e8c1bd907" + "46aa5e29-a5df-4c7d-9e40-ab9cb7cbb289" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14982" + "14955" ], "x-ms-correlation-request-id": [ - "77b6d749-c87f-4bfb-af1a-8a000a76bc41" + "640922fe-ef0e-46c3-be5d-69fa3e21e1d8" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202920Z:77b6d749-c87f-4bfb-af1a-8a000a76bc41" + "CENTRALUS:20180303T010803Z:640922fe-ef0e-46c3-be5d-69fa3e21e1d8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/operations/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d/cancel?api-version=2017-03-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MS9vcGVyYXRpb25zL2MzMjQzM2I4LWE2ZmEtNGJhNC1hZDVjLTJmNjRlNGExNzUxZC9jYW5jZWw/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/operations/e6e6461e-70c1-4ad1-8573-92a306838b2e/cancel?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9vcGVyYXRpb25zL2U2ZTY0NjFlLTcwYzEtNGFkMS04NTczLTkyYTMwNjgzOGIyZS9jYW5jZWw/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "ea818027-8f43-4479-84df-3b9bc813082b" + "cadd8964-69ad-4d64-ab21-dcf7e5a6dbbd" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, "ResponseBody": "", @@ -837,7 +974,7 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:20 GMT" + "Sat, 03 Mar 2018 01:08:03 GMT" ], "Pragma": [ "no-cache" @@ -846,35 +983,38 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "9ab21641-e8b8-4aec-9dcc-5a6795481f57" + "f2da5184-2ce7-4119-98eb-433ee7a1242d" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" + "1185" ], "x-ms-correlation-request-id": [ - "c9bb531f-79cb-48c6-a56f-6d853952003c" + "d8cec472-2a8c-4be7-95c9-6d1524046c59" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202920Z:c9bb531f-79cb-48c6-a56f-6d853952003c" + "CENTRALUS:20180303T010804Z:d8cec472-2a8c-4be7-95c9-6d1524046c59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d?api-version=2014-04-01-Preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTk2ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MTQzL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tMjg0MS9henVyZUFzeW5jT3BlcmF0aW9uL2MzMjQzM2I4LWE2ZmEtNGJhNC1hZDVjLTJmNjRlNGExNzUxZD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/e6e6461e-70c1-4ad1-8573-92a306838b2e?api-version=2014-04-01-Preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDUyL2RhdGFiYXNlcy9zcWxkYmxpc3RjYW5jZWxvcGVyYXRpb24tOTg0OS9henVyZUFzeW5jT3BlcmF0aW9uL2U2ZTY0NjFlLTcwYzEtNGFkMS04NTczLTkyYTMwNjgzOGIyZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLVByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.7.0.0" + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" ] }, - "ResponseBody": "{\r\n \"operationId\": \"c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d\",\r\n \"status\": \"Canceled\",\r\n \"error\": null\r\n}", + "ResponseBody": "{\r\n \"operationId\": \"e6e6461e-70c1-4ad1-8573-92a306838b2e\",\r\n \"status\": \"Canceled\",\r\n \"error\": null\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" @@ -883,7 +1023,7 @@ "no-store, no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:50 GMT" + "Sat, 03 Mar 2018 01:08:33 GMT" ], "Transfer-Encoding": [ "chunked" @@ -895,7 +1035,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "e9d9835e-ea0a-4e20-af4f-182747d6d488" + "d64f9a29-0a6e-487c-bb3e-2656a916f3de" ], "X-Content-Type-Options": [ "nosniff" @@ -907,34 +1047,34 @@ "max-age=31536000; includeSubDomains" ], "Azure-AsyncOperation": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourceGroups/sqlcrudtest-9681/providers/Microsoft.Sql/servers/sqlcrudtest-9143/databases/sqldblistcanceloperation-2841/azureAsyncOperation/c32433b8-a6fa-4ba4-ad5c-2f64e4a1751d?api-version=2014-04-01-Preview" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2365/providers/Microsoft.Sql/servers/sqlcrudtest-4052/databases/sqldblistcanceloperation-9849/azureAsyncOperation/e6e6461e-70c1-4ad1-8573-92a306838b2e?api-version=2014-04-01-Preview" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14981" + "14954" ], "x-ms-correlation-request-id": [ - "2f89d53d-326d-44ca-8bdb-0762598d3940" + "5000c8c9-228e-4330-8a62-7386c4ab2f96" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202951Z:2f89d53d-326d-44ca-8bdb-0762598d3940" + "CENTRALUS:20180303T010834Z:5000c8c9-228e-4330-8a62-7386c4ab2f96" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/resourcegroups/sqlcrudtest-9681?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjExMzQ0NDItMzQ0Ny00ZTUzLThmMWQtOGYwZWU4YzRiMjY1L3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTk2ODE/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourcegroups/sqlcrudtest-2365?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIzNjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "4abfac04-1e1d-47a7-ba9e-c50f08b66c59" + "44ed0ab3-d280-4292-a55c-bc2c57310685" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.25211.01", + "FxVersion/4.6.26011.01", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" ] }, @@ -950,31 +1090,34 @@ "no-cache" ], "Date": [ - "Wed, 20 Sep 2017 20:29:54 GMT" + "Sat, 03 Mar 2018 01:08:36 GMT" ], "Pragma": [ "no-cache" ], "Location": [ - "https://api-dogfood.resources.windows-int.net/subscriptions/21134442-3447-4e53-8f1d-8f0ee8c4b265/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDk2ODEtTk9SVEhFVVJPUEUiLCJqb2JMb2NhdGlvbiI6Im5vcnRoZXVyb3BlIn0?api-version=2017-05-10" + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIzNjUtTk9SVEhFVVJPUEUiLCJqb2JMb2NhdGlvbiI6Im5vcnRoZXVyb3BlIn0?api-version=2017-05-10" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1195" ], "x-ms-request-id": [ - "94c24e47-d264-478d-89e7-d7451eff80e8" + "9d592eb6-c19e-4879-80f3-9a712a365cf9" ], "x-ms-correlation-request-id": [ - "94c24e47-d264-478d-89e7-d7451eff80e8" + "9d592eb6-c19e-4879-80f3-9a712a365cf9" ], "x-ms-routing-request-id": [ - "CENTRALUS:20170920T202955Z:94c24e47-d264-478d-89e7-d7451eff80e8" + "CENTRALUS:20180303T010836Z:9d592eb6-c19e-4879-80f3-9a712a365cf9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 202 @@ -982,16 +1125,16 @@ ], "Names": { "CreateResourceGroup": [ - "sqlcrudtest-9681" + "sqlcrudtest-2365" ], "CreateServer": [ - "sqlcrudtest-9143" + "sqlcrudtest-4052" ], "TestCancelDatabaseOperation": [ - "sqldblistcanceloperation-2841" + "sqldblistcanceloperation-9849" ] }, "Variables": { - "SubscriptionId": "21134442-3447-4e53-8f1d-8f0ee8c4b265" + "SubscriptionId": "12f44759-eeff-4f1b-b788-d9e69335517e" } } \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticPoolCrudScenarioTests/TestCancelUpdateElasticPoolOperation.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticPoolCrudScenarioTests/TestCancelUpdateElasticPoolOperation.json new file mode 100644 index 000000000000..5e376f8eadea --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticPoolCrudScenarioTests/TestCancelUpdateElasticPoolOperation.json @@ -0,0 +1,1085 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourcegroups/sqlcrudtest-2676?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI2NzY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"North Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-2676\": \"2018-03-03 01:01:59Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "101" + ], + "x-ms-client-request-id": [ + "32117cad-b127-4bf8-ad31-3ea1d93811f2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676\",\r\n \"name\": \"sqlcrudtest-2676\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-2676\": \"2018-03-03 01:01:59Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "241" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:01:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "b720014e-1701-4b5b-977a-be845026f664" + ], + "x-ms-correlation-request-id": [ + "b720014e-1701-4b5b-977a-be845026f664" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010200Z:b720014e-1701-4b5b-977a-be845026f664" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"version\": \"12.0\"\r\n },\r\n \"tags\": {},\r\n \"location\": \"northeurope\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "185" + ], + "x-ms-client-request-id": [ + "0675a7c5-c8bf-48bf-a3b6-e6cb166c6038" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-03-03T01:02:02.143Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/serverOperationResults/43a82576-61fa-40f4-b93c-7b69d8b49ef8?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/43a82576-61fa-40f4-b93c-7b69d8b49ef8?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "43a82576-61fa-40f4-b93c-7b69d8b49ef8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "c0362d0b-4d3f-4d7d-9516-36e2aa62e1a6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010202Z:c0362d0b-4d3f-4d7d-9516-36e2aa62e1a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/43a82576-61fa-40f4-b93c-7b69d8b49ef8?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDNhODI1NzYtNjFmYS00MGY0LWI5M2MtN2I2OWQ4YjQ5ZWY4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"43a82576-61fa-40f4-b93c-7b69d8b49ef8\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-03-03T01:02:02.143Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "00675457-d149-4f06-95ee-bdf873594f4c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "30f535cf-49ed-4f4f-868d-5f3152c68963" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010212Z:30f535cf-49ed-4f4f-868d-5f3152c68963" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/43a82576-61fa-40f4-b93c-7b69d8b49ef8?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDNhODI1NzYtNjFmYS00MGY0LWI5M2MtN2I2OWQ4YjQ5ZWY4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"43a82576-61fa-40f4-b93c-7b69d8b49ef8\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-03-03T01:02:02.143Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a65fd76c-5a30-469d-8563-42ee7d3d7c2d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "df5af57b-aa82-4d77-b68c-9d3d21e86527" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010233Z:df5af57b-aa82-4d77-b68c-9d3d21e86527" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/serverAzureAsyncOperation/43a82576-61fa-40f4-b93c-7b69d8b49ef8?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDNhODI1NzYtNjFmYS00MGY0LWI5M2MtN2I2OWQ4YjQ5ZWY4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"43a82576-61fa-40f4-b93c-7b69d8b49ef8\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-03-03T01:02:02.143Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4058f524-cb69-479d-b54d-624f96895b52" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "3f8401fe-ae2d-4349-95f8-d6c96d386fee" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010253Z:3f8401fe-ae2d-4349-95f8-d6c96d386fee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"sqlcrudtest-6209.sqltest-eg1.mscds.com\"\r\n },\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209\",\r\n \"name\": \"sqlcrudtest-6209\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6c09e161-0715-49b6-9880-3096c4944334" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "68ddb33e-8f6e-48f2-8cc1-843c4f2f76de" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010253Z:68ddb33e-8f6e-48f2-8cc1-843c4f2f76de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"edition\": \"Premium\",\r\n \"dtu\": 125\r\n },\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"location\": \"northeurope\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "148" + ], + "x-ms-client-request-id": [ + "43838344-f8d1-4dd6-b2fb-c523978ef814" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CREATE\",\r\n \"startTime\": \"2018-03-02T17:02:54.896-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "65" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:02:55 GMT" + ], + "Location": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolOperationResults/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "cee84aa9-269d-4b24-a505-d16307302a81" + ], + "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": [ + "f026fdd8-a3ad-4491-9390-6854ca57361b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010255Z:f026fdd8-a3ad-4491-9390-6854ca57361b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"edition\": \"Premium\",\r\n \"dtu\": 250\r\n },\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"location\": \"northeurope\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "148" + ], + "x-ms-client-request-id": [ + "0d8a3ff3-6bf1-4b84-b3fb-9c0b201d7833" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UPDATE\",\r\n \"startTime\": \"2018-03-02T17:03:58.312-08:00\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "65" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:03:58 GMT" + ], + "Location": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolOperationResults/6db4b422-8567-4000-8df8-6ecf0740c8f7?api-version=2015-05-01" + ], + "Retry-After": [ + "30" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "6db4b422-8567-4000-8df8-6ecf0740c8f7" + ], + "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": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "1938a1e0-5f24-40ce-a298-4015d384b97b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010358Z:1938a1e0-5f24-40ce-a298-4015d384b97b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolOperationResults/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL2VsYXN0aWNQb29sT3BlcmF0aW9uUmVzdWx0cy9jZWU4NGFhOS0yNjlkLTRiMjQtYTUwNS1kMTYzMDczMDJhODE/YXBpLXZlcnNpb249MjAxNS0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalElasticPool\",\r\n \"startTime\": \"2018-03-03T01:02:54.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "78" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:03:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolOperationResults/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolAzureAsyncOperation/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01" + ], + "x-ms-request-id": [ + "c6327765-26f5-4b27-aa22-e510c33a54ce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "897c213e-2286-478c-abe4-82ba553bc90d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010326Z:897c213e-2286-478c-abe4-82ba553bc90d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolAzureAsyncOperation/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL2VsYXN0aWNQb29sQXp1cmVBc3luY09wZXJhdGlvbi9jZWU4NGFhOS0yNjlkLTRiMjQtYTUwNS1kMTYzMDczMDJhODE/YXBpLXZlcnNpb249MjAxNS0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cee84aa9-269d-4b24-a505-d16307302a81\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-03-03T01:02:54.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:03:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2256deda-1951-405f-ada5-426af54b9b84" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "bf26ad52-07a8-40e0-a749-92d9322b3b00" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010341Z:bf26ad52-07a8-40e0-a749-92d9322b3b00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolAzureAsyncOperation/cee84aa9-269d-4b24-a505-d16307302a81?api-version=2015-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL2VsYXN0aWNQb29sQXp1cmVBc3luY09wZXJhdGlvbi9jZWU4NGFhOS0yNjlkLTRiMjQtYTUwNS1kMTYzMDczMDJhODE/YXBpLXZlcnNpb249MjAxNS0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cee84aa9-269d-4b24-a505-d16307302a81\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-03-03T01:02:54.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:03:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "88e1e9ac-1bad-4952-9f6f-249cbb1c2392" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "031ba3e4-1189-4f3e-b56b-0077b7b2fda2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010356Z:031ba3e4-1189-4f3e-b56b-0077b7b2fda2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770\",\r\n \"name\": \"sqlcrudtest-770\",\r\n \"type\": \"Microsoft.Sql/servers/elasticPools\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"creationDate\": \"2018-03-03T01:02:55.06Z\",\r\n \"edition\": \"Premium\",\r\n \"state\": \"Ready\",\r\n \"dtu\": 125,\r\n \"databaseDtuMin\": 0,\r\n \"databaseDtuMax\": 125,\r\n \"storageMB\": 256000,\r\n \"zoneRedundant\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:03:56 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "32ffd6d2-7d3f-4b51-abb6-c71c57c5180b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "347bc3ce-c27f-4a11-9ad0-d0e8d315ccc3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010357Z:347bc3ce-c27f-4a11-9ad0-d0e8d315ccc3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "216cd4e3-cca4-484d-a416-05413faf1e1d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770\",\r\n \"name\": \"sqlcrudtest-770\",\r\n \"type\": \"Microsoft.Sql/servers/elasticPools\",\r\n \"location\": \"North Europe\",\r\n \"kind\": \"\",\r\n \"properties\": {\r\n \"creationDate\": \"2018-03-03T01:02:55.06Z\",\r\n \"edition\": \"Premium\",\r\n \"state\": \"WaitingForNewContainerCreation\",\r\n \"dtu\": 125,\r\n \"databaseDtuMin\": 0,\r\n \"databaseDtuMax\": 125,\r\n \"storageMB\": 256000,\r\n \"zoneRedundant\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:04:33 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "64c59923-ec42-405c-a507-5495b74cfe6a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "91a315bf-47fe-4296-a7dc-3603bd73ac36" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010433Z:91a315bf-47fe-4296-a7dc-3603bd73ac36" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770/operations?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzAvb3BlcmF0aW9ucz9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "870f7c67-6feb-44b1-92b1-13c305701d7a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"elasticPoolName\": \"sqlcrudtest-770\",\r\n \"operation\": \"UPDATE\",\r\n \"operationFriendlyName\": \"UPDATE\",\r\n \"percentComplete\": 1,\r\n \"serverName\": \"sqlcrudtest-6209\",\r\n \"startTime\": \"2018-03-03T01:03:58.267Z\",\r\n \"state\": \"IN_PROGRESS\"\r\n },\r\n \"id\": \"/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770/operations/6db4b422-8567-4000-8df8-6ecf0740c8f7\",\r\n \"name\": \"6db4b422-8567-4000-8df8-6ecf0740c8f7\",\r\n \"type\": \"Microsoft.Sql/servers/elasticPools/operations\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:04:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2e3ac78a-b458-4170-b4e1-e5cf11faefcb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "ba710d27-de63-4660-a770-390c537d3192" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010402Z:ba710d27-de63-4660-a770-390c537d3192" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/servers/sqlcrudtest-6209/elasticPools/sqlcrudtest-770/operations/6db4b422-8567-4000-8df8-6ecf0740c8f7/cancel?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MjA5L2VsYXN0aWNQb29scy9zcWxjcnVkdGVzdC03NzAvb3BlcmF0aW9ucy82ZGI0YjQyMi04NTY3LTQwMDAtOGRmOC02ZWNmMDc0MGM4ZjcvY2FuY2VsP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4e879f46-963e-4f19-96a0-e67dd2da0d86" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:04:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "02958356-a18c-4946-a5a3-446828fbc768" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "e81a96da-d414-4065-a8dc-83e83d724aee" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010403Z:e81a96da-d414-4065-a8dc-83e83d724aee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourceGroups/sqlcrudtest-2676/providers/Microsoft.Sql/locations/northeurope/elasticPoolOperationResults/6db4b422-8567-4000-8df8-6ecf0740c8f7?api-version=2015-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI2NzYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoZXVyb3BlL2VsYXN0aWNQb29sT3BlcmF0aW9uUmVzdWx0cy82ZGI0YjQyMi04NTY3LTQwMDAtOGRmOC02ZWNmMDc0MGM4Zjc/YXBpLXZlcnNpb249MjAxNS0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.12.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"OperationCancelled\",\r\n \"message\": \"The operation has been cancelled by user.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "93" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:04:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "9a1e77ed-bd79-4507-9cf5-c2c780c2aac8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "44c8ce7f-6c84-4b2a-86c0-905e9074bac1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010433Z:44c8ce7f-6c84-4b2a-86c0-905e9074bac1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 409 + }, + { + "RequestUri": "/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/resourcegroups/sqlcrudtest-2676?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTJmNDQ3NTktZWVmZi00ZjFiLWI3ODgtZDllNjkzMzU1MTdlL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI2NzY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b428cd4-339a-48e7-81ee-39b8966d8dfc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26011.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 03 Mar 2018 01:04:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://api-dogfood.resources.windows-int.net/subscriptions/12f44759-eeff-4f1b-b788-d9e69335517e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI2NzYtTk9SVEhFVVJPUEUiLCJqb2JMb2NhdGlvbiI6Im5vcnRoZXVyb3BlIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-request-id": [ + "0d8a3a59-eae3-4bf8-93a8-cabc550928c0" + ], + "x-ms-correlation-request-id": [ + "0d8a3a59-eae3-4bf8-93a8-cabc550928c0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180303T010436Z:0d8a3a59-eae3-4bf8-93a8-cabc550928c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2676" + ], + "CreateServer": [ + "sqlcrudtest-6209" + ], + "TestCancelUpdateElasticPoolOperation": [ + "sqlcrudtest-770" + ] + }, + "Variables": { + "SubscriptionId": "12f44759-eeff-4f1b-b788-d9e69335517e" + } +} \ No newline at end of file diff --git a/src/SDKs/_metadata/sql_resource-manager.txt b/src/SDKs/_metadata/sql_resource-manager.txt index e94eaf180402..c0672b7d4f94 100644 --- a/src/SDKs/_metadata/sql_resource-manager.txt +++ b/src/SDKs/_metadata/sql_resource-manager.txt @@ -1,11 +1,13 @@ -2018-01-31 10:51:15 UTC + +Type dsc to start/install the DS Consolidated Console + +2018-03-02 20:33:17 UTC 1) azure-rest-api-specs repository information -GitHub user: kosta-bizetic -Branch: master -Commit: fb9e1b2a7561e7bd7d697011bd063964f2521861 +GitHub user: payiAzure +Branch: list-and-cancel-webapi-database-elasticpool 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Users\v-kobize\AppData\Roaming\npm `-- autorest@2.0.4245 +Bootstrapper version: C:\Users\payi\AppData\Roaming\npm `-- autorest@2.0.4245 Latest installed version: From f482bb4e27337a7c6b5cc11992175f23f91ba6ce Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Wed, 14 Mar 2018 16:07:21 -0700 Subject: [PATCH 2/7] Sync the SDK repo with original. Sync official rest-api-specs with checked-in changes and renenerate the SDK --- .../Generated/IRestorePointsOperations.cs | 30 +++ .../Generated/RestorePointsOperations.cs | 192 ++++++++++++++++++ .../RestorePointsOperationsExtensions.cs | 51 +++++ src/SDKs/_metadata/sql_resource-manager.txt | 4 +- 4 files changed, 275 insertions(+), 2 deletions(-) diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs index 98f719a85c8a..b68a63292c1f 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IRestorePointsOperations.cs @@ -120,6 +120,36 @@ public partial interface IRestorePointsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string restorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Deletes a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// 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 databaseName, string restorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Creates a restore point for a data warehouse. /// /// diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs index cabba5ba3a84..f3108b1e8304 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperations.cs @@ -496,6 +496,198 @@ internal RestorePointsOperations(SqlManagementClient client) return _result; } + /// + /// Deletes a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// 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 databaseName, string restorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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 (restorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restorePointName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-03-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serverName", serverName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("restorePointName", restorePointName); + tracingParameters.Add("apiVersion", apiVersion); + 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}/databases/{databaseName}/restorePoints/{restorePointName}").ToString(); + _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("{restorePointName}", System.Uri.EscapeDataString(restorePointName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Creates a restore point for a data warehouse. /// diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs index b0782b56dadb..225555ac69a6 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/RestorePointsOperationsExtensions.cs @@ -179,6 +179,57 @@ public static RestorePoint Get(this IRestorePointsOperations operations, string } } + /// + /// Deletes a restore point. + /// + /// + /// 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 name of the restore point. + /// + public static void Delete(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName) + { + operations.DeleteAsync(resourceGroupName, serverName, databaseName, restorePointName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a restore point. + /// + /// + /// 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 name of the restore point. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, restorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Creates a restore point for a data warehouse. /// diff --git a/src/SDKs/_metadata/sql_resource-manager.txt b/src/SDKs/_metadata/sql_resource-manager.txt index c0672b7d4f94..0b00323e0cb3 100644 --- a/src/SDKs/_metadata/sql_resource-manager.txt +++ b/src/SDKs/_metadata/sql_resource-manager.txt @@ -1,11 +1,11 @@ Type dsc to start/install the DS Consolidated Console -2018-03-02 20:33:17 UTC +2018-03-14 23:03:59 UTC 1) azure-rest-api-specs repository information GitHub user: payiAzure -Branch: list-and-cancel-webapi-database-elasticpool +Branch: master 2) AutoRest information Requested version: latest From 4cf916cdc6ebd7cd71b3bbb4a4581e9395d90b11 Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Thu, 15 Mar 2018 11:30:56 -0700 Subject: [PATCH 3/7] generate the .net sdk from official swagger repo azure/azure-rest-api-specs. Bump the api version in Assembly file and csproj --- .../Management.Sql/Microsoft.Azure.Management.Sql.csproj | 4 ++-- .../SqlManagement/Management.Sql/Properties/AssemblyInfo.cs | 2 +- src/SDKs/_metadata/sql_resource-manager.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj b/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj index 884c6da03537..8614ccbb418c 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj +++ b/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj @@ -7,12 +7,12 @@ Microsoft.Azure.Management.Sql Azure SQL Management SDK library Microsoft.Azure.Management.Sql - 1.12.0-preview + 1.13.0-preview Microsoft Azure SQL Management;SQL;SQL Management; diff --git a/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs b/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs index efb7bbafea1a..93401e0c44d4 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs @@ -22,7 +22,7 @@ [assembly: AssemblyTitle("Microsoft Azure SQL Management Library")] [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure SQL.")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.12.0.0")] +[assembly: AssemblyFileVersion("1.13.0.0")] diff --git a/src/SDKs/_metadata/sql_resource-manager.txt b/src/SDKs/_metadata/sql_resource-manager.txt index 0b00323e0cb3..8116dd67eb60 100644 --- a/src/SDKs/_metadata/sql_resource-manager.txt +++ b/src/SDKs/_metadata/sql_resource-manager.txt @@ -1,10 +1,10 @@ Type dsc to start/install the DS Consolidated Console -2018-03-14 23:03:59 UTC +2018-03-15 18:16:15 UTC 1) azure-rest-api-specs repository information -GitHub user: payiAzure +GitHub user: Azure Branch: master 2) AutoRest information From abb9040fcb1c34fd2ac57ea83b2fb0ffdd85dad8 Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Thu, 15 Mar 2018 13:26:13 -0700 Subject: [PATCH 4/7] Update ElasticPool test, only sleep when in Record mode --- .../SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs index 48a269543a89..8c2d89c0c6c3 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs @@ -141,7 +141,11 @@ public async Task TestCancelUpdateElasticPoolOperation() Dtu = 250, Tags = tags }); - Thread.Sleep(TimeSpan.FromSeconds(5)); + + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + Thread.Sleep(TimeSpan.FromSeconds(5)); + } // Get the pool update operation for new added properties on elastic pool operations: ETA, Operation Description and IsCancellable // Expected they have null value since not been updated by operation progress From 1690adf24c2c11a2ce5f60bca1dd63d7b9120013 Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Thu, 15 Mar 2018 13:46:30 -0700 Subject: [PATCH 5/7] do a git clean on working branch, rerun generate.cmd --- src/SDKs/_metadata/sql_resource-manager.txt | Bin 331 -> 1210 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/SDKs/_metadata/sql_resource-manager.txt b/src/SDKs/_metadata/sql_resource-manager.txt index 8116dd67eb6009fed19e9e82fcd22659cce79e54..fb450d3681edbcf408c777bcf4ea9921c5992707 100644 GIT binary patch literal 1210 zcmZ{kOK;Oq5QWd$693_DS=f%-ri4h9fR={@s{%VOaGbP>ieuL{i1Op1-`s0A2`#eX z` zRy*L5!Ov;UeXoXSb9_^>Y&fs+Ul1ikPs#h68$+kW8u#%-yqMbtWK5g}uaY$-!gq2m z*jas6?+Qfv;Iq*cm=c>YtYKibTTtl`x%OF0aPh#gpu!Nvswv=Fu_m6i!z=c=*H~IA zd3<9PE_K5@CVNe;rH^-}cPNnSz32bI^UsO0;~H=Q)q>uF>p_^V7N=vM@Z{`Ts>tRKGH;)X825W%sbPREOtBB2{&{0 z88=_`Md$cudd_K|%{U3WEW6G*Ur7Tit2WHd9eA5U)2#Kq7<(2SXyyiw8)~q59rcU! z2AoZ4$#j`*_v}wcM7?36E%Tw@j9z8Lm@rc_@=SPMuufrHvOB@Lfc-I6Q*x@8crW;s z-k#wx^UtYHu|Go@)6%qg{AK-*?Ip2qnUB!96*V~>cF3yU@2+vT8R^lp_bN30D`}rZ z23^kKp3}dMJT31WM4>x+kW;JSFF5!7a{di!*2?$in)4QGMQo>U%tp-m@Av--)(Pq* hD00Ma>XnG}$;TXL(iE_Y3)t9HKFu`L8+kQN(R;4m&mjN+ literal 331 zcmY+A!A`?43_$Ps3SW1~Sj&c{oaj0U4xGw%>jBdm7O71_>>`z~$E%QlTw*)&dv?re zP6R!7AQ4zF%Z(3u4+F@B;P?!63>*jFqfq~okTK<^*xSvmEp|}sU2*3$IG<``iWT73 zl*wjdv6#H&L>)t>6xmD6Gx+cp^N8YOFb`fHr&pMmvV-c{Xbu@ecX6 Date: Thu, 15 Mar 2018 13:55:31 -0700 Subject: [PATCH 6/7] delete the release note for sdk version 1.12.0-preview --- .../Management.Sql/Microsoft.Azure.Management.Sql.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj b/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj index 46b7a319efbc..1bba982db1c8 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj +++ b/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj @@ -14,7 +14,6 @@ New features: - Added support for List and Cancel operation on Azure database and elastic pool REST API - Added more convenient method to rename databases, `Databases.Rename(resourceGroupName, serverName, databaseName, newName)`. -- Added support for Auto-tuning REST API ]]> From 497c848033ba28338d845b13f7130c77a946c209 Mon Sep 17 00:00:00 2001 From: payiAzure <36676045+payiAzure@users.noreply.github.com> Date: Thu, 15 Mar 2018 15:53:58 -0700 Subject: [PATCH 7/7] fix build issue in ElasticPoolCrudScenarioTests.cs --- src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs index 8c2d89c0c6c3..74c1e41be3dc 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/ElasticPoolCrudScenarioTests.cs @@ -5,6 +5,7 @@ using Microsoft.Azure.Management.ResourceManager.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.Azure; using System; using System.Collections.Generic;